/* 
  Advance Steno - Midnight Gold Design System
  Global Theme Implementation
  Created: Feb 4, 2026
*/

/* 
  CRITICAL: Force browsers to use local Hindi fonts for the full Latin-1 range.
  This prevents "small" Alt-codes caused by browser fallback fonts.
*/
@font-face {
    font-family: 'Kruti Dev 010';
    src: local('Kruti Dev 010'), local('Krutidev 010'), local('Kruti Dev 011'), local('Krutidev 011'), local('Kruti Dev 10'), local('Krutidev 10'), url('Devlys_010.ttf') format('truetype');
    font-display: swap;
    unicode-range: U+0000-00FF;
}

@font-face {
    font-family: 'DevLys 010';
    src: local('DevLys 010'), local('Devlys 010'), local('DevLys 011'), local('Devlys 11'), url('Devlys_010.ttf') format('truetype');
    font-display: swap;
    unicode-range: U+0000-00FF;
}

:root {
    /* Core Colors */
    --primary: #fbbf24;
    /* Vibrant Gold */
    --primary-glow: rgba(251, 191, 36, 0.4);
    --secondary: #3b82f6;
    /* Cobalt Blue */
    --secondary-glow: rgba(59, 130, 246, 0.4);

    /* Neutral / Backgrounds */
    --bg-darker: #020617;
    /* Deep Midnight */
    --bg-dark: #0f172a;
    /* Rich Slate */
    --bg-card: rgba(30, 41, 59, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Text */
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --text-muted: #64748b;

    /* Functional */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Effects */
    --shadow-main: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Fonts */
    --font-main: 'Inter', sans-serif;
    --font-brand: 'Outfit', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-darker);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}


/* Background Aurora */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 10% 10%, rgba(251, 191, 36, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(59, 130, 246, 0.05) 0%, transparent 40%);
}

/* Typography */
h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-brand);
    font-weight: 800;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #fff 50%, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Global Navigation (Original Index Structure) */
.navbar {
    background: rgba(2, 6, 23, 0.8) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}


.nav-link {
    color: var(--text-gray) !important;
    font-weight: 600 !important;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-darker);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary) !important;
}

/* Hero Section (Original) */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    color: var(--text-gray);
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-end;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}


/* Cards (Original Index & General) */
.course-card,
.testimonial-card,
.glass-card,
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s;
}

/* Grid Layouts */
.grid-container,
.courses-grid,
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}


.course-card:hover,
.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Utilities */
.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.w-100 {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-gold {
    color: var(--primary);
}

.font-bold {
    font-weight: 700;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Portal Specific Structure (Supporting current portals) */
.portal-sidebar {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--glass-border);
}

.portal-main {
    padding: 2rem;
}

/* Sidebar Nav Items */
.nav-item {
    color: var(--text-gray);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(251, 191, 36, 0.1);
    color: var(--primary);
}

/* Forms (Original Login/Register) */
.form-group label {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.85rem;
}

input,
select,
textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 10px !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--primary-glow) !important;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding-top: 1rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item .icon {
    width: 60px;
    height: 60px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-form-box {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 3rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255, 255, 255, 0.02);
    position: relative;
    overflow: hidden;
}

