/* Base Styles & Variables */
html {
    scroll-behavior: smooth;
}

/* Animations */
@keyframes revealWord {
    0% { opacity: 0; transform: translateY(10px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes flyingEntry {
    0% { opacity: 0; transform: translateX(-50px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

.reveal-word {
    display: inline-block;
    opacity: 0;
    animation: revealWord 0.4s forwards;
}

.flying-entry {
    opacity: 0;
    animation: flyingEntry 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

:root {
    --primary: #38BDF8;              /* Sky Blue */
    --primary-hover: #7DD3FC;        /* Light Sky Blue */
    --secondary: #E2E8F0;            /* Bright Gray */
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --text-light: #ffffff;
    --text-muted: #94A3B8;           /* Medium Gray */
    --glass: rgba(255, 255, 255, 0.04);
    --border: rgba(56, 189, 248, 0.4);   /* Sky Blue border */
    --neon-glow: 0 0 10px rgba(56, 189, 248, 0.5), 0 0 20px rgba(125, 211, 252, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: #000000;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 14px;
}

h1, h2, h3, .screen-title {
    font-weight: 800;
    color: var(--primary);
    font-size: 20px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--neon-glow);
}

p, span, li, .btn-text, .level-details p, .unit-duration {
    color: var(--text-light);
    font-size: 14px !important;
    font-weight: 400;
}

.logo-svg {
    width: 100%;
    height: auto;
    max-width: 400px;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: transparent !important;
    transition: background 0.5s ease-in-out;
}

/* Background overrides removed in favor of dynamic overlay in #unit-bg-container */


/* Utility Classes */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Settings Menu Styles */
.settings-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--primary);
    transform: rotate(45deg);
}

.settings-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.voice-grid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.voice-selection-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-selection-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.voice-selection-card.active {
    background: #1e3885;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(30, 56, 133, 0.4);
}

.voice-selection-card .v-name {
    font-weight: 700;
    color: white;
    font-size: 15px;
    text-transform: capitalize;
}

.voice-selection-card .v-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.modal-overlay {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Screen Management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transform: scale(0.98);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 10;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    z-index: 100;
}

#welcome-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent !important;
}

.welcome-container {
    max-width: 500px;
    width: 100%;
}

.welcome-container .welcome-banner {
    flex-direction: column;
    padding: 40px 30px;
    gap: 20px;
}

.welcome-container .bot-avatar {
    font-size: 64px;
    width: 100px;
    height: 100px;
}

.welcome-container .welcome-greeting {
    font-size: 28px;
    margin-bottom: 12px;
}

.welcome-container .bot-statement {
    font-size: 18px;
}

#login-screen {
    background: transparent !important;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    /* Glass tint for background */
    z-index: -1;
}

/* Background shapes removed to ensure absolute black purity */

@keyframes logo-float {
    0% { transform: translateY(0) scale(1.0); filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4)); }
   50% { transform: translateY(-15px) scale(1.05); filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.8)); }
   100% { transform: translateY(0) scale(1.0); filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4)); }
}

@keyframes logo-glow {
   0% { filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.2)); }
   50% { filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.6)); }
   100% { filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.2)); }
}

.logo-motion-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    animation: logo-float 4s ease-in-out infinite;
}

.brand-logo-video {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 3px solid var(--primary);
    animation: logo-glow 3s ease-in-out infinite;
}

/* Cinematic Landing Video */
.bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;           /* Base layer — video sits on top */
    overflow: hidden;
    background: #000000;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* Fill screen, preserve quality */
    object-position: center;
    z-index: 0;
    will-change: transform;     /* GPU acceleration for smooth playback */
}

/* Static photo background for landing screen */
.bg-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
}

/* Dark gradient overlay — very light to preserve video quality */
.bg-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.0)  40%,
        rgba(0, 0, 0, 0.45) 100%
    );
    z-index: 1;
}

/* Ensure Practice Now button sits above the overlay */
.landing-overlay {
    z-index: 10;
}

