/* V1.3 - Final Aesthetic & Interaction Polish */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800;900&display=swap');

:root {
    --bg-dark: #0a0a0c;
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --bg-card: rgba(255, 255, 255, 0.05);
    --gradient-glow: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --glass-bg: rgba(10, 10, 12, 0.4);
    --glass-blur: blur(15px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    scrollbar-gutter: stable; /* Prevents jumpy layouts */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999; /* Highest priority */
    padding: 1.2rem 0;
    background: #0a0a0c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateZ(0);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.logo:hover {
    filter: brightness(1.3);
    transform: scale(1.1);
}

.nav-links {
    display: flex !important; /* Force visible on desktop */
    gap: 2rem;
}

.nav-item {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-glow);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-secondary);
}

.nav-item:hover {
    color: var(--text-main);
}

.nav-item:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .nav-content { padding: 0 1.5rem; }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 2000;
        transition: all 0.3s ease;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 2px;
        background: var(--text-main);
        transition: all 0.3s ease;
    }

    /* X-Animation for Active State */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        background: var(--accent-secondary);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
        background: var(--accent-secondary);
    }

    .nav-links {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        padding: 2rem;
        transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-item {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-main);
        padding: 0.5rem 0;
    }

    .mobile-menu-toggle:hover span {
        background: var(--accent-secondary);
        box-shadow: 0 0 10px var(--accent-secondary);
    }
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    background: linear-gradient(rgba(10, 10, 12, 0.8), rgba(10, 10, 12, 0.8)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
}

.hero-split {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    width: 100%;
    animation: fadeIn 0.8s ease-out forwards;
}

/* --- Unified Game Viewport System --- */
.game-main {
    flex: 1.5;
    background: #000;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.6);
    position: relative;
    max-width: 800px;
}

.game-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

.game-viewport canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: auto;
}

/* Fullscreen Master Logic */
.game-viewport:fullscreen,
.game-viewport:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-viewport:fullscreen canvas,
.game-viewport:-webkit-full-screen canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.game-viewport:fullscreen .game-header,
.game-viewport:-webkit-full-screen .game-header {
    display: none;
}

.game-header {
    background: #1a1a1e;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.game-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
}

.game-header span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-left: 10px;
}

#adBirdCanvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

/* Ignition Overlay */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1); /* Subtle dim, no blur */
    cursor: pointer;
    transition: all 0.4s ease;
}

.game-overlay.active {
    display: flex;
}

/* --- Layout Sections --- */
.labs-side { flex: 1; }
.labs-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 1rem;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.labs-subline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.pipe-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 32px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.pipe-card:hover { transform: translateY(-5px); }

.pipe-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.pipe-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 2rem; }

.price-tag {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-secondary);
    margin-bottom: 0.5rem;
}

.fine-print {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-style: italic;
    opacity: 0.8;
}

/* --- Components --- */
.cta-button {
    display: inline-block;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(90deg, var(--accent-secondary), #3b82f6, var(--accent-secondary));
    background-size: 200% auto;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    animation: buttonShimmer 3s linear infinite, buttonPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px; /* Lock width */
}

@keyframes buttonShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(6, 182, 212, 0.3); }
    50% { transform: scale(1.02); box-shadow: 0 0 35px rgba(6, 182, 212, 0.6); }
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.8);
    animation: none;
}

.cta-button:active {
    transform: translateY(2px) scale(0.95);
    transition: all 0.1s ease;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.glow-orb {
    position: absolute;
    width: 60vh;
    height: 60vh;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    filter: blur(100px);
    transition: transform 0.5s ease-out;
}

.orb-1 { top: -10%; right: -10%; }
.orb-2 { bottom: -10%; left: -10%; }

footer { padding: 4rem 0; text-align: center; }
.footer-contact {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.footer-contact:hover {
    color: var(--accent-secondary);
    border-bottom-color: var(--accent-secondary);
    filter: brightness(1.2);
}

@media (max-width: 1000px) {
    .hero-split { flex-direction: column; text-align: center; }
    .labs-side { text-align: center; }
}