.contact-form-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(251, 191, 36, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.form-header {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.form-header h3 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    color: var(--primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 1rem 1.2rem !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: rgba(251, 191, 36, 0.3) !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
    padding: 1.2rem !important;
    font-size: 1.1rem !important;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-top: 1rem;
}

.full-width span {
    letter-spacing: 1px;
}

/* Footer (Original) */
.footer {
    background: var(--bg-darker) !important;
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-links a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: white;
    font-size: 1.2rem;
}


/* Mobile Responsive */
@media (max-width: 900px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        /* Managed by toggle script */
        background: var(--bg-darker) !important;
    }

    .hero-container,
    .about-grid,
    .contact-wrapper {
        display: flex;
        flex-direction: column;
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-info {
        text-align: left;
        margin-bottom: 2rem;
    }

    .contact-item {
        justify-content: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .hero-image {
        align-items: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .stats {
        justify-content: center;
    }
}


/* Typing Tool Redesign */
.typing-container {
    transition: all 0.3s ease;
    margin: 0 auto;
}

.screen-fit-wide {
    max-width: 1400px !important;
}

.screen-fit-balanced {
    max-width: 1100px !important;
}

.screen-fit-narrow {
    max-width: 850px !important;
}

.text-align-left {
    text-align: left !important;
}

.text-align-center {
    text-align: center !important;
}

.text-align-justify {
    text-align: justify !important;
}

.font-size-24 {
    font-size: 24px !important;
}

.font-size-28 {
    font-size: 28px !important;
}

.font-size-32 {
    font-size: 32px !important;
}

.font-size-36 {
    font-size: 36px !important;
}

.font-size-40 {
    font-size: 40px !important;
}

/* Refined Elements */
#origin-text {
    height: 400px !important;
    width: 100% !important;
    overflow-y: auto;
    background-color: #f8fafc !important;
    color: #000000 !important;
    padding: 2.5rem;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    cursor: text;
    position: relative;
    font-family: 'Mangal', 'Arial Unicode MS', 'Aparajita', 'Latha', 'Kruti Dev 010', 'Inter', sans-serif !important;
    line-height: 1.8 !important;
    font-size: 24px !important;
    text-rendering: optimizeLegibility !important;
}

#origin-text span {
    display: inline-block !important;
    /* Forces words to maintain internal shaping */
    white-space: nowrap !important;
    /* Prevents matra splitting at word boundaries */
    vertical-align: top;
    margin-right: 0.1em;
}

/* INPUT AREA - Direct visible textarea (mirror approach abandoned) */
#input-area {
    background: #ffffff !important;
    color: #000000 !important; /* MUST BE BLACK - text must be visible */
    caret-color: #000000 !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2.5rem !important;
    transition: all 0.3s ease;
    width: 100%;
}

/* Mirror is hidden but kept for JS compat */
#input-mirror {
    display: none !important;
}

.settings-bar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.settings-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-select {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    padding: 0.4rem 0.8rem !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}

.settings-select:hover {
    border-color: var(--primary) !important;
}

/* STENO TOOL - PREMIUM UI (MATCHING IMAGE) */
.steno-tool-outer {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: white;
    width: 100%;
    margin: 0 auto;
}

.promo-bar {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.steno-tool-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.main-controls {
    justify-content: space-between;
}

.exit-btn-wrap {
    background: #f8fafc;
    color: #1e293b;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border: none;
    font-weight: 700;
    font-size: 0.75rem;
    min-width: 80px;
}

.exit-btn-wrap i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.test-title-gold {
    color: #fbbf24;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    margin: 0;
}

.live-stats-row {
    display: flex;
    gap: 2rem;
    text-align: center;
}

.stat-item-pro .label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-item-pro .value {
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'Outfit';
}

.font-settings-pro {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.font-settings-pro .settings-select {
    background: rgba(255, 255, 255, 0.1) !important;
    min-width: 150px;
}

.zoom-controls {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.zoom-controls button {
    background: transparent;
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-weight: 700;
}

.zoom-controls button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.submit-pro-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

/* Inline Stats Card */
.stats-card-inline {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
}

.stat-item-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
    font-family: 'Courier New', monospace;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

.font-controls-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.font-label {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.font-select-inline {
    background: rgba(251, 191, 36, 0.15);
    border: 2px solid #fbbf24;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    min-width: 130px;
    transition: all 0.2s ease;
}

.font-select-inline:hover {
    background: rgba(251, 191, 36, 0.25);
    border-color: #fcd34d;
}

.font-select-inline:focus {
    outline: none;
    border-color: #fcd34d;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.audio-bar-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
}

.audio-controls-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 1.5rem;
}

.audio-controls-group button {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.play-main-yellow {
    background: #fbbf24 !important;
    color: #1e1b4b !important;
    width: 45px;
    height: 35px;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem !important;
}

.speed-info-pro {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.speed-info-pro label {
    font-size: 0.85rem;
    font-weight: 700;
}

.speed-info-pro input[type="range"] {
    flex: 1;
    max-width: 300px;
}

/* --- Audio Seek Bar --- */
/* Let the audio player bar wrap so seek group fills full width */
#audio-player-container {
    flex-wrap: wrap;
    gap: 0.75rem;
    row-gap: 0.5rem;
}

.audio-seek-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1 1 200px;
    /* grows to fill remaining space, shrinks on small screens */
    min-width: 0;
}

.audio-time-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 2.6rem;
    text-align: center;
}

.audio-seek-bar {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    min-width: 0;
    height: 36px;
    /* Full-height click area — NOT the visual track height */
    background: transparent;
    cursor: pointer;
    outline: none;
    padding: 0;
    margin: 0;
}

.audio-seek-bar::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
}

.audio-seek-bar::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.18);
    border: none;
}

