/* Custom CSS for Blank Mixer */

/* Theme modes */
:root {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #d0d0d0;
    --border-color: #404040;
    --accent-color: #ffffff;
}

body.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #cccccc;
    --accent-color: #000000;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Force light card styling for any remaining dark UI panels */
.bg-gray-900,
.bg-black.bg-opacity-50 {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

.border-gray-800,
.border-gray-700,
.border-gray-900 {
    border-color: #e2e8f0 !important;
}

.text-gray-400,
.text-gray-300,
.text-gray-500 {
    color: #475569 !important;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Old blender animation rules removed; new Lottie animation renders in the dedicated container. */

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 51;
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgb(255 255 255 / 0.95);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid rgb(229 231 235 / 0.3);
    flex-direction: column;
    gap: 0;
    z-index: 50;
}

.mobile-nav.active {
    display: flex;
}

@media (min-width: 768px) {
    .hamburger-menu,
    .mobile-nav {
        display: none !important;
    }
}

.mobile-nav a {
    display: block;
    padding: 12px 24px;
    text-lg;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgb(229 231 235 / 0.3);
    transition: background-color 0.2s ease;
}

.mobile-nav a:hover {
    background-color: rgb(243 244 246);
}

.mobile-nav a:last-child {
    border-bottom: none;
}

.blender-wrapper,
.blender,
.blender-lid,
.blender-body,
.blender-liquid,
.blender-blade,
.blender-blade::before,
.blender-blade::after,
.blender-base,
.blender-caption {
    display: none;
}

#mixButton {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#mixButton:active {
    transform: scale(0.98);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes dots {
    0%, 20% {
        content: "●";
    }
    40% {
        content: "● ●";
    }
    60%, 100% {
        content: "● ● ●";
    }
}

/* Animated checkmark */
@keyframes checkmark-scale {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkmark-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark-check {
    0% {
        stroke-dashoffset: 50;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-slide-down {
    animation: slideDown 0.6s ease-out;
}

.animate-dots::after {
    animation: dotPulse 1.4s infinite;
    content: "●";
    display: inline-block;
    margin-left: 2px;
}

.animate-dots::before {
    animation: dotPulse 1.4s infinite 0.2s;
    content: "●";
    display: inline-block;
    margin-left: 4px;
    margin-right: 2px;
}

/* Form Styling */
.form-container {
    animation: slideUp 0.8s ease-out;
}

.form-section {
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }
.form-section:nth-child(6) { animation-delay: 0.6s; }

/* Extra vertical padding above specific steps for clearer separation */
.form-container > .form-section:nth-of-type(2) {
    padding-top: 1rem; /* 16px above Step 2 title */
}
.form-container > .form-section:nth-of-type(3) {
    padding-top: 1rem; /* 16px above Step 3 title */
}

/* Input Focus States */
input:focus {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
}

input::placeholder {
    opacity: 0.5;
}

/* Button Styling */
.button-start {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.button-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

.button-start:hover::before {
    left: 100%;
}

.button-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Wallet Input */
.wallet-input-group {
    display: block;
    animation: slideUp 0.6s ease-out;
}

.wallet-input-group + .wallet-input-group {
    border-top: 1px solid #cbd5e1;
    padding-top: 1rem;
    margin-top: 1rem;
}

.wallet-input-group input {
    width: 100%;
}

.squiggle {
    width: 28px;
    height: 10px;
    background: linear-gradient(135deg, transparent 20%, #ffffff 35%, transparent 55%, #ffffff 70%, transparent 85%);
    background-size: 200% 100%;
    animation: squiggleWave 1.2s infinite ease-in-out;
    display: inline-block;
    vertical-align: middle;
}

@keyframes squiggleWave {
    0%, 100% {
        background-position: 0 0;
    }
    50% {
        background-position: 100% 0;
    }
}

.wallet-error {
    color: #f87171;
}

.wallet-error.hidden {
    display: none;
}

.wallet-input-group button {
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #404040;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 14px;
}

.wallet-input-group button:hover {
    border-color: #ffffff;
    color: #ffffff;
}

.wallet-input-group button:active {
    transform: scale(0.95);
}

/* Tooltip */
.tooltip {
    animation: slideDown 0.2s ease-out;
}

/* Status Page Styling */
.status-step {
    opacity: 0.5;
    transition: all 0.6s ease;
}

.status-step.step-active {
    opacity: 1;
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #404040;
    border-radius: 50%;
    font-weight: bold;
    transition: all 0.3s ease;
    color: #808080;
    font-size: 18px;
}

.step-active .step-indicator {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Checkmark Animation */
.checkmark {
    animation: checkmark-scale 0.6s ease-out;
    width: 80px;
    height: 80px;
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: inline-block;
    border-right-color: transparent;
    animation: checkmark-circle 0.6s ease-out;
}

.checkmark-stem,
.checkmark-kick {
    background: #ffffff;
    content: '';
    display: block;
    position: relative;
}

.checkmark-stem {
    width: 3px;
    height: 40px;
    left: 35px;
    top: 15px;
    transform: rotate(-45deg);
}

.checkmark-kick {
    width: 20px;
    height: 3px;
    left: 40px;
    top: 38px;
}

/* Gradient Background Effects */
.gradient-text {
    background: linear-gradient(135deg, #ffffff, #808080);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Effects for Cards */
.bg-gray-900 {
    transition: all 0.3s ease;
}

.bg-gray-900:not(.form-container, .form-section):hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation Utilities */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .button-start {
        font-size: 1rem;
        padding: 3rem 1.5rem !important;
    }
}

/* Selection Color */
::selection {
    background-color: #ffffff;
    color: #000000;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #606060;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.step-checkbox-loader {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
    display: none;
    overflow: hidden;
}

.status-step.step-current .step-checkbox-loader {
    display: block;
}

.step-checkbox-loader svg {
    width: 100% !important;
    height: 100% !important;
}

.step-checkmark {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 0 0 rgba(99, 102, 241, 0.08);
    color: #8b5cf6;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.checkmark-icon {
    display: none;
    font-size: 1.25rem;
    color: #22c55e;
    opacity: 0;
    transform: scale(0.9);
}

.status-step.step-completed .step-checkbox-loader {
    display: none;
}

.status-step.step-completed .checkmark-icon {
    display: flex;
    animation: checkmarkReveal 0.35s ease forwards;
}

@keyframes checkmarkReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.status-step {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.35rem 1.5rem;
}

.status-sidebar {
    width: 68px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-animation {
    display: none;
}

.track-dots {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.85rem;
}

.track-dots span {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #a78bfa;
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.25);
    animation: pulseDot 1.4s infinite ease-in-out;
}

.track-dots span:nth-child(2) {
    animation-delay: 0.18s;
}

.track-dots span:nth-child(3) {
    animation-delay: 0.36s;
}

.status-step.step-current .track-dots span {
    background: #9333ea;
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.25);
}

.status-step.step-pending .track-dots span {
    background: #d8b4fe;
    box-shadow: 0 0 10px rgba(216, 180, 254, 0.18);
}

.status-step.step-completed .track-dots {
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, height 0.3s ease;
}

@keyframes pulseDot {
    0%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Button Group Styling */
.button-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Active state for links */
a.active {
    color: #ffffff;
    border-bottom: 2px solid #ffffff;
    padding-bottom: 2px;
}

/* Form error state */
.form-error input {
    border-color: #ef4444 !important;
}

.form-error input:focus {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5) !important;
}

/* Success state */
.form-success input {
    border-color: #10b981 !important;
}

/* Accessibility Focus Visible */
input:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Smooth transitions for theme changes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Enhanced hover effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.1);
}

/* Responsive grid for status page */
@media (max-width: 640px) {
    .status-step {
        padding: 12px 0;
    }
    
    .step-indicator {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Custom number input styling */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Smooth skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Progress bar animation */
#progressBar {
    background: linear-gradient(90deg, #ffffff, #d0d0d0, #ffffff);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Code/Mono font styling */
.font-mono {
    letter-spacing: 0.5px;
}

/* Centered content with nice spacing */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

/* Range Slider Styling */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #404040;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    border: 2px solid #000000;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    border: 2px solid #000000;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.slider::-moz-range-thumb:active {
    transform: scale(1.1);
}

.slider::-moz-range-track {
    background: transparent;
    border: none;
}

/* Light mode slider styling */
body.light-mode .slider {
    background: #d0d0d0;
}

body.light-mode .slider::-webkit-slider-thumb {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.light-mode .slider::-moz-range-thumb {
    background: #000000;
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Trust indicator animation */
@keyframes trustPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#trustIcon {
    animation: trustPulse 0.5s ease-out;
}

@keyframes barPulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-2px);
    }
}
