/* Font Face */
@font-face {
    font-family: 'SF Pro Display';
    src: url('/fonts/sfprodisplay.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3D3F3F;
    --primary-dark: #2a2c2c;
    --secondary: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px 30px;
    border: 1px solid var(--border);
}

.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 16px;
}

.logo-section h1 {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.tagline {
    color: var(--text-light);
    font-size: 14px;
}

.error-message {
    background: #fef2f2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.form-group input {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    outline: none;
}

.form-group select {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s;
    outline: none;
    background: var(--bg-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61, 63, 63, 0.1);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(61, 63, 63, 0.1);
}

.otp-input {
    text-align: center;
    font-size: 24px !important;
    letter-spacing: 8px;
    font-weight: bold;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--secondary);
    cursor: not-allowed;
}

.btn-text {
    display: inline;
}

.btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-icon {
    font-size: 18px;
}

.otp-sent-info {
    text-align: center;
    background: #f0f9ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 10px;
}

.otp-sent-info .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.icon-svg {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto 10px;
    fill: var(--primary);
}

.otp-sent-info p {
    color: var(--text-light);
    font-size: 14px;
}

.otp-sent-info strong {
    color: var(--text-dark);
    font-size: 14px;
}

.back-link {
    text-align: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    display: block;
    width: 100%;
    margin-top: 10px;
}

.back-link:hover {
    color: var(--primary);
}

.spam-notice {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0;
}

.email-display {
    background: #f0f9ff;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.email-display .icon {
    font-size: 20px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: var(--bg-white);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.nav-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.back-arrow {
    color: var(--text-light);
    text-decoration: none;
    font-size: 24px;
    padding: 5px 10px;
}

.back-arrow:hover {
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
}

.logout-btn {
    color: var(--danger);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: #fef2f2;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #fee2e2;
}

/* ===== DASHBOARD ===== */
.dashboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.dashboard-content {
    flex: 1;
    padding: 30px 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.user-info {
    color: var(--text-light);
    font-size: 14px;
}

.courses-section h2,
.stats-section h2,
.course-stats h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.courses-grid {
    display: grid;
    gap: 15px;
}

.course-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.course-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.course-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.course-info {
    flex: 1;
}

.course-info h3 {
    color: var(--text-dark);
    font-size: 18px;
    margin-bottom: 4px;
}

.course-info p {
    color: var(--text-light);
    font-size: 14px;
}

.course-card .arrow {
    font-size: 24px;
    color: var(--text-light);
}

.stats-section {
    margin-top: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 12px;
}

.dashboard-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 12px;
}

/* ===== PRACTICE PAGE ===== */
.practice-content {
    padding: 30px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.course-header {
    text-align: center;
    margin-bottom: 40px;
}

.course-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
}

.course-header h1 {
    font-size: 32px;
    margin-bottom: 5px;
}

.course-header p {
    color: var(--text-light);
}

.practice-options h2 {
    margin-bottom: 20px;
}

.options-grid {
    display: grid;
    gap: 15px;
}

.option-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    border: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.option-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.option-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.option-card p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
}

.option-card .btn {
    width: auto;
}

.course-stats {
    margin-top: 40px;
}

.back-btn {
    margin-top: 30px;
    display: inline-flex;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .login-card {
        padding: 50px 40px;
    }

    .welcome-section h1 {
        font-size: 36px;
    }

    .dashboard-content {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px 10px;
    }

    .stat-value {
        font-size: 22px;
    }

    .stat-label {
        font-size: 10px;
    }

    .user-name {
        display: none;
    }
}

/* ===== DISCLAIMER ===== */
.disclaimer-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.disclaimer-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
}

.disclaimer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.disclaimer-icon {
    width: 24px;
    height: 24px;
}

.disclaimer-card h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
}

.disclaimer-card p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.disclaimer-card p:last-child {
    margin-bottom: 0;
}

.disclaimer-card strong {
    color: var(--primary);
}

/* ===== PRACTICE SETUP ===== */
.practice-setup {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 30px;
    margin-bottom: 30px;
}

.practice-setup h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.setup-option label:first-child {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.option-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.option-buttons input[type="radio"] {
    display: none;
}

.option-btn {
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--bg-white);
    text-align: center;
}

.option-btn:hover {
    border-color: var(--primary);
}

