/* ==========================================================================
   AzTyping - Practice Arena, Typing Engine Display, Caret & Stats Widgets
   ========================================================================== */

/* ==========================================================================
   PRACTICE SCREEN â€” PREMIUM REDESIGN
   ========================================================================== */

/* MODE SELECTOR BAR */
.practice-mode-bar {
    background: var(--card-bg);
    border-bottom: 1.5px solid rgba(110,68,255,0.1);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.practice-mode-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.mode-pill-group {
    display: flex;
    gap: 6px;
    background: rgba(110,68,255,0.06);
    padding: 5px;
    border-radius: 14px;
    border: 1.5px solid rgba(110,68,255,0.12);
}
.mode-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted, #64748B);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mode-pill:hover { background: rgba(110,68,255,0.1); color: var(--primary-purple, #6E44FF); transform: translateY(-1px); }
.mode-pill.active {
    background: var(--primary-purple, #6E44FF);
    color: #fff;
    box-shadow: 0 4px 14px rgba(110,68,255,0.35);
    transform: translateY(-1px);
}
.practice-bar-controls { display: flex; align-items: center; gap: 10px; }
.control-select {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--card-bg);
    border: 1.5px solid rgba(110,68,255,0.15);
    border-radius: 10px;
    padding: 6px 12px;
    color: var(--text-muted, #64748B);
}
.control-select select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main, #2D3748);
    font-weight: 500;
    cursor: pointer;
    outline: none;
}
.control-icon-btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1.5px solid rgba(110,68,255,0.15);
    background: var(--card-bg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.control-icon-btn:hover { background: var(--primary-purple, #6E44FF); color: #fff; border-color: var(--primary-purple); }

/* CUSTOM TEXT PANEL */
.custom-input-panel {
    margin: 12px 20px;
    padding: 20px 24px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1.5px solid rgba(110,68,255,0.15);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.custom-input-panel h3 { margin: 0 0 12px; font-size: 1.1rem; }
.custom-input-panel textarea {
    width: 100%; border-radius: 12px;
    border: 1.5px solid #CBD5E1; padding: 14px;
    font-family: inherit; font-size: 1rem;
    resize: vertical; outline: none;
    transition: border-color 0.2s;
    background: rgba(248,250,252,0.8);
}
.custom-input-panel textarea:focus { border-color: var(--primary-purple, #6E44FF); }
.custom-input-panel .btn { margin-top: 12px; }

/* Duration & Word Target Chips */
.practice-duration-chips .dur-chip {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(110, 68, 255, 0.2);
    background: #FFFFFF;
    color: var(--text-muted, #64748B);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.practice-duration-chips .dur-chip:hover {
    background: rgba(110, 68, 255, 0.12);
    color: var(--primary-purple, #6E44FF);
    transform: translateY(-1px);
}
.practice-duration-chips .dur-chip.active {
    background: var(--primary-purple, #6E44FF);
    color: #FFFFFF;
    border-color: var(--primary-purple, #6E44FF);
    box-shadow: 0 2px 8px rgba(110, 68, 255, 0.35);
}

/* Shortcut Kbd Badges */
.shortcut-kbd {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted, #64748B);
    font-family: inherit;
    margin-left: 6px;
}

/* LIVE STATS FLOATING BAR */
.live-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 12px 20px;
    background: var(--card-bg, #FFFFFF);
    border-radius: 18px;
    border: 1.5px solid rgba(110,68,255,0.15);
    box-shadow: 0 6px 24px rgba(110,68,255,0.08), 0 2px 6px rgba(0,0,0,0.04);
    padding: 2px 0;
    overflow: hidden;
}
.live-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 10px;
    gap: 3px;
    transition: background 0.2s ease;
}
.live-stat-item:hover { background: rgba(110,68,255,0.04); }
.live-stat-item.timer-stat { background: rgba(110,68,255,0.06); border-radius: 14px; margin: 4px; }
.live-stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted, #94A3B8); }
.live-stat-value { font-size: 1.6rem; font-weight: 900; line-height: 1; font-family: 'JetBrains Mono', 'Outfit', monospace; }
.timer-val { font-size: 1.7rem; color: #6E44FF; }
.live-stat-divider { width: 1px; height: 38px; background: rgba(110,68,255,0.1); flex-shrink: 0; }

/* PRACTICE ARENA */
.practice-arena {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 16px;
    padding: 0 20px 20px;
}
.practice-arena-inner {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px 24px 24px 48px;
    position: relative;
}

/* ARENA HEADER */
.arena-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.arena-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-purple, #6E44FF), #8B5CF6);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(110,68,255,0.3);
}
.arena-goal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(110,68,255,0.08);
    color: var(--text-muted, #64748B);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(110,68,255,0.12);
}

/* SPARKLINE PANEL */
.practice-sparkline-panel { display: flex; flex-direction: column; }
.sparkline-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    height: 100%;
}
.sparkline-title { font-size: 0.9rem; font-weight: 700; margin: 0; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sparkline-svg { width: 100%; border-radius: 8px; background: rgba(110,68,255,0.04); }
.sparkline-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--text-muted); }
.spark-metrics { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(110,68,255,0.1); padding-top: 10px; }
.spark-metric-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.spark-metric-row span { color: var(--text-muted); }
.spark-metric-row strong { font-weight: 700; color: var(--text-main); }
.motivational-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: linear-gradient(135deg, rgba(110,68,255,0.08), rgba(139,92,246,0.06));
    border: 1px solid rgba(110,68,255,0.15);
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: auto;
}
.motivational-tip .tip-emoji { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.motivational-tip p { font-size: 0.78rem; color: var(--text-muted); margin: 0; line-height: 1.4; font-style: italic; }

/* LEGACY COMPAT */
.practice-screen-layout { display: grid; grid-template-columns: 210px 1fr 240px; gap: 18px; }
.time-mode-widget { display: flex; flex-direction: column; gap: 14px; text-align: center; }
.time-left-box { background: #FEF3C7; border-radius: 14px; padding: 14px; }
.timer-big { font-size: 2.2rem; color: #B45309; line-height: 1; margin-top: 4px; }
.practice-info-row { display: flex; justify-content: space-between; font-size: 0.95rem; }
.tag-medium { background: #E0E7FF; color: #4338CA; padding: 2px 8px; border-radius: 6px; font-size: 0.82rem; }
.practice-sticky { transform: rotate(2deg); text-align: center; }
.practice-page { background: var(--card-bg); border-radius: 20px; padding: 24px 24px 24px 45px; position: relative; }
.practice-top-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.select-box select { padding: 6px 12px; border-radius: 10px; border: 1.5px solid #CBD5E1; font-family: inherit; font-size: 1rem; }


/* Dynamic Paragraph Character Spans */
.paragraph-display-text { 
    background: var(--para-bg, linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95))); 
    border: 2px solid rgba(110,68,255,0.16); 
    border-radius: 20px; 
    padding: 26px 30px; 
    font-size: 1.5rem; 
    line-height: 2.05; 
    letter-spacing: 0.04em;
    color: var(--text-main, #1E293B); 
    min-height: 160px; 
    max-height: 220px;
    overflow-y: auto;
    cursor: text; 
    user-select: none; 
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.02), 0 4px 18px rgba(110,68,255,0.04);
    position: relative;
    font-family: 'JetBrains Mono', 'Outfit', monospace;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.paragraph-display-text:focus-within {
    border-color: var(--primary-purple, #6E44FF);
    box-shadow: 0 0 0 3px rgba(110, 68, 255, 0.15);
}
.char-pending { color: #64748B; opacity: 0.75; transition: color 0.08s ease; }
.char-correct { color: #10B981; font-weight: 700; text-shadow: 0 0 1px rgba(16,185,129,0.3); animation: charPop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.char-error { color: #EF4444; font-weight: 700; text-decoration: underline wavy #EF4444; background: rgba(239, 68, 68, 0.16); border-radius: 4px; padding: 0 1px; animation: charShake 0.22s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.char-active { font-weight: 700; padding: 0 1px; color: var(--primary-purple, #6E44FF); }
.char-ghost { border-bottom: 2.5px dashed #94A3B8; background: rgba(0,0,0,0.04); border-radius: 2px; transition: all 0.15s linear; }

/* Caret Styles */
.typing-caret {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    background: var(--primary-purple, #6E44FF);
    border-radius: 2px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(110, 68, 255, 0.8), 0 0 4px #8B5CF6;
    transition: transform 0.09s cubic-bezier(0.2, 0.9, 0.3, 1), height 0.1s ease;
    z-index: 10;
    opacity: 0;
}
.char-active { position: relative; font-weight: bold; }
.caret-line .char-active, .preview-caret-line { border-left: 3.5px solid var(--primary-purple, #6E44FF) !important; background: rgba(110,68,255,0.2) !important; color: var(--text-main); box-shadow: -2px 0 8px rgba(110, 68, 255, 0.4); animation: blinkCaretLine 0.9s infinite; border-radius: 2px 0 0 2px; border-bottom: none !important; }
.caret-block .char-active, .preview-caret-block { background: var(--primary-purple, #6E44FF) !important; color: #FFFFFF !important; border-left: none !important; border-bottom: none !important; border-radius: 4px; box-shadow: 0 0 12px rgba(110, 68, 255, 0.6); animation: blinkCaretBlock 0.9s infinite; padding: 0 4px; }
.caret-underline .char-active, .preview-caret-underline { border-bottom: 3.5px solid var(--primary-purple, #6E44FF) !important; border-left: none !important; color: var(--primary-purple); background: rgba(110, 68, 255, 0.1) !important; animation: blinkCaretUnderline 0.9s infinite; }
.caret-smooth .char-active, .caret-smooth .preview-caret-char { transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1); }

/* Blind Mode */
.blind-mode-active .char-pending, .blind-mode-active .char-correct { color: transparent !important; }

@keyframes charPop { 0% { transform: scale(0.8); opacity: 0.6; } 60% { transform: scale(1.18); } 100% { transform: scale(1); opacity: 1; } }
@keyframes charShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }

@keyframes blinkCaretLine { 0%, 100% { border-left-color: var(--primary-purple, #6E44FF); } 50% { border-left-color: transparent; } }
@keyframes blinkCaretBlock { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blinkCaretUnderline { 0%, 100% { border-bottom-color: var(--primary-purple, #6E44FF); } 50% { border-bottom-color: transparent; } }

.practice-actions-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.hidden-input { opacity: 0; position: absolute; pointer-events: none; width: 1px; height: 1px; }
.btn-text { background: transparent; border: none; color: var(--primary-purple); font-size: 1.1rem; cursor: pointer; font-weight: bold; transition: transform 0.2s ease; }
.btn-text:hover { transform: translateX(3px); }


/* ====================================================== */
/* ENHANCEMENT STYLES: Devanagari, Scorecard & Heatmap   */
/* ====================================================== */

/* Hindi Devanagari Font Support */
.font-devanagari, 
[data-lang="hindi_mangal"],
[data-lang="hindi_kruti"] {
    font-family: 'Hind', 'Gotu', 'Noto Sans Devanagari', sans-serif !important;
}

/* Print Stylesheet for Official Govt Exam Scorecard */
@media print {
    body * {
        visibility: hidden;
    }
    #govtScorecardModal, 
    #govtScorecardModal * {
        visibility: visible;
    }
    #govtScorecardModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        padding: 0 !important;
    }
    #govtScorecardModal button {
        display: none !important;
    }
    .scorecard-paper {
        border: 2px solid #000 !important;
        box-shadow: none !important;
        max-width: 100% !important;
    }
}

/* Interactive Keyboard Heatmap Styling */
.badge-weak-key {
    transition: transform 0.15s ease;
}
.badge-weak-key:hover {
    transform: scale(1.05);
}


/* ==========================================================================
   COMPACT DUAL-PANE ARENA STYLING (ZERO-SCROLL SMART UX)
   ========================================================================== */
.compact-exam-arena {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    width: 100%;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.compact-exam-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: linear-gradient(135deg, rgba(110,68,255,0.05), rgba(139,92,246,0.02));
    border: 1.5px solid rgba(110,68,255,0.15);
    padding: 12px 16px;
    border-radius: 16px;
}
.header-row-1, .header-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
}
.header-row-1 {
    border-bottom: 1px dashed rgba(110,68,255,0.12);
    padding-bottom: 8px;
}
.compact-cand-badge { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-main); font-weight: 700; white-space: nowrap; }
.roll-sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; font-family: monospace; }
.locked-micro { background: #DCFCE7; color: #15803D; font-size: 0.65rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; border: 1px solid #86EFAC; white-space: nowrap; }

.exam-preset-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-pill {
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--card-bg);
    border: 1.5px solid rgba(0,0,0,0.09);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.preset-pill:hover { background: rgba(110,68,255,0.06); color: var(--primary-purple); }
.preset-pill.active {
    background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
    color: #5B21B6;
    border-color: #8B5CF6;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(110, 68, 255, 0.15);
}

.compact-hud { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.hud-item { background: var(--card-bg); border: 1px solid rgba(0,0,0,0.08); padding: 4px 10px; border-radius: 8px; font-family: 'Outfit', sans-serif !important; }
.timer-item { background: #EDE9FE; color: #5B21B6; border-color: #C084FC; font-size: 0.92rem; font-weight: 800; }
.net-item { color: #16A34A; }
.err-item { color: #DC2626; }

.header-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-compact-rules {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(0,0,0,0.12);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-compact-rules:hover { background: rgba(0,0,0,0.04); color: var(--text-main); }
.btn-compact-start {
    padding: 8px 18px !important;
    font-size: 0.88rem !important;
    font-weight: 800 !important;
    border-radius: 10px !important;
    font-family: 'Outfit', sans-serif !important;
}

/* LIVE TARGET STROKE PROGRESS METER */
.stroke-target-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--card-bg);
    border: 1.5px solid rgba(110,68,255,0.12);
    padding: 10px 14px;
    border-radius: 12px;
}
.stroke-lbl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}
.stroke-lbl-row strong { color: var(--primary-purple); }
.mistake-breakdown-tag {
    background: #FEF3C7;
    color: #92400E;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #F59E0B;
}

/* 50% / 50% SIDE-BY-SIDE SPLIT GRID */
.compact-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    align-items: stretch;
}
.exam-passage-box, .exam-input-box {
    border-radius: 14px;
    border: 1.5px solid rgba(110,68,255,0.15);
    overflow: hidden;
    background: var(--card-bg);
}
.passage-box-header, .input-box-header {
    background: rgba(110,68,255,0.07);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #5B21B6;
    font-family: 'Outfit', sans-serif !important;
    border-bottom: 1.5px solid rgba(110,68,255,0.12);
}
.exam-pattern-dropdown {
    padding: 6px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(110,68,255,0.25);
    background: var(--card-bg);
    color: var(--primary-purple);
    font-size: 0.82rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif !important;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}
.exam-pattern-dropdown:hover, .exam-pattern-dropdown:focus {
    border-color: #6E44FF;
    box-shadow: 0 2px 10px rgba(110,68,255,0.15);
}

.compact-passage-text {
    min-height: 280px;
    max-height: 480px;
    height: auto;
    line-height: 1.85;
    padding: 16px;
    font-family: 'Courier Prime', 'Consolas', monospace !important;
    font-size: 1.15rem;
    color: var(--text-main);
    background: var(--card-bg);
    overflow-y: auto;
    box-sizing: border-box;
}
.compact-textarea {
    min-height: 280px;
    max-height: 480px;
    height: 340px;
    line-height: 1.85;
    padding: 16px;
    font-family: 'Courier Prime', 'Consolas', monospace !important;
    font-size: 1.15rem;
    color: var(--text-main);
    background: var(--card-bg);
    resize: vertical;
    box-sizing: border-box;
}

.exam-select {
    font-family: inherit; font-size: 0.9rem; font-weight: 600;
    background: var(--card-bg); color: var(--text-main); outline: none;
    transition: border-color 0.2s;
}
.exam-select:focus { border-color: var(--primary-purple, #6E44FF); }

.exam-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.exam-metric-card {
    background: var(--card-bg);
    border: 1.5px solid rgba(110,68,255,0.12);
    border-radius: 14px;
    padding: 12px 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.exam-metric-card.timer-card { background: rgba(110,68,255,0.04); border-color: rgba(110,68,255,0.25); }
.metric-lbl { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.metric-val { font-size: 1.6rem; font-weight: 800; font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.metric-val-sm { font-size: 1.05rem; font-weight: 800; color: var(--text-main); margin-top: 2px; }
.mistakes-tag { font-size: 0.75rem; font-weight: 700; color: #EF4444; }

.exam-passage-box {
    margin-bottom: 18px;
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 14px;
    overflow: hidden;
    background: #FFFDF5;
}
.passage-box-header {
    display: flex; justify-content: space-between; align-items: center;
    background: #FEF3C7; padding: 10px 16px; border-bottom: 1px solid #FDE68A;
}
.passage-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 0.85rem; color: #92400E; }
.copy-disabled-tag { font-size: 0.72rem; background: #FDE68A; color: #78350F; padding: 2px 8px; border-radius: 12px; font-weight: 700; }
.passage-font-controls { display: flex; gap: 4px; }
.btn-font-size {
    width: 28px; height: 28px; border-radius: 6px;
    border: 1px solid #F59E0B; background: #FFF; color: #78350F;
    font-weight: 800; font-size: 0.8rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.btn-font-size:hover { background: #FEF3C7; }

.exam-passage-content {
    padding: 18px;
    font-family: 'Courier Prime', monospace, sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1E293B;
    max-height: 180px;
    overflow-y: auto;
    user-select: none;
    -webkit-user-select: none;
}
.exam-word-correct { color: #16A34A; font-weight: 700; background: rgba(22,163,74,0.1); padding: 1px 3px; border-radius: 3px; }
.exam-word-error { color: #DC2626; font-weight: 700; background: rgba(220,38,38,0.15); text-decoration: underline wavy #DC2626; padding: 1px 3px; border-radius: 3px; }
.exam-word-current { background: #6E44FF; color: #FFF; font-weight: 700; padding: 2px 5px; border-radius: 4px; box-shadow: 0 0 8px rgba(110,68,255,0.4); }
.exam-word-pending { color: #475569; }

.exam-input-box {
    margin-bottom: 20px;
    border: 1.5px solid rgba(110,68,255,0.2);
    border-radius: 14px;
    overflow: hidden;
    background: var(--card-bg);
}
.input-box-header {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(110,68,255,0.06); padding: 10px 16px; border-bottom: 1px solid rgba(110,68,255,0.12);
    font-weight: 800; font-size: 0.85rem; color: var(--primary-purple);
}
.input-status-tag { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.exam-textarea {
    width: 100%; height: 160px; padding: 16px;
    border: none; outline: none;
    font-family: 'Courier Prime', monospace, sans-serif;
    font-size: 1.1rem; line-height: 1.8;
    color: var(--text-main); background: transparent;
    resize: none; box-sizing: border-box;
}
.exam-textarea:disabled { background: rgba(241,245,249,0.5); cursor: not-allowed; }

.btn-exam-start {
    width: 100%; padding: 16px;
    font-size: 1.15rem; font-weight: 800;
    border-radius: 14px; border: none;
    box-shadow: 0 6px 20px rgba(110,68,255,0.35);
    cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
}
.btn-exam-start:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(110,68,255,0.45); }


/* ====================================================== */
/* FEATURE 5: SMOOTH TYPING CARET                         */
/* ====================================================== */
.typing-caret {
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5px;
    height: 1.4em;
    background: #6E44FF;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(110,68,255,0.7);
    pointer-events: none;
    transition: transform 60ms ease-out, height 60ms ease;
    animation: az-caret-blink 1s step-end infinite;
    z-index: 10;
}
@keyframes az-caret-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
.typing-area-active .typing-caret { animation: none; opacity: 1; }


/* ====================================================== */
/* FEATURE 6: TEST PROGRESS BAR                           */
/* ====================================================== */
.test-progress-track {
    width: 100%;
    height: 5px;
    background: rgba(110,68,255,0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 14px;
    position: relative;
}
.test-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #6E44FF, #a78bfa);
    border-radius: 5px;
    transition: width 0.9s linear, background 0.4s;
    box-shadow: 0 0 8px rgba(110,68,255,0.4);
}
.test-progress-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
    position: absolute;
    right: 0;
    top: -18px;
}


/* ====================================================== */
/* UPGRADE A: FINGER PLACEMENT VISUALIZER                 */
/* ====================================================== */
.finger-placement-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(110,68,255,0.08);
    border: 1px dashed rgba(110,68,255,0.3);
    border-radius: 10px;
    padding: 6px 14px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}
.finger-placement-bar strong {
    color: #6E44FF;
}

/* Active Finger Target Key Glows */
.key.finger-target-left-pinky   { background: rgba(239, 68, 68, 0.25) !important; border-color: #ef4444 !important; box-shadow: 0 0 12px rgba(239, 68, 68, 0.5) !important; color: #dc2626 !important; }
.key.finger-target-left-ring    { background: rgba(249, 115, 22, 0.25) !important; border-color: #f97316 !important; box-shadow: 0 0 12px rgba(249, 115, 22, 0.5) !important; color: #ea580c !important; }
.key.finger-target-left-middle  { background: rgba(234, 179, 8, 0.25) !important; border-color: #eab308 !important; box-shadow: 0 0 12px rgba(234, 179, 8, 0.5) !important; color: #ca8a04 !important; }
.key.finger-target-left-index   { background: rgba(16, 185, 129, 0.25) !important; border-color: #10b981 !important; box-shadow: 0 0 12px rgba(16, 185, 129, 0.5) !important; color: #059669 !important; }
.key.finger-target-thumbs       { background: rgba(110, 68, 255, 0.25) !important; border-color: #6E44FF !important; box-shadow: 0 0 12px rgba(110, 68, 255, 0.5) !important; color: #5b21b6 !important; }
.key.finger-target-right-index  { background: rgba(6, 182, 212, 0.25) !important; border-color: #06b6d4 !important; box-shadow: 0 0 12px rgba(6, 182, 212, 0.5) !important; color: #0891b2 !important; }
.key.finger-target-right-middle { background: rgba(59, 130, 246, 0.25) !important; border-color: #3b82f6 !important; box-shadow: 0 0 12px rgba(59, 130, 246, 0.5) !important; color: #2563eb !important; }
.key.finger-target-right-ring   { background: rgba(168, 85, 247, 0.25) !important; border-color: #a855f7 !important; box-shadow: 0 0 12px rgba(168, 85, 247, 0.5) !important; color: #9333ea !important; }
.key.finger-target-right-pinky  { background: rgba(236, 72, 153, 0.25) !important; border-color: #ec4899 !important; box-shadow: 0 0 12px rgba(236, 72, 153, 0.5) !important; color: #db2777 !important; }


/* ====================================================== */
/* UPGRADE B: CUSTOM DOCUMENT DROP ZONE                   */
/* ====================================================== */
.file-drop-zone {
    border: 2px dashed rgba(110, 68, 255, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    text-align: center;
    background: rgba(110, 68, 255, 0.04);
    cursor: pointer;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: all 0.2s ease;
}
.file-drop-zone:hover, .file-drop-zone.dragover {
    border-color: #6E44FF;
    background: rgba(110, 68, 255, 0.1);
    transform: translateY(-1px);
}


/* ====================================================== */
/* UPGRADE C: LIVE SPEEDOMETER GAUGE                      */
/* ====================================================== */
.speedometer-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 4px;
}


/* ====================================================== */
/* SCRIPT TYPOGRAPHY REFINEMENT RULES                    */
/* ====================================================== */
.paragraph-display-text.lang-kruti {
    font-family: 'Kruti Dev 010', 'KrutiDev 010', 'Devanagari', sans-serif !important;
    font-size: 1.65rem !important;
    line-height: 2.1em !important;
    letter-spacing: 0.02em;
}
.paragraph-display-text.lang-mangal {
    font-family: 'Mukta', 'Hind', 'Noto Sans Devanagari', sans-serif !important;
    font-size: 1.55rem !important;
    line-height: 2.1em !important;
}
.paragraph-display-text.lang-marathi {
    font-family: 'Baloo 2', 'Mukta', 'Noto Sans Devanagari', sans-serif !important;
    font-size: 1.55rem !important;
    line-height: 2.1em !important;
}
.paragraph-display-text.lang-punjabi {
    font-family: 'Noto Sans Gurmukhi', 'Baloo 2', sans-serif !important;
    font-size: 1.55rem !important;
    line-height: 2.1em !important;
}
.paragraph-display-text.lang-code {
    font-family: 'Fira Code', 'JetBrains Mono', monospace !important;
    font-size: 1.25rem !important;
    line-height: 1.8em !important;
}