.mini-logo {
    height: 32px;
    width: auto;
    margin-right: 15px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.landing-overlay {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

/* Practice Now Button */
.practice-now-btn {
    background: #1E3A8A; /* Long dark blue */
    color: white;
    border: none;
    padding: 18px 0;
    width: 90%;
    max-width: 400px;
    border-radius: 8px; /* Rectangular with slight softening */
    font-size: 20px;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.practice-now-btn:hover {
    background: #1e40af;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 50px rgba(30, 58, 138, 0.5);
}

.pulse-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #38BDF8;
    color: #000000;
    border-radius: 50%;
    font-size: 10px;
    animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* Level Selection Screen */
#level-selection-screen {
    background: transparent !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.level-selection-container {
    width: 100%;
    max-width: 400px;
}

.level-screen-title {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.level-grid {
    display: grid;
    gap: 2px !important; /* Razor-Thin Level Gap */
}

.level-card {
    background: rgba(56, 189, 248, 0.10);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    outline: none;
    width: 100%;
    max-width: 340px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    -webkit-user-select: none;
    user-select: none;
}

.level-card .level-name {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.level-card:not(:disabled):hover {
    background: rgba(56, 189, 248, 0.22);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.6) !important;
}

.level-card:not(:disabled):active {
    transform: scale(0.97);
    background: rgba(56, 189, 248, 0.3);
}

.level-card:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.secondary-btn {
    background: white;
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.secondary-btn:hover {
    background: #f9fafb;
}

.danger-btn {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.danger-btn:hover {
    background: var(--danger-hover);
}

.icon-btn#chat-toggle-btn {
    transition: all 0.3s ease;
}

.icon-btn#chat-toggle-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 1);
}

/* Login Screen specific */
.login-container {
    margin: auto;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.logo-area {
    text-align: center;
}

.bot-logo-img {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: white;
    padding: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.video-container {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.video-container video {
    width: 100%;
    display: block;
}

.bot-logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-area h1 {
    font-weight: 700;
    color: var(--primary);
}

.logo-area .subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.input-group input {
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    transition: all 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Content (Units) Screen Refinement */
#main-screen, #unit-screen {
    background: transparent !important;
    padding: 20px;
}

.content-header-title {
    color: var(--primary) !important;
    font-weight: 800 !important;
    font-size: 20px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-back-btn {
    font-size: 24px !important; /* Bigger arrow */
    color: var(--primary) !important;
    background: none !important;
    border: none !important;
    padding: 10px !important;
    margin-right: 15px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align to the left side */
    margin-bottom: 30px;
}

.units-container {
    background: transparent;
}

.bot-avatar {
    font-size: 32px;
    background: var(--bg-light);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-text-container {
    flex: 1;
}

.welcome-greeting {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--primary);
}

.bot-statement {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.5;
}

/* Start Button */
.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(92, 103, 242, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(92, 103, 242, 0.4);
}

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

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 103, 242, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(92, 103, 242, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(92, 103, 242, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.units-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.units-container::-webkit-scrollbar {
    width: 6px;
}

.units-container::-webkit-scrollbar-track {
    background: transparent;
}

.units-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.units-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.units-container h3 {
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--text-muted);
}

.units-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.unit-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    /* Tap-friendly: no text selection */
    -webkit-user-select: none;
    user-select: none;
}

.unit-card:hover,
.unit-card:focus {
    transform: translateY(-3px) scale(1.01);
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}

/* Press/tap feedback */
.unit-card:active {
    transform: scale(0.97);
    background: rgba(56, 189, 248, 0.25);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.unit-info h4 {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.unit-info p {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
}

.unit-arrow {
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    background: rgba(56, 189, 248, 0.25);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.unit-card:hover .unit-arrow,
.unit-card:active .unit-arrow {
    background: rgba(56, 189, 248, 0.55);
}

/* Unit Hub & Dynamic Background Styling */
.unit-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease-in-out;
    filter: none;
    opacity: 1.0;
}

.unit-bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 10, 30, 0.15) 0%,
        rgba(0, 10, 30, 0.1)  40%,
        rgba(0, 10, 30, 0.65) 100%
    );
}

.unit-header {
    position: relative;
    z-index: 10; /* Ensure UI is in front of bg overlay */
    justify-content: flex-start !important;
}

#unit-title-display {
    color: var(--primary) !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 18px !important;
}

.unit-hub-container {
    position: relative;
    z-index: 10; /* Ensure UI is in front of bg overlay */
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.unit-hub-grid {
    display: grid;
    gap: 15px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 0;
    width: 100vw;
    height: 60px;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
}

.bottom-nav.hidden {
    display: none !important;
}

.nav-arrow {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 38px;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.7), 0 2px 8px rgba(0,0,0,0.5);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    transform: scale(1.2);
    color: #38BDF8;
    opacity: 1;
}

.nav-arrow:active {
    transform: scale(0.9);
}

.hub-box {
    /* Watery frosted-glass — sky blue tint, no borders */
    background: rgba(56, 189, 248, 0.07);
    backdrop-filter: blur(28px) saturate(200%) brightness(1.15);
    -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.15);
    border: none;
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 110px;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(56, 189, 248, 0.2),
        inset 0 -1px 0 rgba(255,255,255,0.05),
        0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Water shimmer pseudo-element */
.hub-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hub-box:hover::before {
    opacity: 1;
}

.hub-box .hub-label {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 17px !important;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5), 0 0 20px rgba(56,189,248,0.3);
}

.hub-box.action-box {
    background: rgba(56, 189, 248, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(56,189,248,0.2),
        0 8px 32px rgba(0, 0, 0, 0.2);
}

.hub-box.secondary-action-box {
    background: rgba(226, 232, 240, 0.07);
}

.hub-box:hover {
    transform: translateY(-3px) scale(1.02);
    background: rgba(56, 189, 248, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(56,189,248,0.3),
        0 16px 40px rgba(0, 0, 0, 0.25),
        0 0 25px rgba(56,189,248,0.15);
}

/* Unit Details Overlay (Pop-up style for Grammar/Vocab) */
.unit-detail-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    -webkit-transform: translate(-50%, -50%) translateZ(0);
    width: 92%;
    height: 85%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    z-index: 1000;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.45s cubic-bezier(0.1, 0.8, 0.1, 1);
}

.unit-detail-overlay.hidden {
    display: none;
}

@keyframes slideInUp {
    from { transform: translate(-50%, 40%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

.detail-scroll-area {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
}

/* Vocabulary Audio Buttons */
.audio-btn {
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    transition: all 0.2s;
    flex-shrink: 0;
}

.audio-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.audio-btn svg {
    width: 18px;
    height: 18px;
}

.action-footer {
    padding: 20px 0 0 0;
    text-align: center;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    max-height: 200px;
    overflow: hidden;
}

.helper-text {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Pulse animation for start button */
.pulse-btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Conversation Screen specific */
.call-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    position: relative;
}

.voice-selector-main {
    margin-top: 20px;
    padding: 16px;
}

.voice-selector-main h3 {
    font-size: 14px;
    margin-bottom: 12px;
}

.voice-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.voice-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-btn.active {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.voice-icon {
    font-size: 28px;
}

.call-visualizer {
    text-align: center;
}

.bot-avatar.large {
    width: 140px;
    height: 140px;
    font-size: 64px;
    margin: 0 auto;
    z-index: 2;
    position: relative;
    border: 4px solid white;
}

.avatar-ring {
    position: relative;
}

.avatar-ring.is-speaking::before,
.avatar-ring.is-speaking::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
    z-index: 1;
    animation: ripple 2s infinite ease-out;
}

.avatar-ring.is-speaking::after {
    animation-delay: 1s;
}

@keyframes ripple {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0.5;
    }

    100% {
        width: 250px;
        height: 250px;
        opacity: 0;
    }
}

.wave-container {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
    height: 30px;
    align-items: center;
}

.wave {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
    animation: waveform 1s infinite ease-in-out;
}

.wave:nth-child(2) {
    animation-delay: 0.2s;
}

.wave:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes waveform {

    0%,
    100% {
        height: 6px;
    }

    50% {
        height: 24px;
    }
}

.call-status {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.student-prompt {
    position: absolute;
    bottom: 240px;
    /* Positioned above the AI bubble */
    right: 5%;
    width: auto;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 20px 20px 0 20px;
    /* WhatsApp style right-aligned bubble */
    background: rgba(37, 211, 102, 0.2);
    /* WhatsApp green-ish tint but glassmorphic */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    text-align: right;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-family: "Times New Roman", Times, serif;
    font-size: 11pt;
    animation: popInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

@keyframes popInRight {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.student-prompt.hidden-chat {
    opacity: 0;
    transform: translateX(20px) scale(0.8);
    pointer-events: none;
    visibility: hidden;
}

.student-prompt p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.student-prompt .subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Redundant styles removed */


.call-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    padding: 0 30px;
    z-index: 100;
}

.in-call-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.in-call-actions .btn {
    flex: 1;
}

.action-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    flex-shrink: 0;
}

.action-circle.muted {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.post-call-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hidden {
    display: none !important;
}

/* Utilities */
.block-animate {
    animation: slideUp 0.5s ease backwards;
}

.btn-animate {
    transition: transform 0.1s;
}

.btn-animate:active {
    transform: scale(0.96);
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Specific nav arrows styling */
.nav-arrows {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.nav-arrows .icon-btn {
    border: none;
    background: transparent;
}

.nav-divider {
    color: var(--glass-border);
    margin: 0 4px;
}

.nav-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.active-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Fullscreen Full-Body AI Coach Experience */
#conversation-screen {
    padding: 0 !important;
    background: #000;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

#conversation-screen .top-nav {
    position: relative;
    z-index: 20;
    background: transparent;
    border-bottom: none;
}

.fullscreen-coach {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.fullscreen-coach .avatar-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    z-index: 1;
    border-radius: 0 !important;
    margin: 0;
}

.bot-avatar.fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    background: #111;
    border-radius: 0 !important;
}

.fullscreen-coach .avatar-ring::before,
.fullscreen-coach .avatar-ring::after {
    display: none !important;
    /* Hide circular ripples in fullscreen */
}

.bot-avatar.fullscreen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.2s ease-out;
}

/* Character Sway / Breathing */
@keyframes coach-breathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* Premium AI Coach Animation System */
:root {
    --voice-intensity: 0;
    --head-tilt: 0;
}

/* Removed conflicting photo talking animation */
/* Overlay UI Items */
.overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 20px;
    pointer-events: none;
}

.overlay-content>* {
    pointer-events: auto;
}

.call-visualizer-overlay {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 25px;
    border-radius: 25px;
    width: fit-content;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.5s ease-out;
}

.call-status {
    color: white;
    font-weight: 600;
    font-size: 16px;
    margin-top: 8px;
}

.transcript-preview {
    position: absolute;
    bottom: 120px;
    left: 5%;
    /* Aligned to left */
    width: auto;
    min-width: 150px;
    max-width: 450px;
    padding: 15px 20px;
    border-radius: 20px 20px 20px 0;
    /* WhatsApp style left-aligned bubble */
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-family: "Times New Roman", Times, serif;
    font-size: 11pt;
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    pointer-events: auto;
    animation: popInLeft 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes popInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.transcript-preview::after {
    display: none;
    /* Hide old centered tail */
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

.transcript-preview.hidden-chat {
    opacity: 0;
    transform: translateX(-20px) scale(0.8);
    pointer-events: none;
    visibility: hidden;
}

.transcript-preview.hidden {
    display: none;
}

/* Visualizer Wave enhancement */
.wave {
    background: var(--primary);
    height: calc(8px + (var(--voice-intensity) * 45px)) !important;
    opacity: calc(0.5 + (var(--voice-intensity) * 0.5));
    width: 6px;
    margin: 0 3px;
    border-radius: 10px;
    transition: height 0.05s ease-out;
}

/* Pulse / Voice Ripple */
.avatar-ring.is-speaking::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #000000;
    pointer-events: none;
    animation: voice-pulse 2s infinite;
}

@keyframes voice-pulse {

    0%,
    100% {
        opacity: 0.1;
        transform: scale(0.9);
    }

    50% {
        opacity: 0.3;
        transform: scale(1.1);
    }
}

/* ---- Settings Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
    color: var(--primary-color);
}

.close-modal-btn {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-modal-btn:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.settings-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-color);
    opacity: 0.9;
}

.settings-text {
    font-size: 14px;
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.7);
}

.settings-text strong {
    color: white;
    margin-right: 5px;
}

.settings-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.settings-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.danger-btn {
    border-color: #ff4a4a !important;
    color: #ff4a4a !important;
    width: 100%;
}

.danger-btn:hover {
    background: rgba(255, 74, 74, 0.1) !important;
}

/* ------------------------------------- */
/* ------------------------------------- */
/* Fullscreen UI Buttons                 */
/* ------------------------------------- */

.in-call-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.chat-input-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 5px 15px;
    flex-grow: 1;
    max-width: 500px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.chat-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

#chat-input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 10px;
    flex-grow: 1;
    font-size: 1rem;
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#send-chat-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

#send-chat-btn:hover {
    transform: scale(1.1);
}

#chat-toggle-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 20px;
}

#chat-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

#chat-toggle-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

#mute-mic-btn.active {
    background: #ff4a4a;
    color: white;
    border-color: #ff4a4a;
}

/* ------------------------------------- */
/* ------------------------------------- */
/* Fullscreen 3D Avatar System           */
/* ------------------------------------- */

.call-interface.fullscreen-coach {
    background-color: var(--glass);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.avatar-ring {
    /* Remove original ring styling for fullscreen 3D */
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

.bot-avatar.fullscreen.coach-2d {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.interactive-avatar {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    /* Hide the default grey background of model-viewer */
    --poster-color: transparent;
    background-color: transparent;
}

/* Level Selection Screen */
#level-selection-screen {
    justify-content: center;
    align-items: center;
    background-image: none;
}

.level-selection-container {
    max-width: 800px;
    width: 100%;
    margin-bottom: 40px;
}

.level-selection-container .screen-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary);
    font-weight: 700;
}

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 40px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
}

.level-card:not(.locked):hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(92, 103, 242, 0.15);
}

.level-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(92, 103, 242, 0.3);
}

.level-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.level-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.level-card.locked {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.5);
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.level-card.locked .level-number {
    background: #9ca3af;
    box-shadow: none;
}

.level-card.locked .lock-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #4b5563;
}

.level-card.locked:hover {
    transform: none;
}

/* Auth tabs used in both */
.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: #ff2d85;
    /* Both tabs have pink background per user request */
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: white;
    /* Make text white since bg is pink */
    transition: all 0.3s;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(255, 45, 133, 0.3);
}

.auth-tab.active {
    /* If needed, we can make the active tab slightly different, e.g., an outline, or keep them identical */
    filter: brightness(1.1);
    /* Slight highlight for the active tab */
}

/* Exact Design Recreation - NO MIXING */
.exact-design-screen {
    background: #000000 !important;
    /* Changed to solid black per user request */
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    color: white;
    position: relative;
}

.top-pill-container {
    position: absolute;
    top: 40px;
    right: 5%;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.top-pill-container .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 30px;
}

.pink-pill-btn {
    background: #ff2d85;
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 45, 133, 0.6);
    /* Crisper, subtle shadow */
    transition: transform 0.2s;
}

