/* ==========================================================================
   STYLE: TECH REVIEWER (DARK MODE DEFAULT)
   Based on "Hybrid" Style but tuned for Tech/Gaming Aesthetic
   ========================================================================== */

:root {
    /* Main Theme: Dark Slate & Indigo */
    --bg-main: #020617;
    /* Slate 950 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    /* Brand Colors */
    --brand-primary: #6366f1;
    /* Indigo 500 */
    --brand-secondary: #8b5cf6;
    /* Violet 500 */
    --brand-accent: #f43f5e;
    /* Rose 500 (for 'Sale' or 'Hot') */
    --brand-amazon: #ff9900;

    /* Glass Effects */
    --glass-bg: rgba(15, 23, 42, 0.7);
    /* Slate 900 with opacity */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shiny: rgba(255, 255, 255, 0.05);

    /* Shadows */
    --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);

    /* Dimensions */
    --header-h: 70px;
    --sidebar-h: 80px;

    /* Fonts */
    --font-main: 'Outfit', sans-serif;
}

/* RESET & BASE */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-h);
    padding-bottom: 100px;
    /* Space for bottom nav */
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* UTILITY: Background Gradient Animation */
.bg-gradient-animate {
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #0f172a);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ==========================================================================
   HEADER (Glassmorphism)
   ========================================================================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-bar.header-hidden {
    transform: translateY(-100%);
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-highlight {
    color: var(--brand-primary);
    -webkit-text-fill-color: var(--brand-primary);
}

.desktop-nav {
    display: none;
    /* Mobile first */
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 40px;
        /* Increased from 30px */
        align-items: center;
        height: 100%;
    }

    .nav-link {
        color: var(--text-muted);
        font-weight: 500;
        font-size: 0.95rem;
        position: relative;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: color 0.3s;
    }

    .nav-link:hover {
        color: white;
    }

    .nav-link.active {
        color: var(--brand-primary);
    }

    .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -24px;
        /* Adjust based on header height centering */
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--brand-primary);
        box-shadow: 0 0 10px var(--brand-primary);
    }
}

/* Mobile Menu Toggle */
.menu-trigger {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: block;
}