/* Webkit thumb */
.audio-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    margin-top: -6px;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
    transition: transform 0.1s;
}

.audio-seek-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Firefox thumb */
.audio-seek-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fbbf24;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}


.typing-area-pro {
    margin: 1.5rem 0;
}

.typing-area-pro textarea {
    width: 100% !important;
    height: 400px !important;
    background: #ffffff !important;
    color: #000000 !important; /* MUST BE BLACK - never transparent */
    caret-color: #000000 !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2.5rem !important;
    font-size: 28px !important;
    line-height: 1.9 !important;
    box-shadow: none !important;
}

.submit-footer-gold {
    background: #fbbf24;
    color: #1e1b4b;
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
}

.submit-footer-gold:hover {
    background: #f59e0b;
    transform: translateY(-2px);
}

/* Unified Control Card */
.control-card-pro {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.control-card-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.control-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
}

.stat-group-minimal {
    display: flex;
    gap: 1.5rem;
}

.stat-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.stat-unit .label {
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-unit .value {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: white;
}

.timer-unit-featured {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.timer-unit-featured .value {
    color: #fbbf24;
}

.font-box-pro {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.font-box-pro select {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.8rem !important;
    min-width: 120px !important;
}

.zoom-btn-pro {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    padding: 0.4rem 0.6rem !important;
    outline: none !important;
    cursor: pointer;
}

.font-cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.font-cluster select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

.font-cluster select:focus {
    outline: none;
    border-color: #fbbf24;
}

.zoom-mini {
    display: flex;
    gap: 2px;
}

.zoom-mini button {
    background: transparent;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
}

.zoom-mini button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-submit-dense {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    white-space: nowrap;
}

/* Result View Styles - Report Paper Theme */
.result-report-paper {
    background: #ffffff !important;
    color: #1e293b !important;
    border-radius: 24px;
    padding: 1.5rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    margin-top: 0;
}

#result-view {
    padding-top: 0;
}

.result-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Force 4 columns for the premium report paper layout (2 rows of 4) */
.result-report-paper .result-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 15px !important;
}

.result-stat-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.result-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-blue {
    border-color: #3b82f6;
    background: #eff6ff;
}

.card-green {
    border-color: #10b981;
    background: #ecfdf5;
}

.card-red {
    border-color: #ef4444;
    background: #fef2f2;
}

.card-yellow {
    border-color: #f59e0b;
    background: #fffbeb;
}

.card-gray {
    border-color: #6b7280;
    background: #f9fafb;
}

.card-purple {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.card-pink {
    border-color: #ec4899;
    background: #fdf2f8;
}

.card-cyan {
    border-color: #06b2d2;
    background: #ecfeff;
}

.stat-label-result {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.stat-value-result {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Courier New', monospace;
}

.card-blue .stat-value-result {
    color: #2563eb;
}

.card-green .stat-value-result {
    color: #059669;
}

.card-red .stat-value-result {
    color: #dc2626;
}

.card-yellow .stat-value-result {
    color: #d97706;
}

.card-gray .stat-value-result {
    color: #4b5563;
}

.card-purple .stat-value-result {
    color: #7c3aed;
}

.card-pink .stat-value-result {
    color: #db2777;
}

.card-cyan .stat-value-result {
    color: #0891b2;
}

/* Detailed Analysis Section */
.detailed-analysis-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.analysis-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.analysis-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.correct {
    background: #10b981;
}

.legend-dot.wrong {
    background: #ef4444;
}

.legend-dot.missed {
    background: #fbbf24;
}

.legend-dot.half {
    background: #ec4899;
}

.legend-dot.extra {
    background: #9333ea;
}

.analysis-text-box {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    line-height: 2.2;
    font-family: inherit;
    /* Respect chosen font */
    font-size: 1.3rem;
    color: #1e293b;
    max-height: 600px;
    overflow-y: auto;
    text-align: left;
}

/* Color coding for analysis text — SSC Steno Standard */
.word-correct {
    color: #16a34a !important;
    margin-right: 4px;
    display: inline;
    font-weight: 600;
}

/* RED = Substitution (Wrong word typed) */
.word-wrong, .word-error {
    color: #dc2626 !important;
    background: rgba(220, 38, 38, 0.08) !important;
    text-decoration: line-through !important;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 0px;
    font-weight: 700;
    cursor: help;
}

/* PINK = Half-mistake (same word, matra/vowel error) */
.word-half-wrong {
    color: #db2777 !important;
    background: rgba(219, 39, 119, 0.08) !important;
    text-decoration: underline dotted !important;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 0px;
    font-weight: 600;
    cursor: help;
}

/* Green = Correct word shown after substitution */
.word-fix {
    color: #ec4899 !important;
    font-size: 0.95rem;
    font-weight: 700;
    margin-left: 3px;
    margin-right: 12px;
    background: transparent !important;
    padding: 1px 4px;
    border-radius: 4px;
}

/* YELLOW = Omission (word missed/skipped by student) */
.word-missed {
    color: #92400e !important;
    background: #fef3c7 !important;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
    margin-right: 4px;
    border: 1px solid #fcd34d;
    cursor: help;
}

/* PURPLE = Insertion (extra word typed) */
.word-extra {
    color: #6b21a8 !important;
    background: #f3e8ff !important;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 700;
    margin-right: 4px;
    border: 1px solid #d8b4fe;
    cursor: help;
}

.char-correct {
    color: #22c55e;
}

.char-wrong {
    color: #dc2626;
    background: #fef2f2;
    padding: 0 1px;
    border-radius: 2px;
    font-weight: 700;
    text-decoration: line-through;
}

.char-missed {
    color: #d97706;
    background: #fff9c4; /* Distinct yellow background for missed characters */
    padding: 0 1px;
    border-radius: 2px;
    font-weight: 700;
}

.char-extra {
    color: #9333ea; /* Purple for extra characters */
    background: #f5f3ff;
    padding: 0 1px;
    border-radius: 2px;
    font-weight: 700;
}

.char-pending {
    color: #64748b; /* Slate grey for pending text */
    opacity: 0.8;
}



/* Glassy Word Highlight for Typing Test - Current Word */
/* SUBTLE Glassy Highlight for Current Word */
.word-highlight {
    background: rgba(37, 99, 235, 0.15) !important; /* Soft Blue Glass */
    border-bottom: 3px solid #2563eb !important;   /* Strong Blue Underline */
    border-radius: 4px;
    padding: 0 4px;
}

/* Interactive In-Place Overwrite Typing Master */
#typing-workspace {
    position: relative;
    width: 100%;
}

.passage-box {
    position: relative;
    background: #ffffff;
    color: #1e293b;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    font-size: 1.35rem;
    line-height: 2.2;
    min-height: 380px;
    max-height: 480px;
    overflow-y: auto;
    text-align: left;
    cursor: text;
    user-select: none;
    font-family: 'Noto Sans Devanagari', 'Mangal', 'Segoe UI', sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
}

body.typing-mode #typing-workspace {
    position: relative;
    width: 100%;
}

body.typing-mode #origin-text {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    min-height: 400px !important;
    max-height: 500px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border: 2px solid #3b82f6 !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    font-size: 1.35rem !important;
    line-height: 2.2 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

body.typing-mode #input-area {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    resize: none !important;
    outline: none !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 1px !important;
    line-height: 1px !important;
    overflow: hidden !important;
}

