/* tick/assets/css/tick-arena.css - High-Security Examination Arena Design System & Comprehensive Responsive Framework */
:root {
    --bg-dark: #070d17;
    --bg-card: #0d1726;
    --bg-card-hover: #142338;
    --border: #1e293b;
    --border-glow: rgba(56, 189, 248, 0.4);
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --gold: #d4af37;
    --gold-light: #f3c64c;
    --emerald: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
}

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

body { 
    background: var(--bg-dark); 
    color: var(--text-white); 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}

/* Base Container */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
    width: 100%;
}

/* ==========================================================================
   TOP SECURITY NAVBAR (Lobby & Results)
   ========================================================================== */
.tick-topbar {
    background: rgba(13, 23, 38, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 15px;
}
.tick-brand { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-decoration: none;
}
.tick-badge-pulse {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    position: relative;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.4);
    flex-shrink: 0;
}
.pulse-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 1px solid var(--primary-light);
    animation: pulseRing 2s infinite ease-out;
}
@keyframes pulseRing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.25); opacity: 0; }
}

.subdomain-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    font-weight: 700;
    line-height: 1.2;
}
.tick-brand h1 { 
    font-family: 'Cinzel', serif; 
    font-size: 1.15rem; 
    color: #fff; 
    letter-spacing: 0.5px; 
    line-height: 1.2;
}

.topbar-meta { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    flex-wrap: wrap;
}
.security-chip {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}
.back-link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ==========================================================================
   LOBBY / VERIFICATION MAIN CONTENT
   ========================================================================== */
.lobby-main { 
    flex: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 2.5rem 1.5rem; 
}
.lobby-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
    position: relative;
    box-sizing: border-box;
}
.lobby-header { text-align: center; margin-bottom: 1.75rem; }
.arena-icon-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(13, 23, 38, 0.9));
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    color: var(--primary-light);
    box-shadow: 0 0 25px rgba(2, 132, 199, 0.35);
}
.lobby-header h2 { 
    font-family: 'Cinzel', serif; 
    font-size: 1.45rem; 
    margin-bottom: 8px; 
    color: #fff; 
    line-height: 1.3;
}
.lobby-header p { 
    font-size: 0.88rem; 
    color: var(--text-muted); 
    line-height: 1.5; 
}

.tick-alert {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}
.tick-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: #fca5a5;
}

.form-group-tick { margin-bottom: 1.5rem; }
.form-group-tick label { 
    display: block; 
    font-size: 0.85rem; 
    font-weight: 700; 
    color: #fff; 
    margin-bottom: 8px; 
}
.input-with-icon { position: relative; }
.input-with-icon i { 
    position: absolute; 
    left: 16px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--text-muted); 
    font-size: 1.1rem; 
}
.input-with-icon input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 48px;
    background: rgba(7, 13, 23, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}
.input-with-icon input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.3); 
}
.field-hint { 
    display: block; 
    font-size: 0.78rem; 
    color: var(--text-muted); 
    margin-top: 6px; 
    line-height: 1.4;
}

