* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

/* === DARK MODE MẶC ĐỊNH === */
:root {
    --bg-main: #0f1419;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --bg-card: #1e2530;
    --bg-card-2: #252d3a;
    --bg-input: #2a3441;
    --bg-hover: #2d3748;
    --text-main: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #8a8d91;
    --border: #3a4452;
    --primary: #7c8cf8;
    --primary-dark: #5d6fd9;
    --accent: #ff6b6b;
    --accent-2: #54a0ff;
    --success: #1dd1a1;
    --warning: #feca57;
    --danger: #ee5253;
    --shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-main);
    transition: background 0.3s, color 0.3s;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* === HEADER === */
.header {
    background: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}
.header .container { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; flex-wrap: wrap; }
.logo { font-size: 24px; font-weight: bold; color: var(--primary); }
.pro-badge { background: linear-gradient(45deg, var(--accent), var(--warning)); color: white; padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.nav-btn {
    background: none;
    border: none;
    padding: 10px 18px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s;
    color: var(--text-main);
}
.nav-btn:hover, .nav-btn.active { background: var(--primary); color: white; }

/* Nút chuyển sáng/tối */
.theme-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 14px;
    margin-left: 10px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    transition: 0.3s;
}
.theme-toggle:hover { background: var(--primary); color: white; }

/* === SECTIONS === */
.section { display: none; padding: 30px 0; }
.section.active { display: block; }

/* === HERO === */
.hero { text-align: center; color: var(--text-main); padding: 60px 20px; }
.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { font-size: 20px; margin-bottom: 30px; color: var(--text-secondary); }

/* === BUTTONS === */
.btn-primary, .btn-secondary, .btn-info, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    margin: 5px;
    transition: 0.3s;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #c0392b); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(238,82,83,0.4); }
.btn-secondary { background: linear-gradient(135deg, var(--accent-2), #2e86de); color: white; }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(84,160,255,0.4); }
.btn-info { background: linear-gradient(135deg, var(--success), #10ac84); color: white; }
.btn-info:hover { transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg, var(--danger), #c0392b); color: white; }
.btn-danger:hover { transform: translateY(-2px); }

/* === FEATURES === */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 40px; }
.feature-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
}
.feature-card:focus { outline: 2px solid var(--primary); outline-offset: 3px; }
.feature-card:active { transform: translateY(-2px) scale(0.98); }
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.feature-card .icon { font-size: 45px; margin-bottom: 12px; }
.feature-card h3 { color: var(--text-main); margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); }

/* === MAIN CONTAINERS === */
#create .container, #list .container, #doQuiz .container, #result .container, #stats .container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
h2 { color: var(--text-main); margin-bottom: 25px; padding-bottom: 10px; border-bottom: 3px solid var(--primary); }
h3, h4 { color: var(--text-main); }

/* === IMPORT BOX === */
.import-box {
    background: linear-gradient(135deg, #2d1b4e, #4a2c5a);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}
.import-box h3 { color: var(--warning); margin-bottom: 12px; }
.import-buttons { display: flex; flex-wrap: wrap; gap: 8px; }

/* === FORM === */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-input);
    color: var(--text-main);
    transition: 0.3s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124,140,248,0.2);
}

#searchQuiz {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
    border: 2px solid var(--border) !important;
}

/* === QUESTION CARD === */
.question-card {
    background: var(--bg-card-2);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
}
.option-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.option-row input[type="text"] { flex: 1; }
.option-row input[type="radio"] { accent-color: var(--primary); width: 20px; height: 20px; }

.action-buttons { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 5px; }

/* === QUIZ LIST === */
.quiz-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.quiz-item {
    background: linear-gradient(135deg, var(--bg-card-2), #2d3748);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.quiz-item:hover { transform: translateY(-3px); border-color: var(--primary); }
.quiz-item h3 { color: var(--text-main); margin-bottom: 10px; }
.quiz-item p { color: var(--text-secondary); font-size: 14px; }
.quiz-item .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin: 10px 0; }
.quiz-item .btn-group { display: flex; flex-wrap: wrap; gap: 5px; }
.quiz-item button { padding: 8px 12px; font-size: 13px; margin: 2px; }

/* === DO QUIZ === */
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; flex-wrap: wrap; }
.timer {
    background: linear-gradient(135deg, var(--accent), #c0392b);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(238,82,83,0.4);
}
.progress-bar { width: 100%; height: 8px; background: var(--bg-input); border-radius: 4px; margin-bottom: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); width: 0%; transition: width 0.3s; }

.do-question {
    background: var(--bg-card-2);
    padding: 20px;
    margin: 15px 0;
    border-radius: 10px;
    border-left: 4px solid var(--accent-2);
}
.do-question h4 { color: var(--text-main); margin-bottom: 12px; }
.do-question label {
    display: block;
    padding: 12px;
    margin: 5px 0;
    background: var(--bg-input);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
    transition: 0.2s;
    border: 1px solid transparent;
}
.do-question label:hover { background: var(--bg-hover); border-color: var(--primary); }
.do-question input[type="radio"] { accent-color: var(--primary); margin-right: 10px; }