.pink-pill-btn:hover {
    transform: scale(1.05);
}

.exact-landing-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 180px 8% 100px;
    position: relative;
    /* Updated to the newest dark premium AI image with a refined overlay */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('assets/ai_bg_dark_v2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.exact-text-area {
    width: 45%;
    max-width: 600px;
    z-index: 10;
}

.exact-huge-title {
    font-size: 64px; /* Slightly smaller to fit one line */
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 35px;
    letter-spacing: -2px;
    text-transform: uppercase;
    text-align: center;
    width: 100%;
}

.exact-text-area {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.exact-visual-area {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 0;
    position: relative;
    display: flex;
    justify-content: center;
}

.download-pos {
    padding: 16px 50px;
    /* Reduced padding slightly to prevent oversized text look */
    font-size: 16px;
    /* Reduced from 18px */
}

.landing-page {
    background: #000000 !important;
}

.top-pill-container {
    z-index: 200;
}


.exact-visual-area, .exact-img-zoom-frame, .exact-aurora-glow {
    display: none !important;
}



/* Remove the fake blue bar and aurora glow because the image already has them natively */
.exact-img-zoom-frame::after {
    display: none;
}

.exact-aurora-glow {
    display: none;
}

/* ---- Features Section ---- */
.features-section {
    position: relative;
    z-index: 10;
    padding: 40px 8% 20px; /* Reduced bottom padding from 180px to 20px */
    background: #000000;
    text-align: center;
}

.features-title {
    font-size: 42px;
    font-weight: 900;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.features-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 60px;
    font-weight: 400;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 700px; /* Matched to .exact-desc width for perfect alignment */
    margin: 0 auto;
    text-align: left;
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary);
    padding: 24px 30px;
    border-radius: 0 15px 15px 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(10px);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-title {
        font-size: 30px;
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .features-section {
        padding: 60px 20px 80px;
    }
}

@media (max-width: 1300px) {
    .exact-huge-title {
        font-size: 60px;
    }

    .exact-img-zoom-frame {
        width: 400px;
        height: 400px;
    }

    .exact-landing-layout {
        padding: 0 5%;
    }
}

@media (max-width: 1000px) {
    .exact-huge-title {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .exact-img-zoom-frame {
        width: 300px;
        height: 300px;
    }

    .exact-landing-layout {
        padding-top: 100px;
    }
}

/* Auth Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.multi-step-auth-card {
    width: 92%;
    max-width: 420px;
    background: rgba(30, 80, 255, 0.25) !important; /* Blue Transparency */
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 40px 30px;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.auth-step {
    animation: fadeInStep 0.5s ease-out;
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-indicator {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 600;
}

.multi-step-auth-card h3 {
    font-size: 24px;
    margin-bottom: 25px;
    font-weight: 700;
}

.step-nav {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.auth-step.hidden {
    display: none;
}

.multi-step-auth-card .input-group label {
    color: white !important;
}

.multi-step-auth-card .input-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.multi-step-auth-card .input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
/* Free Call Mode Styling */
#conversation-screen.free-call-mode .call-interface {
    background: #000000 !important;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#conversation-screen.free-call-mode .bot-avatar {
    display: none !important;
}

#conversation-screen.free-call-mode .avatar-ring {
    opacity: 0 !important;
    pointer-events: none !important;
}

#conversation-screen.free-call-mode .call-interface::before {
    content: '📞 Live Coaching Call';
    position: absolute;
    top: 15%;
    font-size: 28px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2px;
    font-family: var(--font-primary);
}

@media (max-width: 600px) {
    /* Landing Page Fixes */
    .top-pill-container {
        position: relative !important;
        top: 0 !important;
        right: auto !important;
        padding: 40px 20px 0 20px !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        z-index: 100 !important;
    }

    .exact-huge-title {
        font-size: 28px !important;
        line-height: 1.1 !important;
        margin: 10px auto 20px auto !important;
        width: 100% !important;
    }

    .exact-landing-layout {
        padding-top: 0 !important;
        gap: 15px !important;
    }

    .exact-img-zoom-frame {
        width: 200px !important;
        height: 200px !important;
    }

    /* App Header Adjustments */
    .app-header {
        padding: 5px !important;
        display: grid !important;
        grid-template-columns: 35px 1fr auto !important;
        align-items: center !important;
        gap: 5px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .user-greeting {
        overflow: hidden !important;
        min-width: 0 !important;
    }

    .user-greeting h2 {
        font-size: 0.9rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        margin: 0 !important;
    }

    .user-greeting p {
        font-size: 10px !important;
        margin: 0 !important;
    }

    .header-actions {
        gap: 3px !important;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .header-actions .icon-btn {
        padding: 0 !important;
        width: 30px !important;
        height: 30px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }

    .header-actions svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Conversation UI */
    #conversation-screen.free-call-mode .call-interface::before {
        font-size: 20px;
        top: 12%;
    }

    .controls-bottom {
        padding-bottom: 30px;
    }

    /* Generic Modal padding for small screens */
    .glass-card.modal-content {
        padding: 20px 15px !important;
    }
}

/* Mic Volume Meter */
.mic-meter-container {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 10px auto;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.mic-meter-bar {
    width: 100%;
    height: 100%;
    background: #00ff88;
    transform: scaleX(var(--mic-intensity, 0));
    transform-origin: left;
    transition: transform 0.1s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Video Container for Grammar */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

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

/* --- Premium Animations & Refinements --- */
.unit-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    animation: fadeInUpCard 0.6s ease backwards;
}

.unit-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 45px rgba(56, 189, 248, 0.4);
    border-color: #38BDF8 !important;
}

@keyframes fadeInUpCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.local-mode-badge {
    background: linear-gradient(135deg, #38BDF8, #2563EB);
    color: white;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Custom Sleek Scrollbar --- */
.detail-content::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.detail-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.3);
}

/* --- Premium Audio Icon Style --- */
.audio-btn {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.audio-btn:hover {
    background: rgba(56, 189, 248, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.audio-btn svg {
    width: 16px;
    height: 16px;
    fill: #38BDF8;
}

/* --- PREMIUM CALL INTERFACE (AVA) --- */
.call-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
}

.avatar-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.2);
    overflow: hidden;
    position: relative;
    z-index: 10;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.05);
}

/* Pulsing Sound Waves (Ava Talking) */
.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.2);
    animation: ava-pulse 2.5s infinite;
    z-index: 1;
    opacity: 0;
}