body.typing-mode #audio-controls-group {
    display: none !important;
}

/* Character Level Realtime Colors */
.passage-box span,
#origin-text span,
.char-pending {
    color: #334155 !important;
    opacity: 0.88;
    border-bottom: 4px solid transparent !important;
    padding-bottom: 2px !important;
    transition: color 0.05s ease;
}

.passage-box span.char-space,
#origin-text span.char-space,
.char-space {
    display: inline-block !important;
    min-width: 0.55em !important;
    white-space: pre !important;
    border-bottom: 4px solid transparent !important;
}

.passage-box span.char-correct,
#origin-text span.char-correct,
.char-correct {
    color: #16a34a !important; /* Crisp Green */
    font-weight: 700 !important;
    background: transparent !important;
    border-bottom: 4px solid transparent !important;
    text-decoration: none !important;
}

.passage-box span.char-wrong,
#origin-text span.char-wrong,
.char-wrong {
    color: #dc2626 !important; /* Bold Red */
    background: rgba(220, 38, 38, 0.18) !important;
    border-radius: 3px;
    font-weight: 800 !important;
    border-bottom: 4px solid #dc2626 !important;
    padding: 1px 2px;
}

/* Active Letter: Instant Blue Underline Indicator */
.passage-box span.char-current,
#origin-text span.char-current,
span.char-current,
.char-current {
    position: relative !important;
    color: #0f172a !important;
    border-bottom: 4px solid #2563eb !important; /* Bold Prominent Blue Line */
    background: rgba(37, 99, 235, 0.22) !important;
    border-radius: 3px 3px 0 0 !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4) !important;
    font-weight: 800 !important;
    z-index: 10 !important;
}

