/* Quiz Styles - Politics of the Late Republic */
/* Matches new Classicalia dark design */

:root {
    --blue: #0066ff;
    --blue-l: #5e9fff;
    --gold: #f5c842;
    --green: #5ecb8a;
    --red: #e05555;
    --dim: rgba(255,255,255,0.35);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: linear-gradient(155deg, #080c1f 0%, #0d1433 50%, #090d22 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

#canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.055);
    background: rgba(8,12,31,0.85);
    backdrop-filter: blur(12px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.nav-logo {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue);
    cursor: pointer;
    transition: opacity 0.15s;
}

.nav-logo:hover { opacity: 0.8; }

.nav-sep {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,0.12);
}

.nav-crumb {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    gap: 0.38rem;
}

.crumb-link {
    cursor: pointer;
    transition: color 0.13s;
}

.crumb-link:hover { color: rgba(255,255,255,0.8); }
.crumb-cur { color: rgba(255,255,255,0.75); font-weight: 500; }

.nav-r {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nb {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    padding: 0.36rem 0.78rem;
    border-radius: 7px;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.13s, background 0.13s;
}

.nb:hover { color: white; background: rgba(255,255,255,0.08); }

/* Hero */
.hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.hero-eyebrow {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.38);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.6rem;
}

.hero-rule {
    width: 48px;
    height: 1.5px;
    margin: 0.75rem auto;
    background: linear-gradient(90deg, rgba(224,85,85,0.7), transparent);
}

.hero-sub {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

/* Content */
.content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Quiz Card */
.quiz-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 2rem;
}

/* How It Works intro */
.intro-box {
    background: rgba(94,159,255,0.08);
    border: 1px solid rgba(94,159,255,0.15);
    border-left: 3px solid var(--blue);
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
}

.intro-box h3 {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--blue-l);
    margin-bottom: 0.4rem;
}

.intro-box p {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
}

/* Lesson Selection */
.select-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.select-all-btn {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    padding: 0.4rem 0.85rem;
    border-radius: 7px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.12);
    background: none;
    transition: all 0.15s;
}

.select-all-btn:hover {
    color: white;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.lesson-option {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.lesson-option:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.lesson-option.selected {
    background: rgba(94,159,255,0.12);
    border-color: rgba(94,159,255,0.35);
}

.lesson-number {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue-l);
    margin-bottom: 0.2rem;
}

.lesson-name {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    line-height: 1.3;
}

.start-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 14px rgba(0,102,255,0.3);
}

.start-btn:hover:not(:disabled) {
    background: #1a74ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0,102,255,0.4);
}

.start-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

/* Question Screen */
.question-screen { display: none; }

.progress-bar {
    height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-bottom: 1.75rem;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--blue-l));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.question-number {
    background: var(--blue);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,102,255,0.35);
}

.lesson-tag {
    background: rgba(94,159,255,0.12);
    color: var(--blue-l);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.progress-text {
    color: rgba(255,255,255,0.35);
    font-size: 0.78rem;
    margin-left: auto;
}

.question-text {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Answer textarea */
.answer-textarea {
    width: 100%;
    min-height: 130px;
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.65;
    resize: vertical;
    transition: border-color 0.2s, opacity 0.3s;
    background: rgba(255,255,255,0.035);
    color: white;
}

.answer-textarea:focus {
    outline: none;
    border-color: rgba(94,159,255,0.4);
    background: rgba(255,255,255,0.05);
}

.answer-textarea::placeholder {
    color: rgba(255,255,255,0.25);
}

/* Reveal button */
.reveal-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: none;
    color: var(--blue-l);
    border: 1px solid rgba(94,159,255,0.3);
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reveal-btn:hover {
    background: rgba(94,159,255,0.12);
    border-color: rgba(94,159,255,0.5);
    color: white;
}

/* Model Answer */
.model-answer-section {
    display: none;
    margin-top: 1.25rem;
}

.model-answer-box {
    background: rgba(94,203,138,0.06);
    border: 1px solid rgba(94,203,138,0.15);
    border-left: 3px solid var(--green);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem;
}

.model-answer-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.model-answer-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.75;
}

.key-points-section {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(94,203,138,0.12);
}

.key-points-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.5rem;
}

.key-points-list {
    list-style: none;
    padding: 0;
}

.key-points-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

.key-points-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
    font-size: 0.75rem;
}

/* Rating section */
.rating-section {
    display: none;
    gap: 0.6rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.rating-label {
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.rating-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 0.75rem;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: none;
}

.rating-btn:hover {
    transform: translateY(-2px);
}

.rating-nailed {
    border-color: rgba(94,203,138,0.35);
    color: var(--green);
}

.rating-nailed:hover {
    background: rgba(94,203,138,0.15);
    border-color: var(--green);
}

.rating-mostly {
    border-color: rgba(245,200,66,0.35);
    color: var(--gold);
}

.rating-mostly:hover {
    background: rgba(245,200,66,0.12);
    border-color: var(--gold);
}

.rating-not-really {
    border-color: rgba(224,85,85,0.35);
    color: var(--red);
}

.rating-not-really:hover {
    background: rgba(224,85,85,0.12);
    border-color: var(--red);
}

/* Results Screen */
.results-screen { display: none; }

.results-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.results-title {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.result-message {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
}

.results-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.breakdown-item {
    background: rgba(255,255,255,0.035);
    padding: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.breakdown-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.breakdown-label {
    color: rgba(255,255,255,0.35);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nailed-color { color: var(--green); }
.mostly-color { color: var(--gold); }
.not-really-color { color: var(--red); }
.time-color { color: rgba(255,255,255,0.5); }

.results-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.btn {
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 2px 12px rgba(0,102,255,0.3);
}

.btn-primary:hover {
    background: #1a74ff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--blue-l);
    border: 1px solid rgba(94,159,255,0.25);
}

.btn-secondary:hover {
    background: rgba(94,159,255,0.12);
}

/* Review List */
.review-section {
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.5rem;
}

.review-section h3 {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
}

.review-group {
    margin-bottom: 1.25rem;
}

.review-group-header {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.4rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid;
}

.review-not-really .review-group-header {
    color: var(--red);
    border-color: rgba(224,85,85,0.3);
}

.review-mostly .review-group-header {
    color: var(--gold);
    border-color: rgba(245,200,66,0.3);
}

.review-nailed .review-group-header {
    color: var(--green);
    border-color: rgba(94,203,138,0.3);
}

.review-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.review-lesson-tag {
    background: rgba(94,159,255,0.1);
    color: var(--blue-l);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
}

.review-question-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.45;
}

/* Footer */
.foot {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.76rem;
    color: rgba(255,255,255,0.18);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Responsive */
@media (max-width: 600px) {
    .nav { padding: 0.85rem 1.25rem; }
    .hero { padding: 2rem 1.25rem 1.5rem; }
    .content { padding: 0 1.25rem 3rem; }
    .quiz-card { padding: 1.25rem; }
    .lesson-grid { grid-template-columns: 1fr 1fr; }
    .results-breakdown { grid-template-columns: 1fr 1fr; }
    .rating-btn { min-width: 80px; }
}