.pulse-ring:nth-child(2) { animation-delay: 0.8s; }
.pulse-ring:nth-child(3) { animation-delay: 1.6s; }

@keyframes ava-pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Listening State (Small Waves) */
.listening .pulse-ring {
    background: rgba(255, 255, 255, 0.15);
    animation: user-pulse 1.5s infinite;
}

@keyframes user-pulse {
    0% { transform: scale(1); opacity: 0.2; }
    100% { transform: scale(1.3); opacity: 0; }
}

.call-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
    letter-spacing: 2px;
}

.call-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-weight: 300;
}

/* Glassmorphic Call Controls */
.call-controls {
    display: flex;
    gap: 20px;
    padding: 30px;
}

.end-call-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.end-call-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.3);
}

.speaking-indicator {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    display: none;
}

.speaking-indicator.active { display: block; }

.indicator-bar {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #38BDF8;
    left: -100%;
    animation: sliding-glow 1.5s infinite;
}

@keyframes sliding-glow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Premium Call Interface (Eazea Coach) --- */
.call-overlay {
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.8), #020617);
    padding: 60px 20px 40px;
    z-index: 1000;
}

.call-status {
    position: absolute;
    top: 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    color: white;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    opacity: 0.8;
}

.glass-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    letter-spacing: 1px;
}

