/* CSS cho trang Luyện Đề Thi A1 - Thay Ha Day Lai Xe */

:root {
    --navy:     #0b1f4a;
    --navy-mid: #1a3570;
    --accent:   #f4782a;
    --accent-soft: #fff0e5;
    --gold:     #e8b84b;
    --light:    #f8f9fc;
    --text:     #2c3e50;
    --muted:    #6c7a8a;
    --success:  #2ec4b6;
    --danger:   #e71d36;
}

body {
    font-family: 'Be Vietnam Pro', 'Times New Roman', Times, serif;
    color: var(--text);
    background-color: #f4f6fa;
    line-height: 1.6;
}

/* --- BANNER / HERO --- */
.hero-exam {
    background: linear-gradient(135deg, var(--navy) 40%, var(--navy-mid) 100%);
    position: relative;
    color: #fff;
    padding: 60px 0;
    overflow: hidden;
}
.hero-exam::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.8;
}
.hero-exam-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
}
.hero-exam-subtitle {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- CARD BỘ ĐỀ --- */
.exam-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.exam-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--navy);
    transition: background 0.3s;
}
.exam-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 30px rgba(11,31,74,0.08);
    border-color: var(--accent);
}
.exam-card:hover::after {
    background: var(--accent);
}
.exam-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
}
.exam-badge-diem {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}
.exam-badge-dat {
    background-color: rgba(46, 196, 182, 0.15);
    color: var(--success);
}
.exam-badge-rot {
    background-color: rgba(231, 29, 54, 0.15);
    color: var(--danger);
}
.exam-icon {
    font-size: 2.2rem;
    color: var(--accent);
    background: var(--accent-soft);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s;
}
.exam-card:hover .exam-icon {
    transform: scale(1.1) rotate(5deg);
}

/* --- PANEL THI --- */
.exam-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}
@media (max-width: 991px) {
    .exam-layout {
        grid-template-columns: 1fr;
    }
}

.question-panel {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.question-header {
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.diem-liet-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: pulse-danger 2s infinite;
}

@keyframes pulse-danger {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); box-shadow: 0 0 10px rgba(231, 29, 54, 0.4); }
    100% { transform: scale(1); }
}

.question-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.5;
}

.question-image-container {
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    text-align: center;
    background: #f8f9fa;
    padding: 10px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.02);
}
.question-image {
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
}

/* --- ĐÁP ÁN --- */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.option-item {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 16px;
}
.option-item:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.option-item.selected {
    border-color: var(--navy);
    background: #eef2ff;
}
.option-item.correct-answer {
    background-color: rgba(46, 196, 182, 0.1);
    border-color: var(--success);
}
.option-item.wrong-answer {
    background-color: rgba(231, 29, 54, 0.1);
    border-color: var(--danger);
}
.option-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    background: #fff;
    transition: all 0.2s;
}
.option-item:hover .option-circle {
    border-color: var(--accent);
    color: var(--accent);
}
.option-item.selected .option-circle {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}
.option-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}

/* --- SIDEBAR ĐỀ THI --- */
.exam-sidebar {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    align-self: start;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.timer-box {
    text-align: center;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}
.timer-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
}
.timer-count {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    font-family: monospace;
}
.timer-danger .timer-count {
    color: var(--danger);
    animation: flash-danger 1s infinite alternate;
}
@keyframes flash-danger {
    0% { opacity: 1; }
    100% { opacity: 0.5; }
}

.grid-navigation {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.nav-btn {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
}
.nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.nav-btn.answered {
    background: var(--navy-mid);
    border-color: var(--navy-mid);
    color: #fff;
}
.nav-btn.active {
    box-shadow: 0 0 0 3px rgba(244, 120, 42, 0.4);
    border-color: var(--accent);
}

/* Trạng thái kết quả trong bảng điều hướng câu hỏi */
.nav-btn.correct {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: #fff !important;
}
.nav-btn.incorrect {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
    color: #fff !important;
}

/* --- KẾT QUẢ KHI NỘP BÀI --- */
.result-container {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
}
.result-status-card {
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    color: #fff;
    margin-bottom: 32px;
}
.result-status-card.pass {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}
.result-status-card.fail {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}
.result-big-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.result-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
}
.result-detail-text {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 8px;
}

/* --- REVIEW CÂU HỎI --- */
.review-question-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}
.review-question-card.correct {
    border-left: 6px solid var(--success);
}
.review-question-card.incorrect {
    border-left: 6px solid var(--danger);
}
.review-option-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    background: #fff;
}
.review-option-item.correct-answer {
    background-color: rgba(46, 196, 182, 0.1);
    border-color: var(--success);
}
.review-option-item.wrong-answer {
    background-color: rgba(231, 29, 54, 0.1);
    border-color: var(--danger);
}
.explanation-box {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    font-size: 0.92rem;
    color: #475569;
    border-left: 3px solid var(--navy);
}

/* --- PHẦN HEADER/FOOTER CONSISTENCY --- */
.main-nav {
    background: #fff;
    box-shadow: 0 2px 20px rgba(11,31,74,.08);
    position: sticky;
    top: 0;
    z-index: 999;
}
.logo-ring  { width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--accent); overflow: hidden; flex-shrink: 0; }
.logo-ring img { width: 100%; height: 100%; object-fit: cover; }
.brand-sub {
    font-size: 18px; 
    font-weight: bold; 
    color: red;
    word-wrap: break-word; 
    overflow-wrap: break-word;
    max-width: 100%;
}
.nav-link-custom {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text) !important;
    padding: 6px 14px !important;
    border-radius: 6px;
    transition: color .2s, background .2s;
}
.nav-link-custom:hover, .nav-link-custom.active {
    color: var(--accent) !important;
    background: var(--accent-soft);
}
.btn-register {
    background: var(--accent);
    color: #fff !important;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 9px 22px;
    transition: background .2s, transform .2s;
    text-decoration: none;
}
.btn-register:hover { background: #d8621a; transform: translateY(-1px); }

/* Buttons */
.btn-navy {
    background-color: var(--navy);
    color: #fff;
    font-weight: 600;
    border-radius: 30px;
    padding: 10px 24px;
    border: none;
    transition: background 0.2s;
}
.btn-navy:hover {
    background-color: var(--navy-mid);
    color: #fff;
}
.btn-accent {
    background-color: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: 30px;
    padding: 10px 24px;
    border: none;
    transition: background 0.2s;
}
.btn-accent:hover {
    background-color: #d8621a;
    color: #fff;
}
.btn-outline-navy {
    background-color: transparent;
    color: var(--navy);
    font-weight: 600;
    border-radius: 30px;
    padding: 8px 22px;
    border: 2px solid var(--navy);
    transition: all 0.2s;
}
.btn-outline-navy:hover {
    background-color: var(--navy);
    color: #fff;
}