/* === RESULT (v1.5.1 — refreshed UI) === */
.result-box {
    position: relative;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    color: white;
    padding: 32px 24px 28px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 12px 35px rgba(124,140,248,0.35);
    overflow: hidden;
    animation: resultPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
    animation: resultShine 3s ease-in-out infinite;
}
.result-box.score-excellent { background: linear-gradient(135deg, #f6d365, #fda085); box-shadow: 0 12px 35px rgba(253,160,133,0.45); }
.result-box.score-good      { background: linear-gradient(135deg, #43e97b, #38f9d7); box-shadow: 0 12px 35px rgba(67,233,123,0.4); }
.result-box.score-average   { background: linear-gradient(135deg, #4facfe, #00f2fe); box-shadow: 0 12px 35px rgba(79,172,254,0.4); }
.result-box.score-weak      { background: linear-gradient(135deg, #fa709a, #fee140); box-shadow: 0 12px 35px rgba(250,112,154,0.4); }
@keyframes resultPop {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes resultShine {
    0%, 100% { transform: translate(-10%, -10%); }
    50% { transform: translate(10%, 10%); }
}
.result-emoji-big {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: emojiBounce 0.8s ease;
}
@keyframes emojiBounce {
    0%   { transform: scale(0) rotate(-180deg); }
    60%  { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0); }
}
.result-score-big {
    font-size: 64px !important;
    font-weight: 800;
    margin: 4px 0 6px !important;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}
.result-score-max {
    font-size: 28px;
    font-weight: 500;
    opacity: 0.85;
}
.result-grade {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 18px !important;
    position: relative;
    z-index: 1;
}
.result-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0 14px;
    position: relative;
    z-index: 1;
}
.result-stat {
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 12px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid rgba(255,255,255,0.2);
}
.result-stat-icon { font-size: 22px; line-height: 1; }
.result-stat-val  { font-size: 18px; font-weight: 700; margin-top: 2px; }
.result-stat-lbl  { font-size: 11px; opacity: 0.85; }
.result-progress-ring { margin-top: 8px; position: relative; z-index: 1; }
.result-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    overflow: hidden;
}
.result-progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
}
.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.result-actions button {
    flex: 1 1 140px;
    min-width: 130px;
}
.review-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 14px;
    padding: 12px 14px;
    background: var(--bg-card-2);
    border-radius: 10px;
    border-left: 4px solid var(--accent-2);
}
.result-box h3 { font-size: 48px; margin-bottom: 10px; }
.review-question { padding: 15px; margin: 10px 0; border-radius: 8px; transition: background 0.2s ease, transform 0.15s ease; }
.correct { background: rgba(29,209,161,0.15); border-left: 4px solid var(--success); color: var(--text-main); }
.wrong { background: rgba(238,82,83,0.15); border-left: 4px solid var(--danger); color: var(--text-main); }
/* Câu sai có thể bấm để xem chi tiết */
.review-question.wrong { cursor: pointer; user-select: none; }
.review-question.wrong:hover { background: rgba(238,82,83,0.25); transform: translateX(2px); }
.review-question.correct { cursor: default; }
.review-toggle-hint {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: var(--danger);
    opacity: 0.85;
    font-weight: 600;
}
.review-question.wrong:not(.collapsed) .review-toggle-hint { opacity: 1; }
.review-detail { line-height: 1.6; font-size: 14px; }

/* === STATS === */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.stat-card {
    position: relative;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    color: white;
    padding: 22px 18px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(124,140,248,0.3);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: default;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(124,140,248,0.45);
}
.stat-card .icon {
    font-size: 28px;
    margin-bottom: 6px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.stat-card .num { font-size: 32px; font-weight: bold; line-height: 1.1; }
.stat-card .label { font-size: 13px; opacity: 0.92; margin-top: 4px; }
.stat-card .sub { font-size: 11px; opacity: 0.75; margin-top: 2px; }

/* Stat card colour variants */
.stat-card.variant-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.stat-card.variant-2 { background: linear-gradient(135deg, #11998e, #38ef7d); box-shadow: 0 4px 15px rgba(56,239,125,0.3); }
.stat-card.variant-3 { background: linear-gradient(135deg, #f7971e, #ffd200); color: #2c2c2c; box-shadow: 0 4px 15px rgba(247,151,30,0.35); }
.stat-card.variant-3 .label, .stat-card.variant-3 .sub { color: #3a3a3a; }
.stat-card.variant-4 { background: linear-gradient(135deg, #ee0979, #ff6a00); box-shadow: 0 4px 15px rgba(238,9,121,0.3); }
.stat-card.variant-5 { background: linear-gradient(135deg, #2193b0, #6dd5ed); box-shadow: 0 4px 15px rgba(33,147,176,0.3); }
.stat-card.variant-6 { background: linear-gradient(135deg, #232526, #414345); box-shadow: 0 4px 15px rgba(0,0,0,0.4); }

/* Time-window stats row */
.stats-timewindow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}
.tw-card {
    background: var(--bg-card-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
    color: var(--text-main);
    transition: transform .2s ease, border-color .2s ease;
}
.tw-card:hover { transform: translateY(-2px); border-color: var(--primary); }
.tw-card .tw-num { font-size: 24px; font-weight: bold; color: var(--primary); }
.tw-card .tw-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.tw-card .tw-avg { font-size: 11px; color: var(--text-muted); margin-top: 2px; opacity: 0.85; }

.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.chart-box {
    background: var(--bg-card-2);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.chart-box h3 { margin-bottom: 15px; color: var(--text-main); }

/* Per-quiz stats */
.pq-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px dashed var(--border);
    color: var(--text-main);
}
.pq-row:last-child { border-bottom: none; }
.pq-row .pq-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-row .pq-metric { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.pq-row .pq-metric b { color: var(--text-main); }
.pq-row .pq-best {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}
.pq-empty { text-align: center; color: var(--text-muted); padding: 20px; font-style: italic; }

/* History header & toolbar */
.history-header {
    margin-top: 30px;
    margin-bottom: 10px;
}
.history-header h3 { margin: 0 0 12px 0; color: var(--text-main); }
.history-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.history-search, .history-filter {
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.history-search { flex: 1 1 200px; min-width: 0; }
.history-filter { flex: 0 0 auto; }
.history-search:focus, .history-filter:focus { border-color: var(--primary); }
.history-btn { padding: 8px 14px; font-size: 13px; flex: 0 0 auto; width: auto !important; }

.history-item {
    background: var(--bg-card-2);
    padding: 14px 16px;
    margin: 10px 0;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-main);
    transition: transform .15s ease, box-shadow .15s ease;
}
.history-item:hover { transform: translateX(2px); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.history-item .h-info { flex: 1 1 220px; min-width: 0; }
.history-item small { color: var(--text-muted); display: block; margin-top: 3px; }
.history-item .h-actions { display: flex; gap: 8px; align-items: center; }
.history-item .score-badge {
    background: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}
.history-item .score-badge.excellent { background: linear-gradient(135deg, #11998e, #38ef7d); }
.history-item .score-badge.good { background: linear-gradient(135deg, #2193b0, #6dd5ed); }
.history-item .score-badge.average { background: linear-gradient(135deg, #f7971e, #ffd200); color: #2c2c2c; }
.history-item .score-badge.weak { background: linear-gradient(135deg, #ee0979, #ff6a00); }
.history-item.left-excellent { border-left-color: #38ef7d; }
.history-item.left-good { border-left-color: #6dd5ed; }
.history-item.left-average { border-left-color: #ffd200; }
.history-item.left-weak { border-left-color: #ff6a00; }
.history-item .h-delete {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 8px;
    width: 32px; height: 32px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
    padding: 0;
}
.history-item .h-delete:hover {
    background: rgba(238,82,83,0.15);
    border-color: #ee5253;
    color: #ee5253;
}
.history-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 15px;
}
.history-empty .emoji { font-size: 48px; display: block; margin-bottom: 10px; opacity: 0.6; }

/* === MODAL === */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); }
.modal-content {
    background: var(--bg-card);
    color: var(--text-main);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.close { position: absolute; right: 20px; top: 10px; font-size: 32px; cursor: pointer; color: var(--text-muted); }
.close:hover { color: var(--accent); }
.modal pre {
    background: var(--bg-input);
    color: var(--text-main);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    border: 1px solid var(--border);
}
.modal h2, .modal h3 { color: var(--text-main); margin-top: 15px; }
.modal ul li { color: var(--text-secondary); margin: 5px 0; }

/* === LIGHT MODE (khi bấm nút chuyển) === */
body.light-mode {
    --bg-main: #f0f2f5;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: #ffffff;
    --bg-card-2: #f8f9fa;
    --bg-input: #ffffff;
    --bg-hover: #e3f2fd;
    --text-main: #1c1e21;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    --border: #e0e0e0;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.light-mode .hero h1 {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === OLED MODE (v1.6.1) - true black for AMOLED displays (battery saving) === */
body.oled-mode {
    --bg-main: #000000;
    --bg-gradient: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    --bg-card: #050505;
    --bg-card-2: #0a0a0a;
    --bg-input: #000000;
    --bg-hover: #111111;
    --text-main: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border: #1a1a1a;
    --shadow: 0 4px 15px rgba(0,0,0,0.8);
}
body.oled-mode {
    background: #000000 !important;
}
body.oled-mode .particle { background: rgba(255,255,255,0.15); }
body.oled-mode header,
body.oled-mode .modal-content,
body.oled-mode .quiz-item,
body.oled-mode .stat-card,
body.oled-mode .history-item {
    background: #050505 !important;
    border: 1px solid #1a1a1a;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ============================================
   📱 MOBILE RESPONSIVE - HỖ TRỢ ĐIỆN THOẠI
   ============================================ */

/* === Menu Hamburger === */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 101;
}

/* === Mobile Menu Overlay === */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* === Tablet (≤1024px) === */
@media (max-width: 1024px) {
    .container { padding: 15px; }
    .hero h1 { font-size: 38px; }
    .charts-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr 1fr; }
}

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
    body { font-size: 15px; }
    .container { padding: 10px; }

    /* Header với hamburger */
    .header .container { 
        padding: 12px 15px;
        flex-wrap: nowrap;
    }
    .logo { font-size: 20px; }
    .pro-badge { font-size: 10px; padding: 2px 8px; }
    
    .hamburger { display: block; }
    
    nav {
        position: fixed;
        top: 0; right: -280px;
        width: 260px;
        height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        align-items: stretch;
        padding: 70px 15px 20px;
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        display: flex;
        gap: 8px;
        overflow-y: auto;
    }
    nav.mobile-open { right: 0; }
    
    .nav-btn {
        margin: 0;
        padding: 14px 18px;
        text-align: left;
        font-size: 16px;
        border-radius: 10px;
        width: 100%;
    }
    .nav-btn::after { display: none; }
    .nav-btn.active { background: var(--primary); color: white; }
    
    .theme-toggle {
        margin: 10px 0 0;
        padding: 14px;
        width: 100%;
        font-size: 18px;
    }

    /* Hero */
    .hero { padding: 30px 15px; }
    .hero h1 { font-size: 28px; line-height: 1.3; }
    .hero p { font-size: 15px; }
    .hero .btn-primary { padding: 14px 28px; font-size: 16px; }

    /* Features */
    .features { grid-template-columns: 1fr; gap: 15px; margin-top: 25px; }
    .feature-card { padding: 20px; }
    .feature-card .icon { font-size: 38px; }
    .feature-card h3 { font-size: 17px; }

    /* Main containers */
    #create .container, #list .container, 
    #doQuiz .container, #result .container, 
    #stats .container {
        padding: 18px 15px;
        border-radius: 12px;
    }
    h2 { font-size: 22px; margin-bottom: 18px; }
    h3 { font-size: 17px; }
    h4 { font-size: 15px; }

    /* Form */
    .form-row { grid-template-columns: 1fr; gap: 10px; }
    .form-group input, .form-group textarea, .form-group select {
        padding: 14px;
        font-size: 16px; /* Tránh zoom trên iOS */
    }
    .form-group textarea { min-height: 80px; }

    /* Buttons full width trên mobile */
    .btn-primary, .btn-secondary, .btn-info, .btn-danger {
        padding: 14px 18px;
        font-size: 15px;
        margin: 4px 0;
        width: 100%;
    }
    .action-buttons { 
        flex-direction: column;
        gap: 8px;
    }
    .action-buttons button { width: 100%; margin: 0; }

    /* Import box */
    .import-box { padding: 15px; }
    .import-box h3 { font-size: 16px; }
    .import-buttons { flex-direction: column; gap: 6px; }
    .import-buttons label, .import-buttons button { 
        width: 100%; 
        text-align: center;
        margin: 0;
    }

    /* Question card */
    .question-card { padding: 15px; }
    .option-row { 
        flex-wrap: nowrap;
        gap: 8px;
    }
    .option-row input[type="radio"] { 
        width: 22px; 
        height: 22px;
        flex-shrink: 0;
    }
    .option-row input[type="text"] {
        font-size: 15px;
        padding: 10px;
    }

    /* Quiz list */
    .quiz-list { grid-template-columns: 1fr; gap: 12px; }
    .quiz-item { padding: 16px; }
    .quiz-item h3 { font-size: 17px; }
    .quiz-item .btn-group { 
        flex-direction: column;
        gap: 6px;
    }
    .quiz-item .btn-group button { 
        width: 100%; 
        margin: 0;
        font-size: 14px;
        padding: 10px;
    }

    /* Do quiz */
    .quiz-header { 
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .quiz-header h2 { 
        text-align: center;
        font-size: 18px;
    }
    .timer { 
        text-align: center;
        font-size: 20px;
        padding: 12px;
    }
    .do-question { padding: 15px; }
    .do-question h4 { 
        font-size: 16px;
        line-height: 1.5;
    }
    .do-question label { 
        padding: 14px 12px;
        font-size: 15px;
        line-height: 1.4;
    }
    .do-question input[type="radio"] {
        width: 22px;
        height: 22px;
        margin-right: 12px;
    }

    /* Result */
    .result-box { padding: 25px 15px; }
    .result-box h3 { font-size: 42px; }
    .result-box p { font-size: 15px; }
    .review-question { padding: 12px; font-size: 14px; }

    /* Stats */
    .stats-overview { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .stat-card { padding: 14px 8px; border-radius: 12px; }
    .stat-card .icon { font-size: 22px; margin-bottom: 3px; }
    .stat-card .num { font-size: 22px; }
    .stat-card .label { font-size: 11px; }
    .stat-card .sub { font-size: 10px; }
    .stats-timewindow { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tw-card { padding: 10px 6px; }
    .tw-card .tw-num { font-size: 18px; }
    .tw-card .tw-label { font-size: 11px; }
    .charts-grid { gap: 15px; grid-template-columns: 1fr; }
    .chart-box { padding: 15px; }
    .history-toolbar { flex-direction: column; gap: 6px; }
    .history-search, .history-filter, .history-btn { width: 100% !important; flex: 1 1 auto; }
    .pq-row { grid-template-columns: 1fr auto; gap: 6px; padding: 8px 6px; }
    .pq-row .pq-metric { font-size: 11px; }
    .history-item { 
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }
    .history-item .h-actions { align-self: flex-end; }
    .history-item .score-badge { align-self: flex-start; }

    /* Modal */
    .modal-content { 
        margin: 10% 10px;
        padding: 20px 15px;
        max-height: 85vh;
    }
    .modal pre { 
        font-size: 11px;
        padding: 10px;
    }

    /* Search input */
    #searchQuiz { 
        padding: 14px !important;
        font-size: 16px !important;
    }

    /* Toast */
    .toast {
        top: 15px;
        right: 10px;
        left: 10px;
        padding: 12px 18px;
        font-size: 14px;
        text-align: center;
    }
    @keyframes toastSlideIn {
        from { opacity: 0; transform: translateY(-40px); }
        to { opacity: 1; transform: translateY(0); }
    }

    /* Tắt một số animation nặng trên mobile */
    .particles { display: none; }
    .feature-card:hover { transform: translateY(-3px); }
    .quiz-item:hover { transform: translateY(-2px); }
}

/* === Mobile nhỏ (≤480px) === */
@media (max-width: 480px) {
    .logo { font-size: 18px; }
    .pro-badge { display: none; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    h2 { font-size: 19px; }
    
    .stats-overview { grid-template-columns: 1fr 1fr; }
    .stat-card .num { font-size: 24px; }
    
    .result-box h3 { font-size: 36px; }
    .timer { font-size: 18px; }
    
    nav { width: 240px; right: -260px; }
}

/* === Landscape mobile === */
@media (max-width: 768px) and (orientation: landscape) {
    .hero { padding: 20px 15px; }
    .hero h1 { font-size: 24px; }
    nav { padding-top: 55px; }
}

/* === Touch device tối ưu === */
@media (hover: none) and (pointer: coarse) {
    /* Tăng vùng chạm cho nút */
    .btn-primary, .btn-secondary, .btn-info, .btn-danger,
    .nav-btn, .theme-toggle {
        min-height: 44px; /* Apple HIG khuyến nghị */
    }
    
    /* Tắt hover effect khó chịu trên touch */
    .feature-card:hover, .quiz-item:hover {
        transform: none;
    }
    
    /* Tăng vùng chạm cho radio/checkbox */
    input[type="radio"], input[type="checkbox"] {
        min-width: 22px;
        min-height: 22px;
    }
    
    /* Label dễ chạm hơn */
    .do-question label {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}

/* === Safe area cho iPhone notch === */
@supports (padding: env(safe-area-inset-top)) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
    nav {
        padding-top: calc(70px + env(safe-area-inset-top));
        padding-bottom: env(safe-area-inset-bottom);
    }
}
/* ============================================
   ✨ HIỆU ỨNG CHUYỂN ĐỘNG (ANIMATIONS)
   ============================================ */

/* === Hiệu ứng chuyển theme mượt mà === */
body, .header, .feature-card, .question-card, .quiz-item, 
.do-question, .stat-card, .chart-box, .history-item, 
.modal-content, .form-group input, .form-group textarea, 
.form-group select, .btn-primary, .btn-secondary, 
.btn-info, .btn-danger, .nav-btn, .theme-toggle {
    transition: background 0.4s ease, color 0.4s ease, 
                border-color 0.4s ease, box-shadow 0.3s ease,
                transform 0.3s ease;
}

/* === Hiệu ứng chuyển section (fade + slide) === */
.section.active {
    animation: sectionFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Hero animation === */
.hero h1 {
    animation: heroTitle 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero p {
    animation: heroSubtitle 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero .btn-primary {
    animation: heroButton 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes heroTitle {
    from { opacity: 0; transform: translateY(-40px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroSubtitle {
    0% { opacity: 0; transform: translateY(-20px); }
    40% { opacity: 0; }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroButton {
    0% { opacity: 0; transform: scale(0.8); }
    60% { opacity: 0; }
    100% { opacity: 1; transform: scale(1); }
}

/* === Feature cards xuất hiện tuần tự === */
.feature-card {
    animation: cardPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
@keyframes cardPopIn {
    from { opacity: 0; transform: translateY(40px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Feature card hover 3D === */
.feature-card { cursor: pointer; }
.feature-card:hover {
    transform: translateY(-10px) rotateX(5deg) scale(1.03);
    box-shadow: 0 20px 40px rgba(124,140,248,0.3);
}
.feature-card .icon {
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feature-card:hover .icon {
    transform: rotate(15deg) scale(1.3);
}

/* === Button hover & click ripple === */
.btn-primary, .btn-secondary, .btn-info, .btn-danger {
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-primary::before, .btn-secondary::before, 
.btn-info::before, .btn-danger::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: -1;
}
.btn-primary:hover::before, .btn-secondary:hover::before, 
.btn-info:hover::before, .btn-danger:hover::before {
    width: 300px; height: 300px;
}
.btn-primary:active, .btn-secondary:active, 
.btn-info:active, .btn-danger:active {
    transform: scale(0.95);
}

/* === Nav button underline animation === */
.nav-btn {
    position: relative;
}
.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}
.nav-btn:hover::after, .nav-btn.active::after {
    width: 70%;
}

/* === Question card slide-in === */
.question-card {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Quiz item hover === */
.quiz-item {
    animation: cardPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.quiz-item:nth-child(1) { animation-delay: 0.05s; }
.quiz-item:nth-child(2) { animation-delay: 0.1s; }
.quiz-item:nth-child(3) { animation-delay: 0.15s; }
.quiz-item:nth-child(4) { animation-delay: 0.2s; }
.quiz-item:nth-child(5) { animation-delay: 0.25s; }
.quiz-item:nth-child(6) { animation-delay: 0.3s; }
.quiz-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(124,140,248,0.4);
}

/* === Do question xuất hiện tuần tự === */
.do-question {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.do-question:nth-child(1) { animation-delay: 0.05s; }
.do-question:nth-child(2) { animation-delay: 0.1s; }
.do-question:nth-child(3) { animation-delay: 0.15s; }
.do-question:nth-child(4) { animation-delay: 0.2s; }
.do-question:nth-child(5) { animation-delay: 0.25s; }
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Hover đáp án khi làm bài === */
.do-question label {
    position: relative;
    overflow: hidden;
}
.do-question label::before {
    content: '';
    position: absolute;
    left: -100%; top: 0;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124,140,248,0.2), transparent);
    transition: left 0.5s;
}
.do-question label:hover::before { left: 100%; }
.do-question label:hover { 
    transform: translateX(8px); 
    border-left: 4px solid var(--primary);
}
.do-question input[type="radio"]:checked + * {
    color: var(--primary);
    font-weight: bold;
}

/* === Timer nhấp nháy khi sắp hết giờ === */
.timer.warning {
    animation: timerPulse 1s infinite;
}
@keyframes timerPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 10px rgba(238,82,83,0.4); }
    50% { transform: scale(1.1); box-shadow: 0 4px 20px rgba(238,82,83,0.8); }
}

/* === Progress bar shimmer === */
.progress-fill {
    position: relative;
    overflow: hidden;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* === Result box bounce === */
.result-box {
    animation: resultBounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.result-box h3 {
    animation: scoreCountUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
}
@keyframes resultBounce {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    60% { transform: scale(1.05) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes scoreCountUp {
    from { opacity: 0; transform: translateY(-20px) scale(0.5); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Review questions xuất hiện tuần tự === */
.review-question {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}
.review-question:nth-child(1) { animation-delay: 0.1s; }
.review-question:nth-child(2) { animation-delay: 0.2s; }
.review-question:nth-child(3) { animation-delay: 0.3s; }
.review-question:nth-child(4) { animation-delay: 0.4s; }
.review-question:nth-child(5) { animation-delay: 0.5s; }
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Stat cards với hiệu ứng số đếm === */
.stat-card {
    animation: cardPopIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(124,140,248,0.5);
}
.stat-card .num {
    display: inline-block;
    animation: numberPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s backwards;
}
@keyframes numberPop {
    from { opacity: 0; transform: scale(0) rotate(180deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

/* === Modal animation === */
.modal {
    animation: modalFade 0.3s ease;
}
.modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-50px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Logo hover wiggle === */
.logo {
    cursor: pointer;
    transition: transform 0.3s;
}
.logo:hover {
    animation: wiggle 0.5s;
}
@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* === Theme toggle xoay === */
.theme-toggle {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle:hover {
    transform: rotate(360deg) scale(1.2);
}

/* === Input focus glow === */
.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    animation: inputGlow 1.5s ease-in-out infinite alternate;
}
@keyframes inputGlow {
    from { box-shadow: 0 0 0 3px rgba(124,140,248,0.2); }
    to { box-shadow: 0 0 0 5px rgba(124,140,248,0.4); }
}

/* === Toast notification === */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--success), #10ac84);
    color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 9999;
    font-weight: 600;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.error { background: linear-gradient(135deg, var(--danger), #c0392b); }
.toast.warning { background: linear-gradient(135deg, var(--warning), #f39c12); color: #333; }
.toast.hide { animation: toastSlideOut 0.4s forwards; }
@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(400px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastSlideOut {
    to { opacity: 0; transform: translateX(400px); }
}

/* === Loading spinner === */
.spinner {
    display: inline-block;
    width: 40px; height: 40px;
    border: 4px solid rgba(124,140,248,0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Particle background === */
.particles {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(124,140,248,0.3);
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    from { transform: translateY(100vh) translateX(0) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(-100px) translateX(100px) scale(1); opacity: 0; }
}
body.light-mode .particle { background: rgba(255,255,255,0.5); }

/* === Pro badge pulse === */
.pro-badge {
    display: inline-block;
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,107,107,0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(255,107,107,0); }
}

/* === Correct/Wrong review pulse === */
.review-question.correct { animation: slideInRight 0.5s, correctFlash 0.6s 0.5s; }
.review-question.wrong { animation: slideInRight 0.5s, wrongShake 0.5s 0.5s; }
@keyframes correctFlash {
    0%, 100% { background: rgba(29,209,161,0.15); }
    50% { background: rgba(29,209,161,0.4); }
}
@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* === Section content stagger === */
h2 {
    animation: titleSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes titleSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === Disable animation cho user thích đơn giản === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
/* ============================================
   📡 OFFLINE MODE & ⌨️ PHÍM TẮT
   ============================================ */

/* === Connection Status === */
.connection-status {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    z-index: 9998;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    font-size: 14px;
}
.connection-status.show {
    transform: translateX(-50%) translateY(0);
}
.connection-status.online {
    background: linear-gradient(135deg, var(--success), #10ac84);
    color: white;
}
.connection-status.offline {
    background: linear-gradient(135deg, var(--warning), #f39c12);
    color: #333;
}

/* === Install Banner === */
.install-banner {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 2px solid var(--primary);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9997;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 90%;
    animation: bannerSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.install-banner.show { display: flex; }
.install-banner span { color: var(--text-main); font-size: 14px; }
@keyframes bannerSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(50px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* === Shortcut Floating Button === */
.shortcut-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    color: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(124,140,248,0.5);
    z-index: 998;
    transition: transform 0.3s;
}
.shortcut-btn:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 8px 25px rgba(124,140,248,0.7);
}

/* === Kbd styling === */
kbd {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    color: var(--primary);
    font-family: 'Consolas', monospace;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    margin: 0 2px;
}

/* === Shortcut Table === */
.shortcut-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px;
}
.shortcut-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 14px;
}
.shortcut-table td:first-child {
    width: 45%;
    text-align: left;
}
.shortcut-table tr:hover { background: var(--bg-hover); }

/* === Highlight đáp án khi dùng phím tắt === */
.do-question label.keyboard-selected {
    border: 2px solid var(--primary);
    background: rgba(124,140,248,0.15);
    transform: translateX(8px);
}

/* === Highlight câu hiện tại === */
.do-question.current-question {
    border-left-width: 6px;
    border-left-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,107,107,0.2);
}

/* === Offline indicator ở header === */
.offline-dot {
    display: none;
    width: 10px;
    height: 10px;
    background: var(--warning);
    border-radius: 50%;
    margin-left: 8px;
    animation: pulseDot 1.5s infinite;
}
.offline-dot.show { display: inline-block; }
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shortcut-btn { 
        width: 45px; 
        height: 45px; 
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
    .install-banner {
        bottom: 75px;
        font-size: 13px;
        padding: 10px 15px;
    }
    .connection-status {
        top: 60px;
        font-size: 13px;
        padding: 8px 18px;
    }
    .shortcut-table td { font-size: 13px; padding: 8px; }
    kbd { font-size: 11px; padding: 3px 6px; }
}
/* === SỬA LỖI: Label upload file phải clickable === */
.import-buttons label {
    cursor: pointer;
    user-select: none;
    position: relative;
    z-index: 10;
}
.import-buttons label input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Đảm bảo button không bị chặn bởi particles */
.particles { 
    pointer-events: none !important;
    z-index: 0 !important;
}
header, .section, .modal, .install-banner, .shortcut-btn, .toast {
    position: relative;
    z-index: 1;
}
header { z-index: 100; }
.modal { z-index: 1000; }
.toast { z-index: 9999; }
.shortcut-btn { z-index: 998; }
.install-banner { z-index: 9997; }


/* === TAB TRẠNG THÁI CÂU HỎI (FLOATING) === */
.question-status-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 280px;
    max-width: calc(100vw - 40px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 95;
    display: none;
    overflow: hidden;
    color: var(--text-main);
    font-size: 13px;
    transition: all 0.25s ease;
}
.question-status-panel.visible { display: block; }
.question-status-panel.collapsed .qsp-body { display: none; }
.question-status-panel.collapsed .qsp-toggle { transform: rotate(-90deg); }

.qsp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    cursor: pointer;
    user-select: none;
}
.qsp-title { font-weight: 600; font-size: 13px; }
.qsp-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12px;
}
.qsp-stat {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11.5px;
    white-space: nowrap;
}
.qsp-stat-correct { background: rgba(34,197,94,0.85); color: #fff; }
.qsp-stat-wrong { background: rgba(239,68,68,0.85); color: #fff; }
.qsp-stat-total { background: rgba(255,255,255,0.2); color: #fff; }

.qsp-toggle {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.25s;
    padding: 0 4px;
}

.qsp-body { padding: 10px 12px 12px 12px; max-height: 50vh; overflow-y: auto; }
.qsp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}
.qsp-legend span { display: flex; align-items: center; gap: 4px; }
.qsp-legend .dot {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}
.qsp-legend .dot.answered { background: var(--success); }
.qsp-legend .dot.correct { background: #22c55e; }
.qsp-legend .dot.wrong { background: #ef4444; }
.qsp-legend .dot.empty { background: var(--bg-input); border: 1px solid var(--border); }

.qsp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
}
.qsp-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.15s;
}
.qsp-cell:hover { transform: scale(1.08); border-color: var(--primary); }
.qsp-cell.answered {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.qsp-cell.correct {
    background: #22c55e;
    color: #fff;
    border-color: #16a34a;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.4);
}
.qsp-cell.wrong {
    background: #ef4444;
    color: #fff;
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(239,68,68,0.4);
    animation: qspShake 0.35s ease;
}
@keyframes qspShake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}
@media (max-width: 600px) {
    .question-status-panel { width: 240px; right: 10px; bottom: 70px; }
    .qsp-body { max-height: 40vh; }
    /* Trên mobile: panel mặc định ẨN, chỉ hiện khi có cả class 'visible' và 'mobile-shown' */
    .question-status-panel.visible { display: none; }
    .question-status-panel.visible.mobile-shown { display: block; }
}

/* === Nút nổi ẩn/hiện tab trạng thái (chỉ mobile) === */
.qsp-mobile-toggle {
    display: none; /* Mặc định ẩn trên desktop */
    position: fixed;
    right: 10px;
    bottom: 10px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    z-index: 97;
    transition: transform 0.2s ease, background 0.2s ease;
    align-items: center;
    justify-content: center;
}
.qsp-mobile-toggle:hover { transform: scale(1.08); }
.qsp-mobile-toggle.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
@media (max-width: 600px) {
    /* Chỉ hiện nút khi panel đang ở chế độ "khả dụng" (đang làm bài) */
    .question-status-panel.visible ~ .qsp-mobile-toggle,
    body.qsp-active .qsp-mobile-toggle {
        display: flex;
    }
}

/* ============================================================
   v1.6.0 — PRACTICE MODE STYLES
   ============================================================ */
.practice-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.practice-stat {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(124, 140, 248, 0.15);
    color: var(--text, #e0e0e0);
}
.practice-stat-correct { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.practice-stat-wrong { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.practice-stat-total { background: rgba(124, 140, 248, 0.2); color: #7c8cf8; }

.practice-content {
    margin: 24px 0;
}
.practice-question {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
body.light-mode .practice-question {
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}
.practice-q-number {
    color: #7c8cf8;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.practice-q-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--text, #f0f0f0);
}
body.light-mode .practice-q-text { color: #222; }

.practice-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.practice-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
body.light-mode .practice-option {
    background: #f7f7fb;
    border-color: #d8d8e0;
}
.practice-option:hover:not(.disabled):not(.correct):not(.wrong) {
    background: rgba(124, 140, 248, 0.15);
    border-color: #7c8cf8;
    transform: translateX(4px);
}
.practice-letter {
    font-weight: 700;
    color: #7c8cf8;
    min-width: 24px;
}
.practice-opt-text {
    flex: 1;
    line-height: 1.5;
}
.practice-option.correct {
    background: rgba(76, 175, 80, 0.18);
    border-color: #4caf50;
    color: #4caf50;
    animation: pulseCorrect 0.5s ease;
}
.practice-option.correct .practice-letter { color: #4caf50; }
.practice-option.wrong {
    background: rgba(244, 67, 54, 0.18);
    border-color: #f44336;
    color: #f44336;
    animation: shakeWrong 0.4s ease;
}
.practice-option.wrong .practice-letter { color: #f44336; }
.practice-option.disabled {
    opacity: 0.5;
    cursor: default;
}
@keyframes pulseCorrect {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
@keyframes shakeWrong {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.practice-feedback {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
}
.practice-feedback.right {
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    border-left: 4px solid #4caf50;
}
.practice-feedback.wrong {
    background: rgba(244, 67, 54, 0.12);
    color: #f44336;
    border-left: 4px solid #f44336;
}
body.light-mode .practice-feedback.right { color: #2e7d32; }
body.light-mode .practice-feedback.wrong { color: #c62828; }

.practice-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}
.practice-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================
   v1.6.0 — FLASHCARD MODE STYLES
   ============================================================ */
.flashcard-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.flashcard-stat {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    background: rgba(124, 140, 248, 0.15);
}
.flashcard-stat-known { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.flashcard-stat-unknown { background: rgba(255, 152, 0, 0.2); color: #ff9800; }

.flashcard-wrapper {
    perspective: 1500px;
    margin: 30px auto;
    max-width: 700px;
    width: 100%;
}
.flashcard {
    width: 100%;
    min-height: 360px;
    cursor: pointer;
    outline: none;
}
.flashcard-inner {
    position: relative;
    width: 100%;
    min-height: 360px;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}
.flashcard-inner.flipped {
    transform: rotateY(180deg);
}
.flashcard-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 360px;
    max-height: 70vh;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    padding: 28px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    text-align: center;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) transparent;
}
.flashcard-face::-webkit-scrollbar {
    width: 6px;
}
.flashcard-face::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 4px;
}
.flashcard-face::-webkit-scrollbar-track {
    background: transparent;
}
.flashcard-front {
    background: linear-gradient(135deg, #7c8cf8 0%, #5a6cf0 100%);
    color: #fff;
}
.flashcard-back {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: #fff;
    transform: rotateY(180deg);
}
body.light-mode .flashcard-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
body.light-mode .flashcard-back {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}
.flashcard-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.flashcard-question {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    padding: 8px 0;
    min-height: 0;
}
.flashcard-hint {
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.8;
    font-style: italic;
    flex-shrink: 0;
}
.flashcard-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    flex-shrink: 0;
}
.fc-opt {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}
.fc-opt-correct {
    background: rgba(255, 255, 255, 0.3);
    border-color: #fff;
    font-weight: 700;
}

.flashcard-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0 12px;
}
.flashcard-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}
body.light-mode .flashcard-controls { background: #f3f3f8; }
.fc-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
.fc-checkbox input { cursor: pointer; }

/* Theme toggle 3-mode indicator */
body[data-theme-mode="auto"] #themeToggle {
    box-shadow: 0 0 0 2px rgba(124, 140, 248, 0.5);
}

/* Smooth theme transitions (Task 18) */
body, .container, .section, .quiz-item, .modal-content,
.practice-question, .practice-option, .practice-feedback,
.flashcard-controls, .fc-opt {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Mobile responsive for practice + flashcard */
@media (max-width: 600px) {
    .practice-q-text { font-size: 16px; }
    .practice-option { padding: 12px 14px; font-size: 14px; }
    .flashcard, .flashcard-inner, .flashcard-face { min-height: 320px; }
    .flashcard-face { padding: 20px 16px; max-height: 75vh; }
    .flashcard-question { font-size: 17px; }
    .fc-opt { font-size: 13px; padding: 8px 12px; }
    .flashcard-actions button, .flashcard-controls button { font-size: 13px; padding: 8px 12px; }
}

/* btn-success & btn-warning (used in quiz card buttons) */
.btn-success {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(76,175,80,0.4); }
.btn-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(255,152,0,0.4); }

/* ============================================
   🎯 FLOATING CARD (v1.8.0) — Draggable popup
   ============================================ */
.floating-card {
    display: none;
    position: fixed;
    top: 80px;
    right: 30px;
    width: 460px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,140,248,0.15);
    z-index: 1500;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    animation: fcSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
}
.floating-card.active {
    display: flex;
}
@keyframes fcSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header — drag handle */
.fc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    cursor: grab;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    touch-action: none;
}
.fc-header:active { cursor: grabbing; }
.fc-title {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fc-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}
.fc-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}
.fc-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}
.fc-btn.fc-close:hover {
    background: var(--danger);
}

/* Body — scrollable content */
.fc-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
    user-select: text;
    color: var(--text-main);
}
.fc-body h2 { font-size: 18px; margin: 0 0 12px 0; color: var(--primary); }
.fc-body h3 { font-size: 15px; margin: 16px 0 8px 0; color: var(--text-main); display: flex; align-items: center; gap: 6px; }
.fc-body p { color: var(--text-secondary); margin: 6px 0; font-size: 14px; line-height: 1.5; }
.fc-body ul { margin: 8px 0 8px 20px; }
.fc-body ul li { color: var(--text-secondary); margin: 4px 0; font-size: 13.5px; }
.fc-body pre {
    background: var(--bg-input);
    color: var(--text-main);
    padding: 12px 14px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 12.5px;
    border: 1px solid var(--border);
    margin: 8px 0;
    line-height: 1.5;
}
.fc-body .fc-tip {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(124,140,248,0.12);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-main);
}
.fc-body .shortcut-table { width: 100%; border-collapse: collapse; margin: 4px 0 8px; }
.fc-body .shortcut-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 13px;
}
.fc-body .shortcut-table tr:hover { background: var(--bg-hover); }

/* Minimized state — only header visible */
.floating-card.minimized {
    max-height: 48px;
    width: 280px;
}
.floating-card.minimized .fc-body { display: none; }
.floating-card.minimized .fc-header { border-bottom: none; }

/* Dragging state */
.floating-card.dragging {
    transition: none !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 2px var(--primary);
    opacity: 0.95;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-card {
        top: 70px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 90px);
    }
    .floating-card.minimized {
        width: auto;
        right: 10px;
        left: auto;
        min-width: 200px;
    }
    .fc-body { padding: 14px 16px; }
    .fc-body h2 { font-size: 16px; }
    .fc-body h3 { font-size: 14px; }
    .fc-body pre { font-size: 11.5px; padding: 10px; }
    .fc-body .shortcut-table td { font-size: 12px; padding: 6px 8px; }
}

/* ============================================ */
/* 🚩 BOOKMARK (v1.9.0) */
/* ============================================ */
.do-question { position: relative; }
.bookmark-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border, #e0e0e0);
    background: var(--bg-card, #fff);
    color: #888;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    padding: 0;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.bookmark-btn:hover {
    border-color: #f5b301;
    color: #f5b301;
    transform: scale(1.08);
}
.bookmark-btn.on {
    background: linear-gradient(135deg, #ffd54f, #f5b301);
    border-color: #f5b301;
    color: #fff;
    box-shadow: 0 2px 8px rgba(245,179,1,0.45);
    animation: bookmarkPop 0.32s ease;
}
@keyframes bookmarkPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}
/* Padding-right cho h4 để không đè lên nút */
.do-question h4 { padding-right: 48px; }

/* Ô đánh dấu trong panel trạng thái câu hỏi */
.qsp-cell.bookmarked {
    box-shadow: 0 0 0 2px #f5b301 inset, 0 1px 4px rgba(245,179,1,0.4);
    position: relative;
}
.qsp-cell.bookmarked::after {
    content: '🚩';
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

/* Banner bookmark trong trang kết quả */
.result-bookmark-row {
    margin-top: 14px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(255,213,79,0.18), rgba(245,179,1,0.12));
    border: 1px dashed rgba(245,179,1,0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main, #333);
}
.result-bookmark-row b { color: #f5b301; }

/* Mobile */
@media (max-width: 768px) {
    .bookmark-btn { width: 32px; height: 32px; font-size: 16px; top: 8px; right: 8px; }
    .do-question h4 { padding-right: 42px; }
    .result-bookmark-row { font-size: 13px; padding: 8px 12px; }
}

/* ============================================ */
/* 📝 NOTES PER QUESTION (v1.9.0) */
/* ============================================ */

/* Banner ghi chú trong trang LÀM BÀI (.do-question) */
.do-question-note {
    margin: 10px 0 14px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(124,140,248,0.35);
    background: linear-gradient(135deg, rgba(124,140,248,0.10), rgba(91,110,240,0.06));
}
.do-question-note-head {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #5b6ef0);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    transition: background 0.15s ease;
}
.do-question-note-head:hover { background: rgba(124,140,248,0.12); }
.do-question-note-head::after {
    content: '▼';
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s ease;
}
.do-question-note.open .do-question-note-head::after { transform: rotate(180deg); }
.do-question-note-body {
    padding: 0 12px;
    max-height: 0;
    overflow: hidden;
    color: var(--text-main, #333);
    font-size: 14px;
    line-height: 1.6;
    transition: max-height 0.25s ease, padding 0.25s ease;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.do-question-note.open .do-question-note-body {
    max-height: 400px;
    padding: 8px 12px 12px;
    border-top: 1px dashed rgba(124,140,248,0.4);
}

/* Khung ghi chú trong trang KẾT QUẢ (.review-detail .review-note) */
.review-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(124,140,248,0.06);
    border: 1px solid rgba(124,140,248,0.25);
}
.review-note-head {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary, #5b6ef0);
    margin-bottom: 6px;
}
.review-note textarea {
    width: 100%;
    min-height: 70px;
    max-height: 220px;
    padding: 8px 10px;
    border: 1px solid var(--border, #d4d4d4);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    background: var(--bg-card, #fff);
    color: var(--text-main, #333);
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.review-note textarea:focus {
    outline: none;
    border-color: var(--primary, #5b6ef0);
    box-shadow: 0 0 0 3px rgba(124,140,248,0.25);
}
.review-note-foot {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.note-save-status {
    font-size: 12px;
    color: #888;
    transition: color 0.15s ease;
}
.note-save-status.pending { color: #f5b301; }
.note-save-status.saved { color: #2ecc71; }
.note-save-status.error { color: #ee5253; }

/* Mobile */
@media (max-width: 768px) {
    .do-question-note-head { font-size: 12px; padding: 7px 10px; }
    .do-question-note-body { font-size: 13px; }
    .review-note { padding: 8px 10px; }
    .review-note textarea { font-size: 13px; min-height: 60px; }
}

/* ============================================ */
/* 🔁 WRONG-SET & 🚩 BOOKMARK BADGES — Quiz card meta (v1.9.0) */
/* ============================================ */
.quiz-item .meta .meta-warn {
    background: linear-gradient(135deg, rgba(238,82,83,0.15), rgba(238,82,83,0.05));
    color: #ee5253;
    border: 1px solid rgba(238,82,83,0.35);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.quiz-item .meta .meta-bm {
    background: linear-gradient(135deg, rgba(245,179,1,0.18), rgba(245,179,1,0.06));
    color: #d18900;
    border: 1px solid rgba(245,179,1,0.45);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================ */
/* 🔁 RESULT WRONG-SET BANNER (v1.9.0) */
/* ============================================ */
.result-wrong-row {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(238,82,83,0.15), rgba(238,82,83,0.08));
    border: 1px dashed rgba(238,82,83,0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main, #333);
}
.result-wrong-row b { color: #ee5253; }
.result-wrong-row.good {
    background: linear-gradient(135deg, rgba(46,204,113,0.15), rgba(46,204,113,0.06));
    border-color: rgba(46,204,113,0.5);
    justify-content: center;
    font-weight: 600;
    color: #27ae60;
}

/* ============================================ */
/* 💾 RESUME BANNER (v1.9.0 — Feature 4) */
/* ============================================ */
.resume-banner-host {
    max-width: 800px;
    margin: 20px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
}
.resume-banner {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    box-shadow: 0 4px 18px rgba(46,204,113,0.35);
    animation: resumeBannerIn 0.45s ease;
}
@keyframes resumeBannerIn {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}
.resume-banner-info { flex: 1 1 240px; min-width: 0; }
.resume-banner-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.resume-banner-title b { font-weight: 700; }
.resume-banner-meta { font-size: 13px; opacity: 0.92; }
.resume-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.resume-banner-actions .btn-primary {
    background: rgba(255,255,255,0.95);
    color: #27ae60;
    border: none;
    font-weight: 600;
}
.resume-banner-actions .btn-primary:hover {
    background: #fff;
    color: #1e874b;
    transform: translateY(-1px);
}
.resume-banner-actions .btn-danger {
    background: rgba(0,0,0,0.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}
.resume-banner-actions .btn-danger:hover {
    background: rgba(0,0,0,0.32);
}

/* Mobile */
@media (max-width: 768px) {
    .resume-banner { padding: 12px 14px; gap: 10px; }
    .resume-banner-title { font-size: 14px; }
    .resume-banner-meta { font-size: 12px; }
    .quiz-item .meta .meta-warn, .quiz-item .meta .meta-bm { font-size: 11px; padding: 2px 6px; }
    .result-wrong-row { font-size: 13px; padding: 8px 12px; }
}

/* ============================================ */
/* 📊 COMPARE SCORES BANNER (v2.0.0 — Feature #9) */
/* ============================================ */
.result-compare-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    margin: -8px 0 16px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    animation: compareIn 0.45s cubic-bezier(.4,1.4,.6,1);
    flex-wrap: wrap;
}
@keyframes compareIn {
    0% { opacity: 0; transform: scale(0.92) translateY(-6px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.result-compare-row .result-compare-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.result-compare-row .result-compare-text { flex: 1 1 200px; color: var(--text-main, #fff); }
.result-compare-row .result-compare-text b { font-weight: 700; }
.result-compare-row .result-compare-meta {
    font-size: 12px;
    opacity: 0.85;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.15);
    white-space: nowrap;
}

/* Tăng điểm */
.result-compare-row.up {
    background: linear-gradient(135deg, rgba(46,204,113,0.22), rgba(39,174,96,0.12));
    border: 1px solid rgba(46,204,113,0.5);
    color: #1e874b;
}
.result-compare-row.up .result-compare-text b { color: #2ecc71; }

/* Giảm điểm */
.result-compare-row.down {
    background: linear-gradient(135deg, rgba(238,82,83,0.18), rgba(192,57,43,0.10));
    border: 1px solid rgba(238,82,83,0.5);
    color: #b73537;
}
.result-compare-row.down .result-compare-text b { color: #ee5253; }

/* Bằng nhau */
.result-compare-row.flat {
    background: linear-gradient(135deg, rgba(108,117,125,0.18), rgba(73,80,87,0.10));
    border: 1px solid rgba(108,117,125,0.4);
    color: #495057;
}
.result-compare-row.flat .result-compare-text b { color: #6c757d; }

/* Lần đầu */
.result-compare-row.first {
    background: linear-gradient(135deg, rgba(124,140,248,0.18), rgba(91,110,240,0.10));
    border: 1px solid rgba(124,140,248,0.4);
    color: var(--primary, #5b6ef0);
    font-weight: 500;
}

/* Mobile */
@media (max-width: 768px) {
    .result-compare-row { font-size: 13px; padding: 10px 12px; gap: 10px; }
    .result-compare-row .result-compare-icon { font-size: 22px; }
    .result-compare-row .result-compare-meta { font-size: 11px; padding: 2px 8px; }
}

/* ============================================ */
/* ♿ ACCESSIBILITY (v2.0.0 — Feature #23) */
/* ============================================ */

/* Skip link — ẩn mặc định, hiện khi focus bằng Tab */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    background: var(--primary, #5b6ef0);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Screen-reader-only utility (visible cho screen reader, ẩn visual) */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible — outline rõ ràng cho mọi nút khi keyboard navigate */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--primary, #5b6ef0);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Reduced motion — tôn trọng prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ===== Tag editor (v2.1.0) ===== */
.tag-editor-summary {
    padding: 8px 12px; margin-bottom: 12px;
    background: var(--bg-secondary, rgba(255,255,255,0.04));
    border-radius: 8px; font-size: 13px; color: var(--text-secondary);
}
.tag-rows { display: flex; flex-direction: column; gap: 10px; }
.tag-row {
    padding: 10px; border-radius: 8px;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
}
.tag-row-q { font-size: 13px; color: var(--text-main); margin-bottom: 6px; line-height: 1.4; }
.tag-row-num { color: var(--primary, #7c8cf8); font-weight: 600; margin-right: 4px; }
.tag-row-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-bottom: 8px; }
.tag-empty { color: var(--text-secondary); font-size: 12px; font-style: italic; }
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; font-size: 12px;
    background: rgba(124,140,248,0.15); color: var(--primary, #7c8cf8);
    border: 1px solid rgba(124,140,248,0.35); border-radius: 12px;
}
.tag-chip-x {
    background: transparent; border: none; color: inherit;
    cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1;
    opacity: 0.7;
}
.tag-chip-x:hover { opacity: 1; color: #ff6b6b; }
.tag-row-input { display: flex; gap: 6px; }
.tag-row-input input[type="text"] {
    flex: 1; padding: 6px 10px; font-size: 13px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 6px; background: var(--bg-input, rgba(0,0,0,0.2));
    color: var(--text-main);
}
.tag-row-input input[type="text"]:focus {
    outline: 2px solid var(--primary, #7c8cf8); outline-offset: 1px;
    border-color: transparent;
}
.tag-row-input input[type="text"]:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-mini {
    padding: 6px 12px; font-size: 12px; border: none; border-radius: 6px;
    background: var(--primary, #7c8cf8); color: #fff; cursor: pointer;
    font-weight: 600;
}
.btn-mini:hover:not(:disabled) { filter: brightness(1.1); }
.btn-mini:disabled { opacity: 0.4; cursor: not-allowed; }

/* Meta badge tag count trên quiz card */
.meta-tag { color: #5ac8fa; font-weight: 600; }

/* ===== Tag stats table (v2.1.0) ===== */
.tag-stats-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tag-stats-controls label { font-size: 13px; color: var(--text-secondary); }
.tag-stats-controls select {
    flex: 1; min-width: 200px; padding: 6px 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    border-radius: 6px; background: var(--bg-input, rgba(0,0,0,0.2));
    color: var(--text-main); font-size: 13px;
}
.tag-stats-summary { padding: 8px 12px; margin-bottom: 10px; font-size: 13px; color: var(--text-secondary); background: rgba(255,255,255,0.03); border-radius: 6px; }
.tag-stats-table-wrap { overflow-x: auto; }
.tag-stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tag-stats-table th, .tag-stats-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08)); vertical-align: middle; }
.tag-stats-table th { background: rgba(255,255,255,0.04); font-weight: 600; color: var(--text-main); }
.tag-stats-table .tag-acc-low  { color: #ff6b6b; }
.tag-stats-table .tag-acc-mid  { color: #ffb74d; }
.tag-stats-table .tag-acc-high { color: #66bb6a; }
.tag-stats-table tr.tag-stats-untagged td { color: var(--text-secondary); font-style: italic; }
.tag-stats-good { color: #66bb6a; font-size: 12px; font-weight: 600; }

/* ===== v2.2.0 — UX Polish (Batch A: P0 mobile fixes) ===== */

/* iOS Safari: prevent zoom on input focus — universal 16px floor on mobile */
@media (max-width: 768px) {
    input[type="text"], input[type="number"], input[type="search"],
    input[type="email"], input[type="password"], input[type="tel"],
    input[type="url"], input[type="date"], input[type="datetime-local"],
    textarea, select {
        font-size: 16px !important;
    }
    /* Search inputs ngoài form-group */
    #searchQuiz, #historySearch, .history-search, .history-filter,
    #tagStatsQuiz, .tag-row-input input {
        font-size: 16px !important;
    }
}

/* QSP panel mobile: tăng z-index chắc chắn trên nút Nộp bài + safe-area-inset */
@media (max-width: 600px) {
    .question-status-panel {
        z-index: 110;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
    .qsp-mobile-toggle {
        z-index: 111;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}

/* Floating card mobile: full-width + scroll mượt khi keyboard mở (iOS) */
@media (max-width: 600px) {
    .floating-card {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
    }
    .fc-body {
        -webkit-overflow-scrolling: touch;
        max-height: calc(100vh - 80px) !important;
        max-height: calc(100dvh - 80px) !important;
    }
    /* Khi keyboard mở (iOS Safari shrink viewport via dvh) — đảm bảo content vẫn scroll được */
    .floating-card.active {
        animation: none; /* tắt animation slide để tránh giật khi keyboard pops */
    }
}

/* ===== v2.2.0 — UX Polish (Batch B: P1 mobile UX) ===== */

/* Fix #3: Expand touch target ≥44×44px cho mọi icon button trên touch device */
@media (hover: none) and (pointer: coarse) {
    .fc-btn, .bookmark-btn, .tag-chip-x, .qsp-toggle,
    .qsp-mobile-toggle, .btn-mini, .shortcut-btn, .close-btn {
        min-width: 44px;
        min-height: 44px;
    }
    /* Tag chip x đặc biệt: giữ chip nhỏ nhưng vùng cảm ứng rộng qua padding */
    .tag-chip-x {
        padding: 8px;
        margin: -6px 0 -6px 2px;
    }
}

/* Fix #4: Sticky bottom action bar khi làm bài (mobile) — nút Nộp bài luôn visible */
@media (max-width: 768px) {
    #doQuiz .btn-primary {
        position: sticky;
        bottom: 0;
        bottom: env(safe-area-inset-bottom, 0px);
        width: calc(100% + 32px);
        margin: 16px -16px 0;
        padding: 16px;
        font-size: 17px;
        font-weight: 700;
        border-radius: 0;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
        z-index: 50;
    }
}

/* ===== v2.2.0 — UX Polish (Batch C: P2 perf + desktop) ===== */

/* Fix #8: Smoother hover/transition on desktop (skip touch devices) */
@media (hover: hover) and (pointer: fine) {
    .quiz-item, .feature-card, .stat-card {
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }
    .quiz-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    }
    .btn-primary, .btn-secondary, .btn-info, .btn-danger, .btn-success, .btn-warning {
        transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
    }
    .nav-btn {
        transition: background-color 0.15s ease, color 0.15s ease;
    }
}

/* Fix #9: Wide-screen layout (>1400px) — wider container, denser quiz grid */
@media (min-width: 1400px) {
    .container { max-width: 1440px; }
    .quiz-list { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
}
@media (min-width: 1800px) {
    .container { max-width: 1680px; }
}

/* ===== Practice Mode (Luyện tập) v2.3.0 ===== */
.do-question.practice-revealed label { cursor: default; }
.do-question label.practice-correct {
    background: rgba(34,197,94,0.15);
    border-color: #22c55e !important;
    color: #14532d;
    font-weight: 600;
}
.do-question label.practice-wrong {
    background: rgba(239,68,68,0.15);
    border-color: #ef4444 !important;
    color: #7f1d1d;
    text-decoration: line-through;
}
.practice-feedback {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.practice-feedback.ok { background: rgba(34,197,94,0.12); color:#065f46; border: 1px solid rgba(34,197,94,0.35); }
.practice-feedback.no { background: rgba(239,68,68,0.12); color:#7f1d1d; border: 1px solid rgba(239,68,68,0.35); }
.practice-explain { margin-top: 6px; font-size: 13px; opacity: 0.9; }
#doQuiz.practice-mode .timer-display { display: none !important; }