.avatar-container {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.avatar-frame {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.3);
    z-index: 10;
    transition: transform 0.3s ease;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pulse-ring {
    position: absolute;
    border: 2px solid rgba(56, 189, 248, 0.5);
    border-radius: 50%;
    opacity: 0;
}

/* Speaking Animation State */
.avatar-container.speaking .pulse-ring {
    animation: ring-pulse 3s infinite linear;
}

.avatar-container.speaking .r1 { animation-delay: 0s; }
.avatar-container.speaking .r2 { animation-delay: 1s; }
.avatar-container.speaking .r3 { animation-delay: 2s; }

@keyframes ring-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.interaction-container {
    text-align: center;
    max-width: 400px;
    width: 100%;
}

#coach-name-label {
    color: white;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 800;
}

#call-instruction {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-bottom: 20px;
}

.transcript-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    min-height: 80px;
    max-height: 120px;
    overflow-y: auto;
    color: #7DD3FC;
    font-style: italic;
    font-size: 15px;
    border-left: 3px solid #38BDF8;
}

.call-controls-wrapper {
    display: flex;
    gap: 25px;
    align-items: center;
}

.call-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.call-btn svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.call-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.call-btn.danger {
    background: #ef4444;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.call-btn:hover {
    transform: scale(1.1);
}

.call-btn.danger:hover {
    background: #dc2626;
}

.call-btn.muted {
    background: #64748b;
}

/* Voice Indicator Dots */
.voice-dots {
    position: absolute;
    bottom: -10px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.avatar-container.listening .voice-dots {
    opacity: 1;
}

.voice-dots span {
    width: 6px;
    height: 6px;
    background: #38BDF8;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.voice-dots span:nth-child(2) { animation-delay: 0.2s; }
.voice-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    to { transform: translateY(-8px); opacity: 0.5; }
}
/* --- Robust STT UI Updates --- */
.call-btn.mic-active {
    background: #0ea5e9;
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.8);
    position: relative;
}

.call-btn.mic-active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #0ea5e9;
    animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.status-highlight {
    color: #0ea5e9;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}
/* --- Mic Troubleshooter UI --- */
.volume-meter-container {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 10px auto;
    overflow: hidden;
    position: relative;
}

.volume-bar {
    height: 100%;
    width: 0%;
    background: #0ea5e9;
    box-shadow: 0 0 10px #0ea5e9;
    transition: width 0.1s ease;
}

.mic-warning {
    color: #f87171;
    font-size: 13px;
    margin-top: 10px;
    font-weight: bold;
    animation: fadeIn 0.5s ease;
}

/* --- Immersive Full Screen Agent Redesign --- */
.immersive-mode {
    padding: 0 !important;
    background: #000 !important;
    overflow: hidden;
}

.agent-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.full-screen-agent {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    animation: breathing 8s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.03); }
}

.agent-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.6) 0%, 
        rgba(0,0,0,0) 30%, 
        rgba(0,0,0,0) 70%, 
        rgba(0,0,0,0.8) 100%);
    pointer-events: none;
    z-index: 2;
}

