:root {
    --bg-dark: #0D1117; /* Deep Navy/Charcoal */
    --bg-card: #161B22; /* Slightly Lighter Navy */
    --primary: #3B82F6; /* Corporate Blue (For Action/Accent) */
    --accent: #FFFFFF; /* Pure White (For Titles/Robot) */
    --text-main: #FFFFFF; /* Main White Text */
    --text-muted: #A0AEC0; /* Muted Light Gray Text */
    --border: rgba(255, 255, 255, 0.15); /* Subtle white border */
    --gradient: linear-gradient(135deg, #3B82F6 0%, #1771F8 100%); /* Blue Gradient */
    --button-text-dark: #FFFFFF; /* White text on blue button */
}

/* Allow scrolling and responsive height */
html, body {
    margin: 0;
    padding: 0;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ANIMATIONS (Floating effect strengthened) */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-40px); } /* Increased vertical distance (was -30px) */
}

@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-reverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

/* NEW ANIMATION: Ring Pulse (subtle color shift on primary ring) */
@keyframes ring-pulse {
    0% { border-top-color: var(--primary); }
    50% { border-top-color: var(--accent); } /* Shift to white */
    100% { border-top-color: var(--primary); }
}

.float-animation { animation: float 8s ease-in-out infinite; } /* Slower, more deliberate float */

/* BACKGROUND */
.bg-elements { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.bg-grid {
    width: 100%; height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* HEADER */
header {
    padding: 20px 0;
    position: fixed; width: 100%; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(13, 17, 23, 0.95);
    border-bottom: 1px solid var(--border);
    /* NEW: Hide header when voice mode is active */
    transition: opacity 0.5s ease;
}
body.voice-mode-active header {
    opacity: 0;
    pointer-events: none;
}

.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--text-main); }
.logo-icon { color: var(--primary); } 
.nav-links { display: flex; gap: 30px; }
.nav-link { color: var(--text-muted); font-size: 0.95rem; transition: 0.3s; }
.nav-link:hover, .nav-link.active { color: var(--text-main); }

/* PRIMARY BUTTON STYLES */
.btn-primary { 
    background: var(--gradient); 
    color: var(--button-text-dark); 
    padding: 14px 30px; 
    border-radius: 50px; 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); 
    transition: all 0.3s ease; 
    display: inline-block; 
    font-weight: 800; 
    font-size: 1.05rem; 
    cursor: pointer;
}
.btn-primary:hover { 
    box-shadow: 0 4px 30px rgba(59, 130, 246, 0.6); 
    transform: translateY(-4px); 
}

/* HERO SECTION - Crucial for fixed view layout */
.hero { 
    padding-top: 100px; 
    padding-bottom: 50px; 
    height: 100vh; 
    display: flex; 
    align-items: center; 
}

/* NEW: Hide hero text when voice mode is active */
body.voice-mode-active .hero-text {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-wrapper { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: center;
    margin: auto; 
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(59, 130, 246, 0.1); 
    color: var(--primary);
    padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; margin-bottom: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}
.hero-title { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; color: var(--accent); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-description { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 30px; max-width: 90%; }

/* ROBOT VISUAL STYLES */
.hero-visual { 
    position: relative; 
    min-height: 450px; 
    height: 100%;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.5s ease;
    z-index: 9999;
    transform: translate(0, 0) scale(1); 
}

/* NEW FOCUS CLASS: Moves the robot to the center and zooms it in */
.robot-focus-center {
    position: fixed !important; 
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.6) !important; /* Increased scale for bigger zoom */
}

/* NEW: Style the robot specifically when focused */
.robot-focus-center .cyber-robot {
    /* FIX: Removed cyan color override, allowing it to remain white (var(--accent)) */
    text-shadow: 0 0 100px rgba(255, 255, 255, 0.8); /* White glow for focused white robot */
}

.robot-focus-center .robot-wrapper {
    animation: none; /* Disable the 'float-animation' while focused */
}

.robot-wrapper { position: relative; width: 400px; height: 400px; display: flex; justify-content: center; align-items: center; }

/* INTENSIFIED GLOW */
.cyber-robot { 
    z-index: 10; 
    position: relative; 
    color: var(--accent); /* Robot is White/Platinum by default */
    text-shadow: 0 0 70px rgba(255, 255, 255, 0.9); /* Stronger White Glow */
} 
.cyber-robot i { font-size: 300px; display: block; transition: all 0.3s ease; }

.orbit-ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid var(--border); }
/* Orbit Speed/Animation Intensified */
.ring-1 { 
    width: 380px; 
    height: 380px; 
    border-top: 2px solid var(--primary); 
    animation: spin 10s linear infinite, ring-pulse 4s ease-in-out infinite; /* Added pulse animation */
} 
.ring-2 { width: 300px; height: 300px; border-bottom: 2px solid var(--accent); animation: spin-reverse 8s linear infinite; } /* Faster */
.ring-3 { width: 240px; height: 240px; border-right: 2px dashed var(--border); animation: spin 15s linear infinite; } /* Faster */
.platform-shadow { position: absolute; bottom: -40px; width: 200px; height: 20px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, transparent 70%); border-radius: 50%; filter: blur(10px); }

