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

body {
    background-color: #f5f5f5;
    color: #333;
}

/* --- HEADER --- */
.header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-text h1 {
    font-size: 14px;
    color: #0b4a99;
    margin-bottom: 2px;
}
.logo-text p {
    font-size: 11px;
    color: #0b4a99;
    font-style: italic;
}
.main-nav {
    display: flex;
    gap: 20px;
}
.main-nav a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}
.main-nav a.active {
    color: #d32f2f;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}
.avatar {
    width: 32px;
    height: 32px;
    background-color: #1890ff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.flag {
    height: 20px;
    border: 1px solid #eee;
}

/* --- SUB HEADER --- */
.sub-header {
    background-color: #123e86;
    color: white;
    padding: 12px 0;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.sub-header span {
    font-size: 16px;
    font-weight: 500;
}

/* --- COMMON --- */
.main-content {
    background-color: #fff;
    margin-top: 20px;
    margin-bottom: 50px;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    min-height: 500px;
}
.text-center { text-align: center; }
.m-t-30 { margin-top: 30px; }
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
}
.btn-primary {
    background-color: #1890ff;
    color: white;
}
.btn-primary:hover { background-color: #096dd9; }
.btn-default {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}
.btn-default:hover { background-color: #e0e0e0; }
.btn-danger {
    background-color: #d32f2f;
    color: white;
}
.btn-danger:hover { background-color: #b71c1c; }

/* --- EXAM LAYOUT --- */
.test-title {
    color: #333;
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 500;
}
.exam-layout {
    display: flex;
    gap: 40px;
}
.question-column {
    flex: 1;
}
.sidebar-column {
    width: 350px;
}

/* Question Content */
.question-header {
    background-color: #e6e6e6;
    padding: 12px 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    margin-bottom: 20px;
}
.question-header.wrong {
    background-color: #fce4e4;
    color: #d32f2f;
}
.question-header.correct {
    background-color: #e6f7ff;
    color: #1890ff;
}
.question-header.wrong > span:first-child::before {
    content: '\f00d';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}
.question-header.correct > span:first-child::before {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
}
.hint-btn {
    color: #666;
    font-weight: normal;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}
.question-content {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}
.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 15px;
}
.option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.option-label span {
    flex: 1;
    line-height: 1.5;
}
.feedback-msg {
    margin-top: 20px;
    font-weight: bold;
    font-size: 16px;
}
.feedback-msg.wrong { color: #d32f2f; }
.feedback-msg.correct { color: #1890ff; }

.exam-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Sidebar Grid */
.timer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-flex;
    margin-bottom: 20px;
    color: #1890ff;
    font-weight: 500;
}
.progress-info {
    margin-bottom: 15px;
    font-size: 14px;
}
.grid-card {
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 20px;
}
.grid-header {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}
.grid-body {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}
.grid-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    color: #666;
}
.grid-btn.answered {
    background-color: #1890ff;
    color: white;
    border-color: #1890ff;
}
.grid-btn.correct {
    background-color: #1890ff;
    color: white;
    border-color: #1890ff;
}
.grid-btn.wrong {
    background-color: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.btn-finish {
    width: 100%;
    background-color: #123e86;
    padding: 12px;
    font-size: 15px;
}

/* Result Screen */
.result-summary {
    max-width: 600px;
    margin: 40px auto;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}
.score-display {
    display: flex;
    align-items: center;
    gap: 15px;
}
.btn-link {
    background: none;
    border: 1px solid #1890ff;
    color: #1890ff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.result-grid-section {
    margin-top: 30px;
}
.result-grid-section p {
    color: #999;
    font-size: 13px;
    margin-bottom: 15px;
}
.result-grid-section .grid-body {
    padding: 0;
    grid-template-columns: repeat(15, 1fr);
}

.bank-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}
.bank-item {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bank-item h3 {
    color: #1890ff;
    margin-bottom: 5px;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .exam-layout {
        flex-direction: column;
    }
    .sidebar-column {
        width: 100%;
    }
    .result-grid-section .grid-body {
        grid-template-columns: repeat(8, 1fr);
    }
    .main-nav { display: none; }
    .user-profile { display: none; }
}