.floating-hud-top {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.status-indicator {
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.floating-hud-bottom {
    position: absolute;
    bottom: 120px;
    left: 0;
    width: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.glass-subtitle {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 20px 25px;
    width: 100%;
    max-width: 600px;
    color: white;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.voice-wave-container {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-controls-wrapper {
    position: absolute;
    bottom: 0px;
    padding-bottom: 40px;
    width: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.control-group {
    display: flex;
    gap: 20px;
}

.mini-troubleshoot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.6;
}

.mini-volume-meter {
    width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.mini-status {
    font-size: 10px;
    color: white;
    text-transform: uppercase;
}

/* --- Modern Minimalist AI UI --- */
.modern-ai-mode {
    background: radial-gradient(circle at center, #0B1120 0%, #000000 100%) !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px !important;
}

.ai-core-container {
    margin-top: 40px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.interaction-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 120px; /* Space for buttons */
}

.ai-glow-pulse {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(56, 189, 248, 0) 70%);
    border-radius: 50%;
    animation: core-pulse 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.5); opacity: 0.6; }
}

.ai-inner-core {
    width: 120px;
    height: 120px;
    background: rgba(10, 20, 40, 0.8);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    z-index: 2;
    position: relative;
    overflow: hidden;
}

.modern-status {
    margin-top: 30px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    z-index: 5;
}

.modern-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    color: white;
    text-align: center;
    font-size: 15px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.mini-troubleshoot {
    margin-top: 15px;
    opacity: 0.4;
}

/* Legacy Post-Call Rules Purged */

.action-box {
    text-align: center;
    padding: 20px 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    cursor: pointer;
}

.action-box:hover {
    transform: translateY(-5px);
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--primary);
}

.action-box h3 {
    font-size: 14px;
    color: var(--primary);
    margin: 10px 0 5px;
}

.action-box p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.action-box.highlight {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
}

.hidden {
    display: none !important;
}

#post-call-ui {
    margin-bottom: 30px;
}

/* --- New UI Restructuring Styles --- */
.user-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 0;
    margin-bottom: 20px;
}

.student-name {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fab-container {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.main-call-fab {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38BDF8, #2563EB);
    border: none;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fab-glow 2s infinite;
}

.main-call-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.7);
}

.main-call-fab svg {
    width: 32px;
    height: 32px;
}

@keyframes fab-glow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hub-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

/* Adjust grid for 3 items */
.unit-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* --- Universal Elite Design Unification --- */

/* Master Button Class */
.eazea-elite-btn, 
.level-card, 
.unit-card, 
.hub-box, 
.content-box, 
.action-box,
.start-btn {
    background: #1E3A8A !important; /* Elite Dark Blue */
    color: white !important;
    border: none !important;
    padding: 18px 20px !important;
    width: 90% !important;
    max-width: 400px !important;
    border-radius: 8px !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    margin: 5px auto !important;
    text-align: center !important;
    height: auto !important;
    overflow: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.eazea-elite-btn:hover, 
.level-card:not(:disabled):hover, 
.unit-card:hover, 
.hub-box:hover, 
.content-box:hover, 
.action-box:hover,
.start-btn:hover {
    background: #2563EB !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.5) !important;
}

.level-card:disabled {
    background: rgba(30, 58, 138, 0.4) !important;
    opacity: 0.6 !important;
}

/* Adjusting Grids to Vertical Stacks for Long Buttons */
.level-grid, 
.units-grid, 
.unit-hub-grid, 
.unit-dashboard, 
.post-call-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    grid-template-columns: none !important;
}

/* Cleaning up internal elements for the new rectangular look */
.box-icon, .hub-icon, .unit-arrow {
    font-size: 24px !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.level-card .level-name, 
.unit-info h4, 
.hub-label, 
.action-box h3 {
    text-shadow: none !important;
    letter-spacing: 2px !important;
}

.eazea-elite-btn *, 
.level-card *, 
.unit-card *, 
.hub-box *, 
.content-box *, 
.action-box *,
.start-btn * {
    font-weight: 400 !important;
    text-shadow: none !important;
}

/* --- Unit Card Layout Refinement --- */
.unit-card {
    justify-content: space-between !important;
    padding: 18px 25px !important;
    text-align: left !important;
}

.unit-card h4 {
    font-size: 18px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    margin-right: 15px !important;
}

.unit-card .unit-arrow {
    flex-shrink: 0 !important;
    font-size: 22px !important;
}

/* --- Elite Slimming Refinement --- */
.eazea-elite-btn, 
.level-card, 
.unit-card, 
.hub-box, 
.content-box, 
.action-box,
.start-btn {
    max-width: 320px !important; /* Slimmer profile */
    font-size: 16px !important;    /* Smaller, more elegant font */
    padding: 18px 20px !important; /* Balanced Symmetry Lock */
}

.unit-card h4 {
    font-size: 16px !important;
    margin: 0 !important;
    line-height: normal !important;
}

/* --- Width Restoration --- */
.eazea-elite-btn, 
.level-card, 
.unit-card, 
.hub-box, 
.content-box, 
.action-box,
.start-btn {
    max-width: 400px !important; /* Back to the long look */
}

/* --- Height Reduction Refinement --- */
.eazea-elite-btn, 
.level-card, 
.unit-card, 
.hub-box, 
.content-box, 
.action-box,
.start-btn {
    padding: 10px 20px !important; /* Thinner vertical height */
}

/* --- Universal Background Image Refinement --- */
.screen:not(#landing-screen) {
    background: url('bg.jpg') center/cover no-repeat fixed !important;
}

.bg-container:not(#landing-screen *), 
.unit-bg-overlay {
    display: none !important; /* Remove old video backgrounds */
}

/* --- Background Image Precision Fix --- */
#level-selection-screen .bg-container, 
#main-screen .bg-container, 
#unit-screen .bg-container,
#unit-bg-container {
    display: none !important;
}

#landing-screen .bg-container {
    display: block !important;
}

/* --- Content Box Layout Refinement --- */
.content-box {
    justify-content: space-between !important;
    padding: 10px 25px !important;
    text-align: left !important;
}

.content-box h3 {
    font-size: 16px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
}

/* --- Content Box Color Sync --- */
.content-box h3 {
    color: #ffffff !important; /* Match Unit Name color exactly */
}

/* --- Grammar Screen Redesign --- */
#grammar-screen {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    width: 100vw !important;
    padding: 0 !important;
}