.passage-box span.char-space.char-current,
#origin-text span.char-space.char-current,
span.char-space.char-current,
.char-space.char-current {
    display: inline-block !important;
    min-width: 0.6em !important;
    border-bottom: 4px solid #2563eb !important;
    background: rgba(37, 99, 235, 0.3) !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4) !important;
}



/* Result Actions */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.result-actions .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.result-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
    .result-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .result-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .result-stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* --- STUNNING PRINT REPORT THEME --- */
@media print {
    @page {
        size: A4;
        margin: 1.5cm;
    }

    body {
        background: #fff !important;
        color: #1e293b !important;
        font-family: 'Inter', 'Noto Sans Devanagari', sans-serif !important;
    }

    /* Hide everything except report */
    .dashboard-header,
    .portal-layout::before,
    .result-actions,
    .navbar,
    .demo-hero,
    .category-tabs,
    #demo-list-container,
    .steno-tool-outer,
    .footer,
    .btn,
    .badge,
    .promo-bar,
    .tool-row,
    .steno-control-bar,
    .typing-area-pro,
    .submit-footer-gold {
        display: none !important;
    }

    .portal-main {
        padding: 0 !important;
        margin: 0 !important;
    }

    #result-view,
    #result-view .detailed-analysis-section,
    #result-view .print-institute-header,
    #result-view .print-student-info {
        visibility: visible !important;
        display: block !important;
    }

    #result-view .result-stats-grid {
        visibility: visible !important;
        display: grid !important;
        /* Ensure grid is preserved */
    }

    #result-view .print-institute-header,
    #result-view .print-student-info {
        display: flex !important;
        /* Keep flex for layout */
    }

    #result-view {
        position: static !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .result-report-paper {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .text-gradient {
        background: none !important;
        -webkit-text-fill-color: initial !important;
        color: #020617 !important;
        font-weight: 800 !important;
        font-size: 2.5rem !important;
        border-bottom: 2px solid #fbbf24 !important;
        padding-bottom: 10px !important;
        margin-bottom: 20px !important;
    }

    .result-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-auto-rows: 1fr !important;
        /* Forces equal height for all cards */
        gap: 12px !important;
        margin-bottom: 2rem !important;
    }

    .result-stat-card {
        border: 1px solid #e2e8f0 !important;
        padding: 12px 8px !important;
        background: #f8fafc !important;
        border-radius: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .stat-label-result {
        color: #64748b !important;
        font-size: 0.6rem !important;
        margin-bottom: 4px !important;
        text-transform: uppercase !important;
        font-weight: 700 !important;
    }

    .stat-value-result {
        font-size: 1.4rem !important;
        color: #0f172a !important;
        font-weight: 800 !important;
    }

    .detailed-analysis-section {
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        margin-top: 3rem !important;
        padding: 2rem !important;
        page-break-inside: avoid;
    }

    .analysis-title {
        color: #0f172a !important;
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        text-align: left !important;
    }

    .analysis-text-box {
        max-height: none !important;
        overflow: visible !important;
        border: none !important;
        line-height: 2.2 !important;
        font-size: 1.25rem !important;
        background: #fff !important;
        padding: 0 !important;
    }

    /* Preserve analysis highlighting colors */
    .char-correct {
        color: #059669 !important;
    }

    .char-wrong {
        color: #dc2626 !important;
        background: #fee2e2 !important;
        text-decoration: line-through !important;
    }

    .char-missed {
        color: #d97706 !important;
        background: #fffbeb !important;
        font-weight: 700 !important;
    }

    .char-extra {
        color: #9333ea !important;
        background: #f5f3ff !important;
        font-weight: 700 !important;
    }

    .legend-dot.correct {
        background: #10b981 !important;
    }

    .legend-dot.wrong {
        background: #ef4444 !important;
    }

    .legend-dot.missed {
        background: #f59e0b !important;
    }

    /* Footer for Brand */
    #result-view::after {
        content: 'Report Generated by Advance Steno - www.advancesteno.com';
        display: block;
        text-align: center;
        margin-top: 3rem;
        font-size: 0.8rem;
        color: #94a3b8;
        border-top: 1px solid #f1f5f9;
        padding-top: 1rem;
    }
}

