html { overflow-y: scroll; }
/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    transition: all var(--transition-smooth);
}

.glass-panel:hover {
    background: var(--glass-hover-bg);
    border-color: rgba(0, 229, 255, 0.45);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 229, 255, 0.15), 0 0 20px rgba(179, 136, 255, 0.1);
}

body.light-theme .glass-panel:hover {
    border-color: rgba(0, 188, 212, 0.45);
    box-shadow: 0 15px 35px rgba(0, 188, 212, 0.12), 0 0 20px rgba(156, 39, 176, 0.08);
}

/* ==========================================================================
   Ambient Background Glows & Effects
   ========================================================================== */
.noise {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.01; /* Subtle texture layer */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body.light-theme .noise {
    opacity: 0.005; /* Keep it even subtler on bright screen */
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    max-width: 100vw;
}

.glow-cyan {
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,229,255,0.15) 0%, rgba(0,0,0,0) 70%);
}

.glow-purple {
    top: 30%;
    left: -15%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(179,136,255,0.12) 0%, rgba(0,0,0,0) 70%);
}

.glow-cyan-bottom {
    bottom: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, rgba(0,0,0,0) 70%);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.header, .navbar {
    position: fixed !important;
    top: 20px !important;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 0.7rem 1.5rem;
    z-index: 9999;
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    
    
    

    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.25), 
        inset 0 10px 20px -10px rgba(255, 255, 255, 0.15), 
        inset 1px 0 3px rgba(255, 255, 255, 0.08), 
        inset -1px 0 3px rgba(255, 255, 255, 0.08), 
        0 10px 30px rgba(0, 0, 0, 0.4);
}

body.light-theme .header, 
body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Glassmorphism blur for the gap above the floating navbar */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 25px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    z-index: 9998;
    pointer-events: auto; /* Block hovers for elements scrolling behind this gap */
}
@media (max-width: 768px) {
    body::before {
        width: calc(100% - 20px);
        height: 15px;
    }
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex: 1 1 0%;
    display: flex;
    justify-content: flex-start;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo span {
    font-weight: 300;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (min-width: 769px) {
    #mobile-menu-footer-injected {
        display: none !important;
    }
    .mobile-only-profile {
        display: none !important;
    }
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.65rem 1.6rem;
    border-radius: 30px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links a:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-links a.active {
    background: #00a2ff;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 162, 255, 0.3);
}

.nav-icons {
    flex: 1 1 0%;
    justify-content: flex-end;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.icon-link {
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-link:hover {
    color: var(--accent-cyan);
}

/* Cart Button Micro-Animations */
.cart-toggle {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.cart-toggle i {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease, color 0.3s ease;
}

.cart-toggle:hover {
    transform: scale(1.12);
}

.cart-toggle:hover i {
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.8));
    animation: cartWiggle 0.5s ease-in-out;
}

.cart-toggle:hover .cart-badge {
    transform: scale(1.4) !important;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.3), 0 0 15px rgba(0, 229, 255, 1) !important;
}

@keyframes cartWiggle {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(-14deg); }
    40% { transform: rotate(12deg); }
    60% { transform: rotate(-8deg); }
    80% { transform: rotate(4deg); }
    100% { transform: rotate(0deg); }
}

/* Profile Button Micro-Animations */
.profile-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.profile-btn i {
    display: inline-block;
    transition: transform 0.3s ease, filter 0.3s ease, color 0.3s ease;
}
.profile-btn:hover {
    transform: scale(1.12);
}
.profile-btn:hover i {
    color: var(--accent-cyan) !important;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.8));
}