.grammar-glass-container {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(40px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 24px !important;
    padding: 30px !important;
    width: 90% !important;
    max-width: 550px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5) !important;
    animation: fadeInScale 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.grammar-description {
    color: #ffffff !important; /* Unified with Units color */
    font-size: 18px !important;
    font-weight: 400 !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    line-height: 1.6 !important;
}

.grammar-video-box {
    width: 100% !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    aspect-ratio: 16/9 !important;
    background: #000 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

/* --- Mobile Balanced Grammar Screen --- */
.grammar-glass-container {
    background: rgba(30, 58, 138, 0.85) !important; /* Blue like unit names but with transparency */
    backdrop-filter: blur(15px) saturate(160%) !important; /* Softened blur */
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    width: 92% !important;
    max-width: 340px !important; /* Perfect for mobile */
}

@media (max-width: 600px) {
    #grammar-screen {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* --- Grammar Box Sizing Sync --- */
.grammar-glass-container {
    width: 90% !important;
    max-width: 400px !important; /* Matches exactly the unit-card width */
}

/* --- Grammar Mathematical Centering Fix --- */
#unit-grammar-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important; /* Remove the asymmetric padding */
    width: 100% !important;
    height: 100% !important;
}

.grammar-glass-container {
    margin: 0 auto !important; /* Force browser to center */
}

/* --- Grammar Typography Sync --- */
.grammar-description {
    font-size: 16px !important; /* Matches exactly the unit-card font size */
}

/* --- Vocabulary Screen Redesign --- */
#vocabulary-screen {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    width: 100vw !important;
    padding: 0 !important;
}

.vocabulary-glass-container {
    background: rgba(30, 58, 138, 0.85) !important; /* Elite Blue */
    backdrop-filter: blur(15px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
    padding: 30px 20px !important;
    width: 92% !important;
    max-width: 400px !important; /* Unified with Units Boxes */
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5) !important;
    animation: fadeInScale 0.5s ease !important;
}

.vocab-header-title {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    text-align: center !important;
    margin-bottom: 25px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-bottom: 15px !important;
}

.vocab-scroll-area {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 5px !important;
}

.vocab-scroll-area::-webkit-scrollbar {
    width: 4px !important;
}

.vocab-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
}

.vocab-item-new {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 15px 0 !important;
}

.vocab-item-new:last-child {
    border-bottom: none !important;
}

.vocab-word-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
}

.vocab-word-text {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.vocab-pronounce-text {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic !important;
    font-size: 14px !important;
}

.vocab-def-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin-bottom: 5px !important;
}