/* Action Buttons */
.btn-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.9rem 1.4rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    line-height: 1.2;
    box-sizing: border-box;
}
.btn-tick:active {
    transform: scale(0.98);
}
.btn-tick-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.3);
}
.btn-tick-primary:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}
.btn-tick-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-tick-outline:hover { 
    background: rgba(255, 255, 255, 0.05); 
    color: #fff; 
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-tick-lg { 
    font-size: 1rem; 
    padding: 1.05rem 1.5rem; 
}

/* Action Rows */
.lobby-action-row {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    width: 100%;
}
.lobby-action-row > * {
    flex: 1;
}
.lobby-action-row .btn-tick-lg {
    flex: 2;
}

/* Countdown Boxes Component */
.countdown-boxes-wrap {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    width: 100%;
}
.time-box-tick {
    background: rgba(7, 13, 23, 0.9);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 65px;
    text-align: center;
    flex: 0 1 auto;
    box-sizing: border-box;
}
.time-box-tick span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    display: block;
    line-height: 1.1;
}
.time-box-tick small {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* Rules Preview */
.rules-preview {
    margin-top: 1.75rem;
    background: rgba(7, 13, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
}
.rules-preview h4 { 
    font-size: 0.88rem; 
    color: #fff; 
    margin-bottom: 0.75rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.rules-preview ul { 
    list-style: none; 
    display: grid; 
    gap: 8px; 
    font-size: 0.82rem; 
    color: var(--text-muted); 
}
.rules-preview ul li { 
    display: flex; 
    align-items: flex-start; 
    gap: 8px; 
    line-height: 1.4;
}
.rules-preview ul li i {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Candidate Verified Box */
.candidate-profile-box {
    background: rgba(7, 13, 23, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.profile-header { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 1.25rem; 
    border-bottom: 1px solid var(--border); 
    padding-bottom: 1rem; 
}
.avatar-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.15);
    border: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-light);
    flex-shrink: 0;
}
.profile-meta h3 { 
    font-size: 1.2rem; 
    color: #fff; 
    margin-bottom: 3px; 
    line-height: 1.3;
}
.profile-meta p { 
    font-size: 0.82rem; 
    color: var(--text-muted); 
    line-height: 1.4;
    word-break: break-word;
}
.verified-badge { 
    font-size: 0.72rem; 
    color: var(--emerald); 
    font-weight: 800; 
    text-transform: uppercase; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
    margin-bottom: 4px; 
}

.exam-info-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px; 
}
.info-cell { 
    background: rgba(13, 23, 38, 0.8); 
    padding: 10px 14px; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.05); 
}
.info-cell .label { 
    display: block; 
    font-size: 0.74rem; 
    color: var(--text-muted); 
    margin-bottom: 3px; 
}
.info-cell .val { 
    font-size: 0.9rem; 
    font-weight: 700; 
    color: #fff; 
    line-height: 1.4;
    word-break: break-word;
}

.badge-status { 
    display: inline-block; 
    padding: 2px 8px; 
    border-radius: 4px; 
    font-size: 0.72rem; 
    font-weight: 800; 
    text-transform: uppercase; 
}
.status-paid, .status-verified { 
    background: rgba(16, 185, 129, 0.2); 
    color: #86efac; 
    border: 1px solid var(--emerald); 
}
.status-pending { 
    background: rgba(245, 158, 11, 0.2); 
    color: #fde68a; 
    border: 1px solid var(--warning); 
}

.anti-cheat-agreement {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.25rem;
}
.agreement-checkbox { 
    display: flex; 
    align-items: flex-start; 
    gap: 10px; 
    font-size: 0.85rem; 
    color: #fca5a5; 
    cursor: pointer; 
    line-height: 1.4; 
}
.agreement-checkbox input { 
    margin-top: 3px; 
    accent-color: var(--danger); 
    width: 18px; 
    height: 18px; 
    flex-shrink: 0;
}

.tick-footer { 
    text-align: center; 
    padding: 1.5rem 1rem; 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    border-top: 1px solid var(--border); 
    line-height: 1.5;
}

/* ==========================================================================
   EXAM ARENA SCREEN STYLES (arena.php)
   ========================================================================== */
.arena-body { 
    background: #040810; 
    height: 100vh; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
}

.arena-navbar {
    background: #091220;
    border-bottom: 2px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    gap: 12px;
}
.arena-candidate-badge { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.cand-name-meta strong {
    color: #fff;
    font-size: 0.95rem;
    display: block;
}
.cand-name-meta small {
    color: var(--text-muted);
    font-size: 0.75rem;
    display: block;
}
.cand-roll-pill { 
    background: rgba(56, 189, 248, 0.15); 
    border: 1px solid var(--primary); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 0.85rem; 
    color: var(--primary-light); 
    font-weight: 800; 
    white-space: nowrap;
}

.arena-timer-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(13, 23, 38, 0.95);
    border: 2px solid var(--gold);
    padding: 6px 18px;
    border-radius: 9999px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    white-space: nowrap;
}
.arena-timer-box.timer-warning {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
    animation: timerFlash 1s infinite alternate;
}
@keyframes timerFlash {
    0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); }
}
.timer-icon { font-size: 1.25rem; color: var(--gold-light); }
.timer-digits { 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 1.45rem; 
    font-weight: 900; 
    color: #fff; 
    letter-spacing: 1px; 
}

.arena-meta-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.arena-violations-chip {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #fca5a5;
    font-weight: 700;
    white-space: nowrap;
}

/* Arena Layout: Split View */
.arena-workspace {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 340px;
    height: calc(100vh - 65px);
    overflow: hidden;
}

