html { scroll-behavior: smooth; }
body {
    background-color: #050505;
    color: #ffffff;
    overflow-x: hidden;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.glass-card {
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px -10px rgba(255, 255, 255, 0.08);
}

.text-glow { text-shadow: 0 0 20px rgba(255, 255, 255, 0.4); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff; }

#toast {
    visibility: hidden;
    opacity: 0;
    transform: translateY(20px) translateX(-50%);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    z-index: 300;
}
#toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) translateX(-50%);
}

#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#loading-screen.done { pointer-events: none; }
#loading-screen.done .loader-meta {
    opacity: 0;
    transition: opacity 0.35s ease;
}
#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease 0.15s, visibility 0.45s ease 0.15s;
}

.loader-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -0.05em;
    line-height: 1;
    color: #fff;
    position: relative;
    z-index: 2;
    will-change: transform;
    transition: transform 0.9s cubic-bezier(0.65, 0, 0.15, 1);
}
.loader-brand img,
.loader-brand .loader-fallback-icon {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
    flex-shrink: 0;
}
.loader-brand .loader-fallback-icon {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.loader-brand .dot { color: #6b7280; }
.loader-brand.fly-to-nav {
    transform: translate(var(--fly-x), var(--fly-y));
}

.loader-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 28px;
    gap: 14px;
}
.loader-text {
    font-family: 'Space Grotesk', monospace;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #888;
    min-height: 16px;
}
.loader-bar-track {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border-radius: 3px;
}
.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 0.2s ease;
}
.loader-pulse {
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    animation: loaderPulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes loaderPulse {
    0% { transform: scale(0.55); opacity: 0.55; }
    100% { transform: scale(1.55); opacity: 0; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(2, 2, 2, 0.85);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.modal-overlay.visible {
    display: flex;
    opacity: 1;
}
.modal-close-btn.locked {
    opacity: 0.25;
    pointer-events: none;
    cursor: not-allowed;
}

.legal-modal {
    width: 100%;
    max-width: 780px;
    height: min(88vh, 780px);
    max-height: calc(100vh - 32px);
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.legal-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 32px 36px;
    scroll-behavior: smooth;
}

.legal-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.35);
}

.legal-scroll-area .clause {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.legal-scroll-area .clause.revealed {
    opacity: 1;
    transform: translateY(0);
}

.legal-progress-track {
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    width: 100%;
}
.legal-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #666, #ffffff);
    transition: width 0.1s linear;
}

.legal-footer-btn {
    transition: all 0.3s ease;
}
.legal-footer .glass-card:hover { transform: none; }
.legal-footer-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(1);
}
.legal-footer-btn:not(:disabled):hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
}

.timer-ring {
    width: 22px;
    height: 22px;
    transform: rotate(-90deg);
}
.timer-ring circle {
    fill: none;
    stroke-width: 2;
}
.timer-ring .bg { stroke: rgba(255, 255, 255, 0.1); }
.timer-ring .fg {
    stroke: #ffffff;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.field-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s ease, background 0.2s ease;
    color: #fff;
    color-scheme: dark;
}
.field-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}
select.field-input {
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #fff 50%),
        linear-gradient(135deg, #fff 50%, transparent 50%),
        linear-gradient(to right, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px),
        calc(100% - 40px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 60%;
    background-repeat: no-repeat;
    padding-right: 48px;
    cursor: pointer;
}
select.field-input option {
    background: #111;
    color: #fff;
}
.field-input.field-error { border-color: rgba(239, 68, 68, 0.6); }
.field-error-msg {
    display: none;
    color: #f87171;
    font-size: 11px;
    margin-top: 4px;
}
.field-error-msg.show { display: block; }
.req-star { color: #f87171; }

.legal-checkbox {
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.legal-checkbox.checked {
    background: #ffffff;
    border-color: #ffffff;
}
.legal-checkbox.checked i { color: #000; font-size: 12px; }
.legal-checkbox.locked {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.divider-svg {
    width: 100%;
    height: 20px;
}

#success-overlay {
    position: fixed;
    inset: 0;
    z-index: 160;
    background: rgba(2, 2, 2, 0.88);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#success-overlay.visible { display: flex; }

.success-card {
    width: 100%;
    max-width: 420px;
    background: rgba(12, 12, 12, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
}

.offer-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.offer-page .legal-modal {
    max-width: 860px;
    margin: 24px auto;
    height: calc(100vh - 48px);
    border-radius: 20px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

#nav-offer,
#nav-order {
    text-transform: uppercase;
}

/* Language Switcher */
#lang-switcher .lang-option {
    color: #9ca3af;
}
#lang-switcher .lang-option:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
#lang-dropdown {
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#lang-dropdown.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
}
#lang-dropdown:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
#lang-btn {
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
}
#lang-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Schedule Widget */
#schedule-widget {
    border: 1px solid rgba(255, 255, 255, 0.04);
}
#schedule-days span {
    transition: all 0.3s ease;
}
#schedule-days span.ring-1 {
    background: rgba(255, 255, 255, 0.15);
}
@media (max-width: 640px) {
    #schedule-widget .text-2xl {
        font-size: 1.25rem;
    }
    #schedule-days {
        gap: 0.375rem;
    }
    #schedule-days span {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }
}