.quiz-page {
    padding-top: 16px;
    padding-bottom: 24px;
}

.quiz-intro {
    text-align: center;
}

.quiz-guest-notice {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .1);
    padding: 28px 24px;
}

.quiz-guest-notice p {
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
    margin: 12px 0 22px;
}

.quiz-guest-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-intro-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #475569;
    margin: 16px 0 24px;
}

.quiz-error {
    color: #b91c1c;
    background: #fee2e2;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
}

.quiz-start-form {
    margin-bottom: 18px;
}

.quiz-start-btn {
    font-size: 1.05rem;
    padding: 12px 32px;
}

.quiz-leaderboard-link {
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
}

.quiz-difficulty-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 18px;
}

.quiz-difficulty-card {
    flex: 1 1 200px;
    max-width: 240px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
    transition: border-color .15s, transform .15s;
}

.quiz-difficulty-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
}

.quiz-difficulty-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.quiz-difficulty-meta {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    font-size: .85rem;
    color: #64748b;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quiz-difficulty-btn {
    width: 100%;
    padding: 9px;
}

.quiz-progress {
    margin: 0 0 8px;
    font-size: .88rem;
    font-weight: 700;
    color: #64748b;
}

.quiz-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.quiz-timer {
    font-variant-numeric: tabular-nums;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 3px 12px;
    font-weight: 800;
}

.quiz-timer-warning {
    background: #fee2e2;
    color: #b91c1c;
}

.quiz-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.quiz-progress-fill {
    height: 100%;
    background: #1d4ed8;
    border-radius: 4px;
    transition: width .2s ease;
}

.quiz-card {
    margin: 10px 0 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .1);
    padding: 16px 20px;
    text-align: center;
}

.quiz-stamp-image {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    margin-bottom: 8px;
}

.quiz-caption {
    font-style: italic;
    color: #475569;
    margin: 0 0 4px;
}

.quiz-prompt {
    font-size: 1.05rem;
    margin: 2px 0 12px;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(var(--quiz-options-count, 1), 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

/* На тесни екрани опциите се редят по 1 на ред, за да останат четими. */
@media (max-width: 720px) {
    .quiz-options {
        grid-template-columns: 1fr;
    }
}

.quiz-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.quiz-option input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.quiz-next-btn {
    padding: 10px 40px;
    font-size: 1rem;
}

.quiz-results-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .1);
    padding: 32px 24px;
    text-align: center;
}

.quiz-results-score {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1d4ed8;
    margin: 8px 0;
}

.quiz-results-percent {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 600;
}

.quiz-results-level {
    font-size: .95rem;
    color: #64748b;
    margin: 0 0 4px;
}

.quiz-results-timeout {
    font-size: .88rem;
    color: #b45309;
    background: #fffbeb;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 8px 0;
}

.quiz-results-rank {
    font-size: 1.1rem;
    margin: 8px 0 24px;
    color: #1e293b;
}

.quiz-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.quiz-leaderboard-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.quiz-leaderboard-tab {
    padding: 7px 16px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
}

.quiz-leaderboard-tab:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.quiz-leaderboard-tab.active {
    background: #1d4ed8;
    color: #fff;
}

.quiz-leaderboard-wrap {
    overflow-x: auto;
    margin-top: 16px;
}

.quiz-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .08);
}

.quiz-leaderboard-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.quiz-leaderboard-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.quiz-leaderboard-table tr:last-child td {
    border-bottom: none;
}

.quiz-leaderboard-me {
    background: #eff6ff;
    font-weight: 700;
}

.quiz-my-position {
    margin-top: 14px;
    font-weight: 600;
    color: #1d4ed8;
}

.quiz-back-btn {
    display: inline-block;
    margin-top: 20px;
}