.arena-question-area {
    padding: 2rem 2.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.question-card-active {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}
.question-top-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.25rem; 
    gap: 10px;
}
.q-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.q-category-pill { 
    background: rgba(2, 132, 199, 0.15); 
    border: 1px solid var(--primary); 
    color: var(--primary-light); 
    font-size: 0.78rem; 
    font-weight: 700; 
    padding: 4px 10px; 
    border-radius: 9999px; 
    text-transform: uppercase; 
    white-space: nowrap;
}
.q-number-tag { 
    font-family: 'JetBrains Mono', monospace; 
    font-weight: 800; 
    font-size: 0.9rem; 
    color: var(--gold-light); 
    white-space: nowrap;
}

.question-text-heading {
    font-size: 1.28rem;
    line-height: 1.55;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.75rem;
    word-break: break-word;
}

/* Options Grid */
.options-list { display: grid; gap: 12px; }
.option-item {
    background: rgba(7, 13, 23, 0.85);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-height: 54px;
    box-sizing: border-box;
}
.option-item:hover {
    border-color: var(--primary);
    background: rgba(2, 132, 199, 0.08);
    transform: translateX(4px);
}
.option-item:active {
    transform: scale(0.99);
}
.option-item.selected {
    border-color: var(--primary-light);
    background: rgba(2, 132, 199, 0.2);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}
.option-key {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.15s;
}
.option-item.selected .option-key {
    background: var(--primary);
    color: #fff;
}
.option-text { 
    font-size: 1rem; 
    color: var(--text-white); 
    font-weight: 600; 
    line-height: 1.4; 
    word-break: break-word;
}

/* Arena Controls Bar */
.arena-controls-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}
#btn_next {
    margin-left: auto;
}