.option-buttons input[type="radio"]:checked+.option-btn {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.option-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.question-count-note {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 10px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.no-questions-notice {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* Resume Section */
.resume-section {
    margin-bottom: 30px;
}

.resume-card {
    background: #fef3c7;
    border: 0.5px solid #f59e0b;
    border-radius: 16px;
    padding: 25px;
}

.resume-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.resume-icon {
    width: 24px;
    height: 24px;
}

.resume-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0;
}

.resume-card p {
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 10px;
}

.resume-progress {
    font-weight: 600;
    color: #92400e;
}

.resume-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.resume-actions .btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WhatsApp Group Section */
.whatsapp-group-section {
    margin-bottom: 30px;
}

.whatsapp-group-card {
    background: #dcfce7;
    border: 0.5px solid #25D366;
    border-radius: 16px;
    padding: 25px;
}

.whatsapp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
}

.whatsapp-group-card h3 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0;
}

.whatsapp-group-card p {
    color: var(--text-dark);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-whatsapp .btn-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.warning-text {
    background: #fef3c7;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

.group-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.group-buttons .btn-whatsapp {
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 768px) {
    .group-buttons {
        flex-direction: column;
    }

    .group-buttons .btn-whatsapp {
        width: 100%;
    }
}

/* Recent History Mini */
.recent-history {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 25px;
    margin-bottom: 30px;
}

.history-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.history-header-row h2 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0;
}

.view-all-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

.history-item-mini {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.history-item-mini:hover {
    background: var(--bg-light);
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 10px;
}

.history-item-mini:last-child {
    border-bottom: none;
}

.history-arrow {
    margin-left: auto;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.history-score-mini {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: var(--bg-light);
    color: var(--text-dark);
}

.history-score-mini.excellent {
    background: #dcfce7;
    color: var(--success);
}

.history-score-mini.good {
    background: #dbeafe;
    color: #3b82f6;
}

.history-score-mini.average {
    background: #fef3c7;
    color: #d97706;
}

.history-score-mini.poor {
    background: #fef2f2;
    color: var(--danger);
}

.history-info-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-info-mini span:first-child {
    font-weight: 500;
    color: var(--text-dark);
}

.history-date {
    color: var(--text-light);
    font-size: 13px;
}

/* ===== QUESTION PAGE ===== */
.question-page {
    background: var(--bg-light);
    min-height: 100vh;
    padding-bottom: 100px;
}

.question-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.question-header-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.question-course-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-course-info h2 {
    font-size: 16px;
    color: var(--text-dark);
}

.timer-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
}

.timer-display.warning {
    background: var(--warning);
}

.timer-display.danger {
    background: var(--danger);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.timer-icon {
    width: 18px;
    height: 18px;
}

.question-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

.question-main {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 30px;
}

.question-number {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.question-text {
    font-size: 18px;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 30px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:hover {
    border-color: var(--primary);
    background: #f8f9fa;
}

.option-item.selected {
    border-color: var(--primary);
    background: rgba(61, 63, 63, 0.05);
}

.option-letter {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-dark);
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: var(--primary);
    color: white;
}

.option-text {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 4px;
}

.question-nav {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.nav-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.nav-btn.prev {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.nav-btn.prev:hover {
    background: #e2e8f0;
}

.nav-btn.next {
    background: var(--primary);
    color: white;
}

.nav-btn.next:hover {
    background: var(--primary-dark);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Question Sidebar */
.question-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-card {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.question-dot {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-white);
    color: var(--text-dark);
}

.question-dot:hover {
    border-color: var(--primary);
}

.question-dot.answered {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.question-dot.current {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #dc2626;
}

.progress-info {
    text-align: center;
    margin-bottom: 15px;
}

.progress-info span {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.progress-info small {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    margin-top: 4px;
}

/* ===== RESULTS PAGE ===== */
.results-page {
    background: var(--bg-light);
    min-height: 100vh;
    padding: 30px 20px 60px;
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.results-header p {
    color: var(--text-light);
    font-size: 16px;
}

.score-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
}

.score-circle.excellent {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.score-circle.good {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.score-circle.average {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.score-circle.poor {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 5px;
}

.score-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-value.correct {
    color: var(--success);
}

.stat-value.wrong {
    color: var(--danger);
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.results-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.results-actions-row {
    display: flex;
    gap: 12px;
}

.results-actions-row .btn {
    flex: 1;
    width: 50%;
}

.results-actions .btn {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-actions .btn-full {
    width: 100%;
}

.results-actions .btn-primary {
    background: var(--primary);
    color: white;
}

.results-actions .btn-primary:hover {
    background: var(--primary-dark);
}

.results-actions .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.results-actions .btn-secondary:hover {
    background: #e2e8f0;
}

.results-actions .btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.results-actions .btn-outline:hover {
    background: var(--bg-light);
}

/* Question Review */
.review-section h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.review-question {
    background: var(--bg-white);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 25px;
    margin-bottom: 16px;
}

.review-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.review-question-number {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-question-number span {
    font-weight: 600;
    color: var(--text-dark);
}

.review-status-icon {
    width: 24px;
    height: 24px;
}

.review-question-text {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 20px;
}

.review-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.review-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--bg-light);
    border: 2px solid transparent;
}

.review-option.correct {
    background: #dcfce7;
    border-color: var(--success);
}

.review-option.wrong {
    background: #fef2f2;
    border-color: var(--danger);
}

.review-option-letter {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.review-option.correct .review-option-letter {
    background: var(--success);
    color: white;
}

.review-option.wrong .review-option-letter {
    background: var(--danger);
    color: white;
}

.review-option-text {
    font-size: 15px;
    color: var(--text-dark);
    line-height: 1.5;
}

.review-explanation {
    background: #f0f9ff;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid #3b82f6;
}

.review-explanation strong {
    display: block;
    font-size: 13px;
    color: #3b82f6;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-explanation p {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

/* ===== HISTORY PAGE ===== */
.history-page {
    background: var(--bg-light);
    min-height: 100vh;
    padding: 30px 20px 60px;
}

.history-container {
    max-width: 800px;
    margin: 0 auto;
}

.history-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.back-link {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--bg-light);
}

.history-header h1 {
    font-size: 24px;
    color: var(--text-dark);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: var(--bg-white);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-score {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    flex-shrink: 0;
}

.history-score.excellent {
    background: #dcfce7;
    color: var(--success);
}

.history-score.good {
    background: #dbeafe;
    color: #3b82f6;
}

.history-score.average {
    background: #fef3c7;
    color: #d97706;
}

.history-score.poor {
    background: #fef2f2;
    color: var(--danger);
}

.history-score-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.history-score-percent {
    font-size: 11px;
    font-weight: 500;
}

.history-info {
    flex: 1;
}

.history-info h3 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.history-meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 13px;
}

.history-action {
    padding: 10px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.history-action:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.empty-history {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-history p {
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-history a {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
}

/* Mobile Submit Row - hidden on desktop */
.mobile-submit-row {
    display: none;
}

/* Mobile Responsive - Question Page */
@media (max-width: 768px) {
    .question-container {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        display: flex;
        flex-direction: column;
    }

    /* Hide sidebar completely on mobile */
    .question-sidebar {
        display: none;
    }

    /* Show mobile submit row */
    .mobile-submit-row {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid var(--border);
    }

    .mobile-progress {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 70px;
    }

    .mobile-progress span {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-dark);
    }

    .mobile-progress small {
        font-size: 11px;
        color: var(--text-light);
    }

    .mobile-submit {
        flex: 1;
        padding: 14px 20px;
        font-size: 15px;
    }

    .question-main {
        order: 1;
        padding: 20px;
    }

    .question-text {
        font-size: 16px;
    }

    .option-item {
        padding: 14px 16px;
    }

    .option-text {
        font-size: 15px;
    }

    .timer-display {
        padding: 6px 12px;
        font-size: 14px;
    }

    .question-course-info h2 {
        font-size: 14px;
    }

    .score-card {
        padding: 30px 20px;
    }

    .score-circle {
        width: 130px;
        height: 130px;
    }

    .score-value {
        font-size: 40px;
    }

    .score-stats {
        gap: 10px;
    }

    .stat-value {
        font-size: 20px;
    }

    .results-actions {
        flex-direction: column;
    }

    .review-question {
        padding: 20px;
    }

    .history-item {
        flex-wrap: wrap;
    }

    .history-action {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }
}