@media (min-width: 768px) {
    .menu-trigger {
        display: none;
    }

    /* ==========================================================================
   MOBILE MENU OVERLAY
   ========================================================================== */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(2, 6, 23, 0.98);
        z-index: 2000;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .mobile-menu-overlay.active {
        transform: translateX(0);
    }

    .mobile-menu-overlay a {
        font-size: 1.5rem;
        font-weight: 700;
        color: white;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .mobile-menu-overlay a:hover {
        color: var(--brand-primary);
    }

    /* ==========================================================================
   HERO CAROUSEL (Enhanced 3D Look)
   ========================================================================== */
    .hero-wrapper {
        position: relative;
        width: 100%;
        height: 60vh;
        min-height: 500px;
        overflow: hidden;
        margin-bottom: 40px;
        display: flex;
        justify-content: center;
        perspective: 1000px;
        /* For 3D depth */
    }

    .carousel-slide {
        position: absolute;
        top: 50%;
        width: 70%;
        /* Active slide width */
        height: 85%;
        /* Slightly smaller than wrapper to allow breathing room */
        background-size: cover;
        background-position: center;
        border-radius: 20px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
        opacity: 0;
        z-index: 0;
        transform: translateY(-50%) translateX(-50%) scale(0.8);
        left: 50%;
        /* Center origin */
        cursor: pointer;
    }

    .carousel-slide::after {
        content: '';
        position: absolute;
        inset: 0;
        background: black;
        opacity: 0.4;
        transition: opacity 0.5s;
        border-radius: 20px;
    }

    /* ACTIVE STATE */
    .carousel-slide.active {
        opacity: 1;
        z-index: 10;
        transform: translateY(-50%) translateX(-50%) scale(1);
        box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
        /* Glow */
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .carousel-slide.active::after {
        opacity: 0;
    }

    /* Reveal content */

    /* PREVIOUS SLIDE (Left) */
    .carousel-slide.prev {
        opacity: 0.6;
        z-index: 5;
        transform: translateY(-50%) translateX(-130%) scale(0.85);
        /* Move left */
    }

    /* NEXT SLIDE (Right) */
    .carousel-slide.next {
        opacity: 0.6;
        z-index: 5;
        transform: translateY(-50%) translateX(30%) scale(0.85);
        /* Move right */
    }

    .carousel-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, var(--bg-main) 0%, rgba(2, 6, 23, 0.1) 50%, rgba(2, 6, 23, 0));
        border-radius: 20px;
    }

    .hero-content {
        position: absolute;
        bottom: 40px;
        left: 40px;
        right: 40px;
        text-align: left;
        z-index: 20;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s delay 0.2s;
    }

    .carousel-slide.active .hero-content {
        opacity: 1;
        transform: translateY(0);
    }

    .badge-tag {
        display: inline-block;
        padding: 6px 16px;
        background: rgba(99, 102, 241, 0.2);
        border: 1px solid rgba(99, 102, 241, 0.5);
        color: #a5b4fc;
        border-radius: 50px;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-bottom: 15px;
        backdrop-filter: blur(4px);
    }

    .hero-title {
        font-size: clamp(2rem, 4vw, 3.5rem);
        line-height: 1.1;
        margin-bottom: 15px;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    }

    /* DOTS NAVIGATION */
    .carousel-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 20;
    }

    .dot {
        width: 10px;
        height: 10px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
    }

    .dot.active {
        background: var(--brand-primary);
        transform: scale(1.3);
        box-shadow: 0 0 10px var(--brand-primary);
    }

    .btn-primary {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background: var(--brand-primary);
        color: white;
        padding: 12px 30px;
        border-radius: 50px;
        font-weight: 700;
        font-size: 1rem;
        box-shadow: var(--glow-primary);
        transition: all 0.3s ease;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        background: #565ce0;
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
    }

    /* ==========================================================================
   CARDS & GRID
   ========================================================================== */
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .grid-3 {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .tech-card {
        background: #0f172a;
        /* Slate 900 */
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        overflow: hidden;
        transition: transform 0.3s, box-shadow 0.3s;
        position: relative;
        group: hover;
    }

    .tech-card:hover {
        transform: translateY(-5px);
        border-color: rgba(99, 102, 241, 0.5);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }

    .card-img-container {
        height: 220px;
        overflow: hidden;
        position: relative;
    }

    .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s;
    }

    .tech-card:hover .card-img {
        transform: scale(1.1);
    }

    .card-body {
        padding: 25px;
    }

    .card-meta {
        display: flex;
        justify-content: space-between;
        font-size: 0.8rem;
        color: var(--text-muted);
        margin-bottom: 15px;
        text-transform: uppercase;
        font-weight: 600;
    }

    .card-title {
        font-size: 1.25rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }

    .card-price {
        font-size: 1.1rem;
        font-weight: 700;
        color: white;
        margin-top: 15px;
    }

    /* ==========================================================================
   REVIEW DETAIL SPECIFIC
   ========================================================================== */
    .video-container {
        position: relative;
        width: 100%;
        padding-bottom: 56.25%;
        /* 16:9 Aspect Ratio */
        background: black;
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid var(--glass-border);
        margin: 30px 0;
        box-shadow: var(--shadow-card);
    }

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .amazon-box {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        padding: 30px;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 40px;
    }

    .btn-amazon {
        background: #fbbf24;
        /* Amber 400 */
        color: #1a1a1a;
        /* Black */
        padding: 12px 25px;
        border-radius: 12px;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: transform 0.2s;
    }

    .btn-amazon:hover {
        transform: scale(1.05);
        background: #f59e0b;
    }

    /* ==========================================================================
   SIDEBAR (Bottom Nav) - Glass & Floating
   ========================================================================== */
    .bottom-nav {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%) translateY(0);
        width: auto;
        background: rgba(15, 23, 42, 0.9);
        /* Dark Glass increased opacity */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
        border-radius: 20px;
        /* Less rounded to accommodate text */
        padding: 10px 20px;
        z-index: 1000;
        display: flex;
        align-items: center;
        gap: 20px;
        /* More gap */
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
    }

    .bottom-nav.nav-hidden {
        transform: translateX(-50%) translateY(150px);
        opacity: 0;
    }

    .nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 50px;
        /* ensure width */
        color: var(--text-muted);
        transition: all 0.2s;
        cursor: pointer;
        text-decoration: none;
    }

    .nav-item i {
        font-size: 1.4rem;
        margin-bottom: 4px;
        transition: transform 0.2s;
    }

    .nav-item:hover {
        color: white;
    }

    .nav-item:hover i {
        transform: translateY(-2px);
    }

    .nav-item.active {
        color: var(--brand-primary);
    }

    .nav-item.active i {
        text-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
    }

    .nav-label {
        font-size: 0.7rem;
        font-weight: 500;
        opacity: 0.8;
        display: block;
        /* Show labels */
    }

    /* Optional: Show labels on large screens if desired, but icons look cleaner */

    /* BUBBLE MENUS (Popups from bottom nav) */
    .bubble-menu {
        position: fixed;
        bottom: 90px;
        /* Above nav */
        left: 50%;
        transform: translateX(-50%) scale(0.8);
        background: #1e293b;
        border: 1px solid var(--glass-border);
        border-radius: 20px;
        padding: 15px;
        display: flex;
        gap: 10px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .bubble-menu.active {
        transform: translateX(-50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    .bubble-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 80px;
        text-align: center;
        color: white;
        font-size: 0.8rem;
        padding: 10px;
        border-radius: 12px;
    }

    .bubble-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .bubble-icon {
        font-size: 1.5rem;
        margin-bottom: 5px;
        color: var(--brand-primary);
    }

    /* ==========================================================================
   FOOTER
   ========================================================================== */
    .site-footer {
        background: #020617;
        border-top: 1px solid var(--glass-border);
        padding: 60px 0 20px;
        margin-top: 80px;
        font-size: 0.9rem;
        color: var(--text-muted);
    }

    .footer-disclaimer {
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 40px;
        padding-top: 20px;
        font-size: 0.75rem;
        font-style: italic;
        opacity: 0.6;
        text-align: center;
    }

    /* ==========================================================================
   VIDEO CARD ENHANCEMENTS (Play Overlay & Stars)
   ========================================================================== */

    /* Stars Badge - Top Right */
    .card-stars-badge {
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(4px);
        padding: 5px 10px;
        border-radius: 10px;
        color: #fbbf24;
        /* Amber */
        font-weight: 700;
        font-size: 0.85rem;
        z-index: 10;
        border: 1px solid rgba(251, 191, 36, 0.3);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 5px;
    }

    /* Play Overlay - Center of Image */
    .card-play-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 5;
        cursor: pointer;
    }

    .tech-card:hover .card-play-overlay {
        opacity: 1;
    }

    .play-icon-circle {
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.2);
        border: 2px solid white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(4px);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .play-icon-circle i {
        color: white;
        font-size: 1.5rem;
        margin-left: 4px;
        /* Optical center adjustment */
    }

    .tech-card:hover .play-icon-circle {
        transform: scale(1.1);
        background: var(--brand-accent);
        /* Red on hover like YouTube */
        border-color: var(--brand-accent);
    }

    /* ==========================================================================
   VIDEO MODAL (Lightbox)
   ========================================================================== */
    .video-modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.9);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .video-modal-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .video-modal-content {
        position: relative;
        width: 90%;
        max-width: 1000px;
        aspect-ratio: 16/9;
        background: black;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
        transform: scale(0.9);
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .video-modal-overlay.active .video-modal-content {
        transform: scale(1);
    }

    .close-modal {
        position: absolute;
        top: -40px;
        right: 0;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        opacity: 0.8;
        transition: opacity 0.2s;
    }

    .close-modal:hover {
        opacity: 1;
    }