/* Download Result Button - Vibrant Gradient Design */
.btn-download-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-download-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-download-result:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-download-result i {
    font-size: 1.3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* --- PREMIUM REPORT BRANDING --- */
.print-institute-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-bottom: 2px solid #fbbf24;
    border-radius: 16px 16px 0 0;
    margin-bottom: 2rem;
}

.brand-left {
    flex: 0 0 120px;
    /* Adjusted for slightly bigger logo */
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.brand-left img {
    height: 65px !important;
    /* Balanced larger size */
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

.brand-center {
    text-align: center;
    flex: 1;
}

.brand-center h1 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    /* Slightly smaller to fit full name elegantly */
    color: #1e293b;
    letter-spacing: 1px;
    font-weight: 800;
}

.brand-center p {
    margin: 4px 0;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.brand-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 8px;
}

.brand-right .contact-box {
    text-align: right;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.contact-box strong {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
}

.contact-box span {
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 700;
}

@media print {
    @page {
        size: A4;
        margin: 1cm;
    }

    .print-institute-header {
        display: flex !important;
        border-radius: 0;
        padding: 1rem 0;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .brand-left img {
        height: 60px !important;
        /* Slightly smaller for print margins */
        width: auto !important;
    }

    .brand-center h1 {
        white-space: nowrap !important;
        font-size: 1.4rem !important;
        /* Adjusted for single line perfection */
        letter-spacing: 0.5px !important;
    }

    .brand-center p {
        white-space: nowrap !important;
        font-size: 0.75rem !important;
        letter-spacing: 0.5px !important;
        margin: 2px 0 !important;
    }
}

/* Student Info Strip */
.print-student-info {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: white !important;
    border-radius: 12px;
    margin-bottom: 2rem;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.print-student-info div {
    flex: 1;
    text-align: center;
}

.print-student-info strong {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.print-student-info span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Enhance Detailed Analysis Box for Print */
.detailed-analysis-section {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    page-break-inside: auto;
}

.analysis-text-box {
    background: #fff !important;
    border: none !important;
    line-height: 2.5 !important;
    font-size: 1.3rem !important;
    padding: 0 !important;
}

.char-wrong {
    background: #fee2e2 !important;
    border-bottom: 2px solid #ef4444 !important;
    color: #b91c1c !important;
}

.char-missed {
    border-bottom: 2px dashed #f59e0b !important;
    color: #b45309 !important;
}

/* --- SEO TARGET REGIONS SECTION --- */
.seo-regions {
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    position: relative;
    padding: 6rem 0;
}
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3.5rem;
}
.region-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.region-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: var(--shadow-main);
}
.region-card:hover::before {
    opacity: 1;
}
.region-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.region-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}
.region-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}
.region-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}
.region-list li i {
    color: var(--primary);
    font-size: 0.85rem;
}

/* --- FAQ ACCORDION SECTION --- */
.faq-section {
    padding: 6rem 0;
    background: var(--bg-dark);
}
.faq-container {
    max-width: 800px;
    margin: 3.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.faq-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}
.faq-question {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-brand);
    font-size: 1.1rem;
    user-select: none;
}
.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 2rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid transparent;
}
.faq-item.active {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(255, 255, 255, 0.05);
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-item.active .faq-answer {
    max-height: 350px;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--glass-border);
}