/* FOOTER - Hidden/Subtle at the bottom of the screen */
footer { 
    position: absolute; 
    bottom: 0;
    width: 100%;
    padding: 30px 0; 
    border-top: 1px solid var(--border); 
    background: var(--bg-card); 
    z-index: 50; 
    opacity: 0.1; 
} 


/* ROBOT CHAT BUBBLE STYLES */
.chat-bubble {
    position: absolute;
    top: -80px; 
    right: -140px;
    width: 280px;
    background: var(--bg-dark); 
    border: 1px solid var(--primary);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px; 
    border-bottom-left-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); 
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    text-align: left;
}
/* NEW: Hide the chat bubble when the robot is focused and zoomed */
.robot-focus-center .chat-bubble {
    opacity: 0 !important;
    pointer-events: none;
}


.chat-bubble.active {
    opacity: 1;
    transform: translateY(0);
}

.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 0;
    border-top: 10px solid var(--primary);
    border-right: 15px solid transparent;
}

.typing-container {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    min-height: 40px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.cursor {
    color: var(--primary);
    font-weight: bold;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.chat-actions {
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease;
    pointer-events: none;
    justify-content: center; 
}

.chat-actions.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.chat-btn {
    flex: none; 
    width: 100%; 
    padding: 10px 0;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: 0.3s;
    font-family: 'Inter', sans-serif;
}

.chat-btn.confirm {
    background: var(--gradient);
    color: var(--button-text-dark);
    font-weight: 800;
}
.chat-btn.confirm:hover {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

@media (max-width: 768px) {
    .chat-bubble {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        top: -120px;
        width: 260px;
    }
    .chat-bubble.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* CINEMA MODE / VOICE FOCUS (CRITICAL) */
.focus-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 9998; 
    opacity: 0; pointer-events: none; transition: opacity 0.8s ease;
}

body.voice-mode-active { overflow: hidden; }
body.voice-mode-active .focus-overlay { opacity: 1; pointer-events: all; }

.voice-controls {
    position: fixed; bottom: 50px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2147483647 !important; 
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    opacity: 0; transition: all 0.5s ease 0.5s;
}

body.voice-mode-active .voice-controls {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.btn-end-call {
    background: #ef4444; color: white; border: none;
    padding: 15px 40px; border-radius: 50px;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.6);
    display: flex; align-items: center; gap: 12px;
}
.btn-end-call:hover { background: #dc2626; transform: scale(1.05); }

/* INTENSIFIED SPEAKING GLOW/SCALE */
.robot-speaking .cyber-robot i {
    /* FIX: Reduced scale to prevent clipping with end button */
    transform: scale(1.05); 
    /* Use current color of the robot (white) for the glow */
    text-shadow: 0 0 100px currentColor; 
}

/* Use current color of the robot for the visualizer background */
.audio-visualizer { display: flex; gap: 5px; height: 30px; align-items: center; opacity: 0.3; }
.audio-visualizer span { 
    width: 5px; height: 10px; 
    background: var(--primary); /* Primary blue by default */
    border-radius: 5px; 
    animation: wave 1s infinite; 
}
/* FIX: Change visualizer color to match the desired white glow when voice mode is active */
body.voice-mode-active .audio-visualizer span { 
    background: var(--accent); /* White */
}

.audio-visualizer span:nth-child(1) { animation-delay: 0s; }
.audio-visualizer span:nth-child(2) { animation-delay: 0.1s; }
.audio-visualizer span:nth-child(3) { animation-delay: 0.2s; height: 15px; }
.audio-visualizer span:nth-child(4) { animation-delay: 0.1s; }
.audio-visualizer span:nth-child(5) { animation-delay: 0.0s; }
@keyframes wave { 50% { height: 30px; background: #fff; } }


/* ===============================
   EXTRA RESPONSIVE LAYOUT FIXES
   (DO NOT CHANGE YOUR LOOK)
=============================== */

/* Tablet & small laptop */
@media (max-width: 1024px) {
    .hero {
        height: auto;
        padding-top: 110px;
        padding-bottom: 70px;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
        min-height: 380px;
    }

    .hero-description {
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        height: auto;
        padding-top: 150px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
        margin: 0 auto 24px auto;
    }

    .hero-visual {
        min-height: 340px;
    }

    .robot-wrapper {
        width: 260px;
        height: 260px;
    }

    .cyber-robot i {
        font-size: 190px;
    }

    .ring-1 { width: 240px; height: 240px; }
    .ring-2 { width: 200px; height: 200px; }
    .ring-3 { width: 160px; height: 160px; }

    .chat-bubble {
        top: -120px;
        width: 240px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 12px 22px;
        font-size: 0.95rem;
    }

    .robot-wrapper {
        width: 220px;
        height: 220px;
    }

    .cyber-robot i {
        font-size: 160px;
    }

    .chat-bubble {
        width: 220px;
        top: -110px;
        font-size: 0.85rem;
    }
}
