/* ===== General ===== */
body {
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

.page {
    display: none;
    min-height: 100vh;
    padding: 40px 15px;
    align-items: center;
    justify-content: center;
}

.page.active {
    display: flex;
}

/* ===== Language Switcher ===== */
.lang-switcher {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
    display: flex;
    gap: 4px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn.active {
    background: #0d6efd;
    color: #fff;
}

.lang-btn:hover:not(.active) {
    background: #e2e8f0;
}

/* ===== PIN Page ===== */
.logo-icon {
    font-size: 48px;
    color: #0d6efd;
}

/* ===== Timer ===== */
.timer-box {
    font-size: 22px;
    font-weight: 700;
    color: #0d6efd;
    background: #e7f1ff;
    padding: 8px 20px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}

.timer-box.warning {
    color: #dc3545;
    background: #f8d7da;
}

/* ===== Question Dots ===== */
.question-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.q-dot {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.q-dot:hover { border-color: #0d6efd; color: #0d6efd; }
.q-dot.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.q-dot.answered { background: #cfe2ff; border-color: #86b7fe; color: #0d6efd; }
.q-dot.active.answered { background: #0d6efd; color: #fff; }

/* ===== Answer Options ===== */
.answer-option {
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.answer-option:hover { border-color: #86b7fe; background: #f0f7ff; }
.answer-option.selected { border-color: #0d6efd; background: #e7f1ff; }

.answer-letter {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #6c757d;
}

.answer-option.selected .answer-letter {
    background: #0d6efd;
    color: #fff;
}

/* ===== Results ===== */
.result-icon { font-size: 60px; }
.result-table { max-width: 500px; }

.score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6px solid;
}

.score-circle.passed { border-color: #198754; background: #d1e7dd; }
.score-circle.failed { border-color: #dc3545; background: #f8d7da; }

.score-percent { font-size: 32px; font-weight: 800; }
.score-circle.passed .score-percent { color: #198754; }
.score-circle.failed .score-percent { color: #dc3545; }

h2.passed { color: #198754; }
h2.failed { color: #dc3545; }

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .page { padding: 20px 10px; }
    .timer-box { font-size: 18px; padding: 6px 14px; }
    .q-dot { width: 30px; height: 30px; font-size: 11px; }
    .score-circle { width: 100px; height: 100px; }
    .score-percent { font-size: 26px; }
}

/* ===== Print ===== */
@media print {
    .page { display: none !important; }
    #result-page { display: flex !important; }
    .lang-switcher, #btn-restart { display: none !important; }
}