.vocab-sentence-text {
    color: #38BDF8 !important; /* Sky blue highlight for examples */
    font-style: italic !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

/* --- Refined Vocabulary Styles --- */
.vocabulary-glass-container {
    backdrop-filter: blur(40px) saturate(180%) !important; /* Extra 'bluery' */
    -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
    background: rgba(30, 58, 138, 0.75) !important;
}

.vocab-word-text {
    color: #1E3A8A !important; /* Bold Dark Blue */
    font-weight: 800 !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.vocab-sentence-text {
    color: #1E3A8A !important; /* Dark Blue */
    font-style: italic !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 5px !important;
}

.vocab-mic-icon {
    font-size: 18px !important;
    cursor: pointer !important;
    transition: transform 0.2s ease !important;
}

.vocab-mic-icon:hover {
    transform: scale(1.2) !important;
}

/* Hard Centering Guarantee */
#vocabulary-screen {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#unit-vocabulary-content {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
}

/* --- Platinum Masterclass Vocabulary Redesign --- */
.platinum-glass-hub {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(60px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(60px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 32px !important;
    padding: 40px 30px !important;
    width: 95% !important;
    max-width: 600px !important; /* Larger for grid feel */
    max-height: 85vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6) !important;
    animation: fadeInSlide 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.vocab-grid-dashboard {
    display: grid !important;
    grid-template-columns: 1fr !important; /* 1 column by default for mobile focus */
    gap: 20px !important;
    padding-right: 5px !important;
}

@media (min-width: 768px) {
    .vocab-grid-dashboard {
        grid-template-columns: 1fr 1fr !important; /* Professional 2-column grid on desktop */
    }
}

.vocab-platinum-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s ease !important;
    cursor: default !important;
}

.vocab-platinum-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
}

.vocab-platinum-word {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.vocab-platinum-pronounce {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 13px !important;
    font-style: italic !important;
    margin-left: auto !important;
}

.vocab-platinum-def {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.1) !important;
    padding-left: 12px !important;
}

.vocab-platinum-sentence {
    color: #ffffff !important;
    font-size: 14px !important;
    font-style: italic !important;
    background: rgba(255, 255, 255, 0.05) !important;
    padding: 10px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: background 0.2s ease !important;
}

.vocab-platinum-sentence:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.platinum-mic-btn {
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.platinum-mic-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.platinum-mic-btn svg {
    width: 14px !important;
    height: 14px !important;
    fill: #ffffff !important;
}

/* --- Elite Blue Masterclass Unification --- */
.platinum-glass-hub {
    background: #1f398a !important; /* Rich Elite Blue */
    backdrop-filter: blur(40px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.vocab-platinum-card {
    background: #1f398a !important; /* Solid Elite Blue Card */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.grammar-glass-container {
    background: #1f398a !important; /* Solid Elite Blue Container */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin-top: 20px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
}

.vocab-platinum-sentence {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* --- Ultra-Minimalist Live Session Controls --- */
.minimal-call-controls {
    position: absolute !important;
    bottom: 50px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 30px !important;
    z-index: 100 !important;
}

.control-btn {
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: white !important;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-5px) !important;
}

.control-btn.end-btn {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.control-btn.end-btn:hover {
    background: rgba(239, 68, 68, 0.4) !important;
}

.control-btn.mic-muted {
    background: rgba(239, 68, 68, 0.6) !important;
}

.control-btn svg {
    width: 24px !important;
    height: 24px !important;
}

/* --- Bot Script Overlay --- */
.script-overlay {
    position: absolute !important;
    top: 40% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(30, 58, 138, 0.8) !important; /* Elite Blue */
    backdrop-filter: blur(40px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 30px !important;
    width: 90% !important;
    max-width: 450px !important;
    text-align: center !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5) !important;
    z-index: 90 !important;
    animation: fadeInScale 0.4s ease !important;
}

#bot-latest-message {
    color: white !important;
    font-size: 18px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* --- Elite Post-Call Hub (Cache Bypass) --- */
#elite-post-call-hub {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    z-index: 200 !important;
}

#elite-post-call-hub.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.elite-post-call-stack {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 90% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.elite-post-call-stack .unit-card {
    background: #1E3A8A !important;
    padding: 12px 25px !important;
}

.elite-post-call-stack .unit-card h4 {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #ffffff !important;
}

/* --- Elite Control Bar (Blue Hub) --- */
.elite-control-bar {
    position: absolute !important;
    bottom: 40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 400px !important; /* Unified with unit boxes */
    background: #1E3A8A !important; /* Signature Elite Blue */
    backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 10px !important;
    height: 60px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
    z-index: 110 !important;
}

.elite-btn {
    background: transparent !important;
    border: none !important;
    color: white !important;
    flex: 1 !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.elite-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.elite-btn svg {
    width: 24px !important;
    height: 24px !important;
    opacity: 0.9 !important;
}

.elite-bar-divider {
    width: 1px !important;
    height: 30px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.elite-btn.end-call svg {
    color: #fca5a5 !important; /* Light red for end call icon */
}

.elite-btn.mic-toggle.mic-muted svg {
    color: #fca5a5 !important; /* Red indicator when muted */
}

/* --- Final Minimalist Clutter Removal --- */
#conversation-screen .call-status,
#conversation-screen .interaction-container,
#conversation-screen .call-controls-wrapper,
#conversation-screen #speaker-toggle-btn,
#conversation-screen .old-end-btn {
    display: none !important;
}

/* --- Restored Big Mic Styling --- */
.ai-core-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 80px !important;
    animation: fadeInScale 0.8s ease !important;
}

.ai-core-container.hidden {
    display: none !important;
}

.big-mic-icon {
    width: 120px !important;
    height: 120px !important;
    color: #38BDF8 !important; /* Premium Sky Blue */
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
    margin-bottom: 20px !important;
    animation: logo-glow 3s infinite alternate;
}

.call-instruction-lite {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 16px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* Ensure the center of the screen is empty and clean */
.modern-ai-mode .call-overlay {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Fix any overflowing buttons */
.elite-control-bar {
    position: fixed !important;
    bottom: 40px !important;
}

/* --- Elite Gatekeeper Styles (Absolute Level 1 Format Sync) --- */
/* --- ELITE MASTER BLUEPRINT: Absolute 360px x 30px & 2px Razor-Sync --- */

.auth-form-container, 
.auth-box-stack, 
.level-selection-stack,
#initial-landing-ui,
#elite-auth-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;            /* RAZOR-THIN SYNC: 2PX */
    width: 100% !important;
    max-width: 360px !important;    /* MASTER EXPANSION: 360PX */
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    animation: fadeInScale 0.6s ease !important;
}

.elite-input, 
.practice-now-btn, 
.level-card,
#verify-access-btn {
    width: 100% !important;         /* Full Width Justification */
    max-width: 360px !important;
    height: 30px !important;        /* Default SURGICAL PROFILE */
    min-height: 30px !important;
    
    background: #1f398a !important; /* SIGNATURE ELITE NAVY */
    color: white !important;
    
    padding: 0 15px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    margin: 0 !important;           /* Eliminate Ghost Margins */
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
}

/* --- LEVEL SPECIFIC PROMINENCE: 50PX HEIGHT & 5PX GAP --- */
.level-selection-stack {
    height: 100vh !important;
    padding: 20px !important;
    gap: 5px !important;            /* Level-Specific Gap */
}

.level-card {
    height: 50px !important;        /* Level-Specific Prominence */
    min-height: 50px !important;
    font-size: 14px !important;     /* Slightly larger font for 50px height */
    letter-spacing: 2px !important;
}

.elite-input::placeholder { color: rgba(255, 255, 255, 0.6) !important; }
.elite-input:focus, .level-card:hover, .practice-now-btn:hover {
    background: #7DD3FC !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.4) !important;
    outline: none !important;
}

.hidden { display: none !important; }

/* --- Curriculum Section Label --- */
.units-section-label {
    width: 100% !important;
    max-width: 400px !important;    /* Absolute Alignment with Boxes */
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;     /* Refined to 14px */
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    text-align: left !important;
    margin-bottom: 20px !important; /* 20px Precision Gap */
    text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;
    animation: fadeInSlide 0.8s ease !important;
}

/* --- ELITE UNIFIED HEADER ROW (Right Justified - Full Seamless Watery) --- */
.unified-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0 !important; /* TOTAL FUSION */
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important; /* Ensure z-index works */
    z-index: 1000 !important;      /* Lift above all containers */
}

.header-pill, .header-btn {
    height: 40px !important;
    background: rgba(56, 189, 248, 0.25) !important; /* Watery Cyan-Blue */
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    cursor: pointer !important;
    margin: 0 !important;
    border-radius: 0 !important; /* Center segments are square */
}

/* Call Icon (Left Edge) */
.call-btn {
    width: 45px !important;
    border-radius: 20px 0 0 20px !important;
    border-right: none !important;
}

/* Sign Out (Center) */
.sign-out-btn {
    width: 60px !important;
    border-right: none !important;
}

/* Student Name (Right Edge) */
.header-pill {
    padding: 0 20px !important;
    border-radius: 0 20px 20px 0 !important;
    min-width: 80px !important;
}

.header-pill:hover, .header-btn:hover {
    background: rgba(56, 189, 248, 0.4) !important; 
    transform: translateY(-2px) !important;
    z-index: 10 !important;
}

.header-pill .student-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    line-height: 1 !important;
    background: transparent !important; /* STRIP LEGACY BACKGROUND */
    border: none !important;             /* STRIP LEGACY BORDER */
    padding: 0 !important;              /* STRIP LEGACY PADDING */
    box-shadow: none !important;         /* STRIP LEGACY SHADOW */
}

.header-btn svg {
    width: 18px !important;
    height: 18px !important;
}