.icon-link.active {
    background: var(--accent-cyan) !important;
    color: #ffffff !important;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.4);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.4rem;
    padding: 10px; /* Expanded tap target padding */
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
    background: rgba(0,0,0,0.2);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.copyright, .footer-copy {
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 1px;
    flex-basis: 100%;
    text-align: center;
    margin-top: 1rem;
}

.legal-disclaimer {
    flex-basis: 100%;
    margin-top: 2rem !important;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-title { font-size: 4rem; }

    .featured-grid { grid-template-columns: 1fr; }
    .item-a, .item-b, .item-c, .item-d { grid-column: span 1; }
    
    .item-a, .item-d {
        flex-direction: column;
        height: auto;
    }
    .item-a .card-content, .item-d .card-content,
    .item-a .card-image-box, .item-d .card-image-box {
        width: 100%;
        padding: 2rem;
    }
    
    .tech-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .header, .navbar { 
        padding: 0.6rem 0; 
        width: calc(100% - 20px) !important;
        top: 10px !important;
        border-radius: 40px !important;
    }
    .nav-container, .footer-container, .section-padding { padding-left: 1.2rem; padding-right: 1.2rem; }
    
    .nav-icons {
        gap: 0.8rem;
    }
    
    .ambient-glow {
        display: none !important;
    }
    
    /* Hamburger button */
    .hamburger-btn { 
        display: flex !important; 
        position: relative;
        z-index: 250;
    }
    
    .hamburger-btn i {
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    .hamburger-btn.open i {
        transform: rotate(180deg);
    }
    
    /* Mobile slide-out menu */
    .nav-links {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0;
        width: 300px;
        height: 100vh;
        background: rgba(8, 10, 15, 0.95);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 8rem 2rem 2rem;
        gap: 0.8rem;
        z-index: 200;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: -20px 0 50px rgba(0,0,0,0.7);
        justify-content: flex-start;
        border-radius: 36px 0 0 36px;
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links.open #mobile-menu-footer-injected { 
        opacity: 1; 
        transform: translateY(0); 
    }
    
    .nav-links a {
        font-size: 1.25rem !important;
        font-weight: 600;
        letter-spacing: 0.5px;
        padding: 1.2rem 2rem;
        text-align: left;
        border-radius: 16px;
        width: 100%;
        background: transparent;
        color: var(--text-primary);
        border: 1px solid transparent;
        transition: all 0.3s ease, transform 0.4s ease, opacity 0.4s ease;
        opacity: 0;
        transform: translateX(30px);
    }
    
    .nav-links.open a {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Staggered animation delays */
    .nav-links a:nth-child(1) { transition-delay: 0.05s; }
    .nav-links a:nth-child(2) { transition-delay: 0.10s; }
    .nav-links a:nth-child(3) { transition-delay: 0.15s; }
    .nav-links a:nth-child(4) { transition-delay: 0.20s; }
    .nav-links a:nth-child(5) { transition-delay: 0.25s; }
    .nav-links a:nth-child(6) { transition-delay: 0.30s; }
    
    /* Nav Icons */
    .nav-links a[href="index.html"]::before { content: "\f015"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }
    .nav-links a[href="catalog.html"]::before { content: "\f466"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }
    .nav-links a[href="calculator.html"]::before { content: "\f1ec"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }
    .nav-links a[href="prices.html"]::before { content: "\f02b"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }
    .nav-links a[href="models.html"]::before { content: "\f1b2"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }
    .nav-links a.mobile-only-profile::before, .nav-links a[href="profile.html"]::before { content: "\f007"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 12px; opacity: 0.7; }

    .nav-links a:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .nav-links a.active {
        background: linear-gradient(90deg, rgba(0, 229, 255, 0.15) 0%, rgba(0, 229, 255, 0.02) 100%) !important;
        border: 1px solid rgba(0, 229, 255, 0.2) !important;
        border-left: 3px solid var(--accent-cyan) !important;
        color: var(--accent-cyan) !important;
        box-shadow: none !important;
        border-radius: 12px;
    }
    
    .profile-btn {
        display: none !important;
    }
    
    body.light-theme .nav-links {
        background: rgba(255, 255, 255, 0.97);
        border-left: 1px solid rgba(0,0,0,0.05);
    }
    
    /* Overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 90;
    }
    .mobile-nav-overlay.active { display: block; }
    
    /* Light theme mobile menu */
    body.light-theme .nav-links {
        background: rgba(255, 255, 255, 0.97);
        border-left-color: rgba(0,0,0,0.08);
        box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    }
    body.light-theme .nav-links a {
        border-bottom-color: rgba(0,0,0,0.06);
    }
    
    /* Crucial fix to prevent horizontal scroll from 3D Canvas aspect-ratio defaults */
    .hero-image-wrapper { aspect-ratio: auto !important; min-width: 0 !important; width: 100% !important; }

    .footer-container { flex-direction: column; gap: 2rem; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem 1.5rem; }
    
    .telegram-fab {
        width: 55px; height: 55px; font-size: 1.6rem;
        bottom: 1.5rem; right: 1.5rem !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }

    .modal-content {
        padding: 1.5rem !important;
    }

    /* Prevent iOS auto-zoom on input elements */
    input, select, textarea {
        font-size: 16px !important;
    }
}



@media (max-width: 768px) {
    .desktop-scroll-indicator { display: none !important; }
}
