/* IntelliTech - Professional Light Theme & Advanced FX */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --brand-primary: #2563EB;
    --brand-accent: #4F46E5;
    --bg-light: #F8FAFC;
    --card-surface: #FFFFFF;
    --card-border: rgba(226, 232, 240, 0.85);
    --ring-glow: rgba(37, 99, 235, 0.12);
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #F8FAFC;
    color: #1E293B;
    overflow-x: hidden;
    position: relative;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   ADVANCED MOVING 3D GLASS BACKGROUND BOXES
   ========================================================================== */
.ambient-scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-glass-box {
    position: absolute;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.72) 0%, rgba(241, 245, 249, 0.4) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 45px rgba(148, 163, 184, 0.12), inset 0 0 20px rgba(255, 255, 255, 0.7);
    will-change: transform;
    transform-style: preserve-3d;
}

/* 3D Tailwind Background Floating Boxes Array */
.box-tailwind-1 {
    top: 10%;
    left: 4%;
    width: 175px;
    min-height: 110px;
    animation: floatMove1 22s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.box-tailwind-2 {
    top: 18%;
    right: 4%;
    width: 210px;
    min-height: 140px;
    animation: floatMove2 26s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.box-tailwind-3 {
    top: 52%;
    right: 5%;
    width: 180px;
    min-height: 130px;
    animation: floatMove3 24s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.box-tailwind-4 {
    top: 75%;
    left: 4%;
    width: 195px;
    min-height: 120px;
    animation: floatMove1 20s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate-reverse;
}

.box-tailwind-5 {
    top: 74%;
    right: 18%;
    width: 205px;
    min-height: 130px;
    animation: floatMove2 28s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate-reverse;
}

.box-tailwind-6 {
    top: 44%;
    left: 12%;
    width: 88px;
    height: 88px;
    animation: floatMove3 18s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* Legacy box classes fallback */
.box-1 { top: 8%; left: 4%; width: 140px; height: 140px; animation: floatMove1 22s ease-in-out infinite alternate; }
.box-2 { top: 55%; left: 88%; width: 220px; height: 220px; animation: floatMove2 28s ease-in-out infinite alternate; }
.box-3 { top: 75%; left: 12%; width: 170px; height: 170px; animation: floatMove3 24s ease-in-out infinite alternate; }
.box-4 { top: 18%; left: 82%; width: 120px; height: 120px; animation: floatMove1 20s ease-in-out infinite alternate-reverse; }
.box-5 { top: 42%; left: 45%; width: 190px; height: 190px; animation: floatMove2 32s ease-in-out infinite alternate; opacity: 0.5; }

.rotate-x-12 {
    transform: perspective(400px) rotateX(25deg);
}

@keyframes floatMove1 {
    0% {
        transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    }
    50% {
        transform: perspective(1000px) translate3d(35px, -45px, 35px) rotateX(10deg) rotateY(-8deg) rotateZ(6deg) scale(1.04);
    }
    100% {
        transform: perspective(1000px) translate3d(-25px, 40px, -20px) rotateX(-8deg) rotateY(10deg) rotateZ(-5deg) scale(0.96);
    }
}

@keyframes floatMove2 {
    0% {
        transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.98);
    }
    50% {
        transform: perspective(1000px) translate3d(-35px, 35px, 30px) rotateX(-10deg) rotateY(12deg) rotateZ(-8deg) scale(1.04);
    }
    100% {
        transform: perspective(1000px) translate3d(28px, -35px, -15px) rotateX(8deg) rotateY(-7deg) rotateZ(6deg) scale(1);
    }
}

@keyframes floatMove3 {
    0% {
        transform: perspective(1000px) translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1);
    }
    50% {
        transform: perspective(1000px) translate3d(45px, 20px, 30px) rotateX(7deg) rotateY(10deg) rotateZ(5deg) scale(1.03);
    }
    100% {
        transform: perspective(1000px) translate3d(-30px, -35px, -20px) rotateX(-9deg) rotateY(-8deg) rotateZ(-7deg) scale(0.95);
    }
}

@media (max-width: 1024px) {
    .floating-glass-box {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

@media (max-width: 640px) {
    .floating-glass-box {
        display: none !important;
    }
}

/* ==========================================================================
   RAINBOW COUNTDOWN & SPECTRUM COLOR FLOW
   ========================================================================== */
@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.text-rainbow-glow {
    background: linear-gradient(
        90deg, 
        #ef4444 0%, 
        #f97316 15%, 
        #eab308 30%, 
        #10b981 45%, 
        #06b6d4 60%, 
        #3b82f6 75%, 
        #8b5cf6 90%, 
        #ec4899 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowFlow 4s ease infinite;
}

.border-rainbow-animated {
    position: relative;
    border-radius: 1.5rem;
    background: #ffffff;
}

.border-rainbow-animated::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(1.5rem + 3px);
    background: linear-gradient(
        90deg, 
        #ef4444, #f97316, #eab308, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444
    );
    background-size: 400% 400%;
    animation: rainbowFlow 6s linear infinite;
    z-index: -1;
    filter: blur(1.5px);
}

.countdown-flip-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 16px -2px rgba(148, 163, 184, 0.16);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.countdown-flip-card:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   GLASSMORPHISM & SURFACE POLISH
   ========================================================================== */
/* Advanced Small Glass Floating Navbar */
.nav-glass-island {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 30px -4px rgba(15, 23, 42, 0.07),
                0 2px 8px -2px rgba(15, 23, 42, 0.04),
                inset 0 1px 1px 0 rgba(255, 255, 255, 0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-glass-island:hover {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 36px -4px rgba(15, 23, 42, 0.09),
                0 4px 12px -2px rgba(15, 23, 42, 0.05),
                inset 0 1px 1.5px 0 rgba(255, 255, 255, 1);
}

.nav-pill-link {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.nav-pill-link:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
    box-shadow: 0 2px 6px rgba(148, 163, 184, 0.15);
}

.nav-pill-link.active {
    background: #ffffff;
    color: #2563eb;
    font-weight: 700;
    box-shadow: 0 2px 8px -1px rgba(37, 99, 235, 0.16), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(191, 219, 254, 0.7);
}

.glass-nav-shimmer {
    position: relative;
    overflow: hidden;
}

.glass-nav-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: navShimmer 8s infinite ease-in-out;
    pointer-events: none;
}

@keyframes navShimmer {
    0%, 75% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

.glass-panel {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.12), 0 2px 6px -1px rgba(148, 163, 184, 0.08);
}

.glass-card {
    background: #FFFFFF;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -4px rgba(148, 163, 184, 0.18), 0 6px 12px -2px rgba(148, 163, 184, 0.08);
    border-color: rgba(199, 210, 254, 0.85);
}

/* Range Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 9999px;
    background: #E2E8F0;
    outline: none;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563EB;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transition: transform 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.3);
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .slider-toggle {
    background-color: #2563EB;
}

input:checked + .slider-toggle:before {
    transform: translateX(20px);
}

/* Pulse Beacon */
@keyframes pulse-beacon {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.beacon-pulse {
    animation: pulse-beacon 2s infinite;
}

/* 3D Smart Window */
.window-frame {
    perspective: 800px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 8px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.blind-slat, .dedicated-blind-slat {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.4s ease;
    transform-origin: center center;
}

.smart-glass-pane {
    transition: background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