/* Question Palette (Sidebar) */
.arena-sidebar {
    background: #091220;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    box-sizing: border-box;
}
.palette-header h3 { 
    font-size: 1rem; 
    font-weight: 800; 
    margin-bottom: 1rem; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
}
.palette-btn {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(7, 13, 23, 0.8);
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.palette-btn:hover { border-color: var(--primary); color: #fff; }
.palette-btn.current { border: 2px solid var(--primary-light); box-shadow: 0 0 10px var(--primary); color: #fff; }
.palette-btn.answered { background: #065f46; border-color: #10b981; color: #d1fae5; }
.palette-btn.flagged { background: #78350f; border-color: #f59e0b; color: #fef3c7; }

.palette-legend {
    display: grid;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(7, 13, 23, 0.5);
    padding: 10px;
    border-radius: 8px;
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-answered { background: #10b981; }
.dot-unanswered { background: #64748b; }
.dot-flagged { background: #f59e0b; }

.submit-exam-wrap {
    margin-top: 1.5rem;
    width: 100%;
}
.btn-submit-exam {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-submit-exam:hover { 
    background: linear-gradient(135deg, #059669, #047857); 
    transform: translateY(-2px); 
}

/* Modals (Violation & Submit Confirmation) */
.security-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    padding: 1rem;
    box-sizing: border-box;
}
.security-modal-card {
    background: #1e1313;
    border: 2px solid var(--danger);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.6);
    animation: shakeModal 0.4s ease-in-out;
    box-sizing: border-box;
}
@keyframes shakeModal {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}
.security-icon { font-size: 3rem; color: var(--danger); margin-bottom: 1rem; }
.security-modal-card h3 { font-size: 1.4rem; color: #fff; margin-bottom: 8px; line-height: 1.3; }
.security-modal-card p { font-size: 0.9rem; color: #fca5a5; line-height: 1.5; margin-bottom: 1.5rem; }
.modal-btn-row {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ==========================================================================
   RESULTS / SCORE CARD SCREEN (result.php)
   ========================================================================== */
.result-container { 
    max-width: 800px; 
    margin: 2.5rem auto; 
    padding: 0 1.5rem; 
    width: 100%;
    box-sizing: border-box;
}
.scorecard-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    position: relative;
    box-sizing: border-box;
}
.scorecard-card.gold-border { border-color: var(--gold); }
.scorecard-card.red-border { border-color: var(--danger); }

.scorecard-header {
    text-align: center;
    border-bottom: 2px dashed var(--border);
    padding-bottom: 1.75rem;
    margin-bottom: 2rem;
}
.score-emblem {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
}
.score-emblem.emblem-gold {
    background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(13,23,38,0.9));
    border: 2px solid var(--gold);
    color: var(--gold-light);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.35);
}
.score-emblem.emblem-red {
    background: rgba(239,68,68,0.2);
    border: 2px solid var(--danger);
    color: #fca5a5;
}

.score-big-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}
.score-stat-box {
    background: rgba(7, 13, 23, 0.75);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    box-sizing: border-box;
}
.score-stat-box h4 { 
    font-size: 0.78rem; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    font-weight: 700; 
    margin-bottom: 6px; 
}
.score-stat-box .number { 
    font-family: 'JetBrains Mono', monospace; 
    font-size: 1.8rem; 
    font-weight: 900; 
    color: #fff; 
}
.score-stat-box .number.gold { color: var(--gold-light); }
.score-stat-box .number.green { color: var(--emerald); }

.details-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 2rem; 
}
.details-table td { 
    padding: 12px 14px; 
    border-bottom: 1px solid var(--border); 
    font-size: 0.92rem; 
    word-break: break-word;
}
.details-table td:first-child { 
    color: var(--text-muted); 
    font-weight: 600; 
    width: 40%; 
}
.details-table td:last-child { 
    color: #fff; 
    font-weight: 700; 
}

.violation-pill-wrap {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: rgba(7, 13, 23, 0.85);
    border: 1px solid var(--danger);
    border-radius: 30px;
    padding: 8px 24px;
    color: #fca5a5;
    font-weight: 800;
    font-size: 0.92rem;
    box-sizing: border-box;
}

.actions-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.review-section { margin-top: 2rem; }
.review-item {
    background: rgba(7, 13, 23, 0.6);
    border-left: 4px solid var(--border);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 12px;
}
.review-item.item-correct { border-left-color: var(--emerald); }
.review-item.item-wrong { border-left-color: var(--danger); }
.review-item-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE BREAKPOINTS (A to Z Mobile & Tablet Optimization)
   ========================================================================== */

/* 1. Tablets and Small Laptops (<= 992px) */
@media (max-width: 992px) {
    .arena-body {
        height: auto !important;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    .arena-workspace {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }
    .arena-question-area {
        padding: 1.5rem 1.25rem !important;
        overflow: visible !important;
        height: auto !important;
    }
    .arena-sidebar {
        border-left: none !important;
        border-top: 2px solid var(--border) !important;
        padding: 1.5rem 1.25rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)) !important;
        gap: 8px !important;
    }
    .palette-legend {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-around !important;
        gap: 10px !important;
        padding: 10px 8px !important;
    }
}

/* 2. Standard Mobile & Tablets (<= 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .arena-navbar {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-areas:
            "badge meta"
            "timer timer" !important;
        gap: 8px 10px !important;
        padding: 0.65rem 0.85rem !important;
    }
    .arena-candidate-badge {
        grid-area: badge !important;
        overflow: hidden !important;
        gap: 8px !important;
    }
    .cand-name-meta {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .cand-name-meta strong {
        font-size: 0.88rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .cand-name-meta small {
        font-size: 0.7rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .cand-roll-pill {
        padding: 3px 8px !important;
        font-size: 0.78rem !important;
        flex-shrink: 0 !important;
    }
    .arena-meta-actions {
        grid-area: meta !important;
        gap: 8px !important;
        justify-content: flex-end !important;
    }
    .arena-violations-chip {
        padding: 4px 8px !important;
        font-size: 0.72rem !important;
    }
    .arena-timer-box {
        grid-area: timer !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 5px 14px !important;
        box-sizing: border-box !important;
    }
    .timer-digits {
        font-size: 1.25rem !important;
    }

    .question-card-active {
        padding: 1.5rem 1.25rem !important;
        border-radius: 14px !important;
    }
    .question-text-heading {
        font-size: 1.12rem !important;
        margin-bottom: 1.25rem !important;
    }
}

/* 3. Phablets & Mobile Viewports (<= 680px) */
@media (max-width: 680px) {
    /* Arena Navigation Bar in 2x2 Clean Grid */
    .arena-controls-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        padding-top: 0.85rem !important;
    }
    #btn_prev {
        grid-column: 1 !important;
        grid-row: 1 !important;
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0.85rem 0.5rem !important;
        font-size: 0.88rem !important;
    }
    #btn_next {
        grid-column: 2 !important;
        grid-row: 1 !important;
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0.85rem 0.5rem !important;
        font-size: 0.88rem !important;
    }
    #btn_flag {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.78rem !important;
    }
    #btn_clear {
        grid-column: 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
        padding: 0.75rem 0.5rem !important;
        font-size: 0.78rem !important;
    }

    /* Topbar wrapping */
    .tick-topbar {
        padding: 0.65rem 0;
    }
    .topbar-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .topbar-meta {
        width: 100% !important;
        justify-content: space-between !important;
        gap: 6px !important;
    }
    .tick-brand h1 {
        font-size: 1rem !important;
    }
    .tick-badge-pulse {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.05rem !important;
    }

    /* Lobby Card & Exam Grid */
    .lobby-main {
        padding: 1.25rem 0.75rem !important;
    }
    .lobby-card {
        padding: 1.5rem 1.15rem !important;
        border-radius: 14px !important;
    }
    .arena-icon-wrap {
        width: 58px !important;
        height: 58px !important;
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    .lobby-header h2 {
        font-size: 1.25rem !important;
    }
    .exam-info-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    /* Lobby Action Buttons Stack */
    .lobby-action-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .lobby-action-row > * {
        width: 100% !important;
        flex: none !important;
    }

    /* Results Screen */
    .result-container {
        padding: 0 0.85rem !important;
        margin: 1.25rem auto !important;
    }
    .scorecard-card {
        padding: 1.5rem 1rem !important;
        border-radius: 14px !important;
    }
    .score-emblem {
        width: 68px !important;
        height: 68px !important;
        font-size: 2rem !important;
    }
    .scorecard-header h2 {
        font-size: 1.35rem !important;
    }
    .score-big-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .score-stat-box {
        padding: 0.95rem 0.5rem !important;
    }
    .score-stat-box .number {
        font-size: 1.45rem !important;
    }

    /* Details Table Card-like Rows on Mobile */
    .details-table, 
    .details-table tbody, 
    .details-table tr, 
    .details-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .details-table tr {
        margin-bottom: 10px !important;
        border-bottom: 1px solid var(--border) !important;
        padding-bottom: 8px !important;
    }
    .details-table td {
        border-bottom: none !important;
        padding: 2px 0 !important;
    }
    .details-table td:first-child {
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        color: var(--text-muted) !important;
    }
    .details-table td:last-child {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #fff !important;
    }

    .violation-pill-wrap {
        flex-direction: column !important;
        gap: 6px !important;
        border-radius: 12px !important;
        padding: 10px 14px !important;
        text-align: center !important;
        width: 100% !important;
    }

    .actions-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .actions-row > * {
        width: 100% !important;
        justify-content: center !important;
    }

    .review-item-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    /* Modal buttons */
    .modal-btn-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .modal-btn-row .btn-tick {
        width: 100% !important;
    }
}

/* 4. Compact Mobile Phones (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    /* Countdown Boxes Fluid Resizing */
    .countdown-boxes-wrap {
        gap: 6px !important;
    }
    .time-box-tick {
        min-width: 0 !important;
        padding: 6px 4px !important;
        flex: 1 1 0 !important;
    }
    .time-box-tick span {
        font-size: 1.15rem !important;
    }
    .time-box-tick small {
        font-size: 0.65rem !important;
    }

    .question-card-active {
        padding: 1.25rem 0.85rem !important;
    }
    .question-top-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .question-text-heading {
        font-size: 1.05rem !important;
        line-height: 1.5 !important;
    }
    .option-item {
        padding: 0.85rem 0.95rem !important;
        gap: 10px !important;
        min-height: 48px !important;
    }
    .option-key {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
    .option-text {
        font-size: 0.92rem !important;
    }
    .palette-grid {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 6px !important;
    }
    .palette-btn {
        font-size: 0.88rem !important;
    }
    .security-modal-card {
        padding: 1.5rem 1rem !important;
    }
}

/* 5. Ultra Compact Mobile (<= 360px - e.g. iPhone SE 1st gen, Galaxy Fold outer) */
@media (max-width: 360px) {
    .cand-name-meta {
        display: none !important;
    }
    .subdomain-tag {
        font-size: 0.65rem !important;
    }
    .tick-brand h1 {
        font-size: 0.92rem !important;
    }
    .security-chip {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }
    .back-link {
        font-size: 0.72rem !important;
        padding: 4px 8px !important;
    }
    .time-box-tick span {
        font-size: 1rem !important;
    }
    .time-box-tick small {
        font-size: 0.6rem !important;
    }
    .palette-grid {
        gap: 4px !important;
    }
}

/* 6. Print Stylesheet */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .tick-topbar, .actions-row, .review-section, .tick-footer, .arena-navbar, .arena-controls-bar, .arena-sidebar { display: none !important; }
    .scorecard-card { border: 2px solid #000 !important; box-shadow: none !important; background: #fff !important; color: #000 !important; }
    .score-stat-box { border: 1px solid #ccc !important; background: #f9f9f9 !important; }
    .score-stat-box .number, .scorecard-header h2, .details-table td { color: #000 !important; }
}
