/* =====================================================
   COURS PYTHON - STYLESHEET
   Créé par Geoffroy Streit - 2026
   Thème bleu/jaune (couleurs Python officielles)
   ===================================================== */

:root {
    --primary: #3776ab;
    --secondary: #ffd43b;
    --accent: #4b8bbe;
    --bg: #0c1117;
    --bg2: #111920;
    --card: #151d27;
    --text: #e8f4ff;
    --muted: #8ba4c7;
    --dim: #5a7094;
    --border: #1e2d3d;
    --green: #10b981;
    --purple: #a78bfa;
    --pink: #f472b6;
    --orange: #fb923c;
    --red: #f87171;
    --yellow: #ffd43b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 99;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--secondary);
    color: #000;
    transform: translateY(-3px);
}

.badge-new {
    background: #e74c3c;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: bold;
}

/* === HEADER === */
header {
    position: sticky;
    top: 0;
    background: rgba(12, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 16px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 4px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

nav a:hover {
    background: var(--card);
    color: var(--text);
}

/* === HAMBURGER MENU === */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 105;
}

.hamburger-btn span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === MOBILE MENU OVERLAY === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu-item {
    color: var(--text);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: var(--card);
    border-left-color: var(--primary);
    padding-left: 20px;
}

/* === HERO === */
.hero {
    padding: 70px 0 50px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(ellipse at top, rgba(55, 118, 171, 0.15) 0%, transparent 60%);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text), var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
}

.hero p {
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* === TOC === */
.toc {
    padding: 35px 0;
    border-bottom: 1px solid var(--border);
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.toc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    transition: all 0.2s;
}

.toc-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    background: rgba(55, 118, 171, 0.1);
}

.toc-num {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* === SECTIONS === */
section {
    padding: 55px 0;
    border-bottom: 1px solid var(--border);
}

.sec-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 30px;
}

.sec-num {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    flex-shrink: 0;
}

section:nth-child(odd) .sec-num {
    background: linear-gradient(135deg, var(--secondary), var(--orange));
    color: #1a1a1a;
}

section:nth-child(3n) .sec-num {
    background: linear-gradient(135deg, var(--green), #059669);
}

section:nth-child(4n) .sec-num {
    background: linear-gradient(135deg, var(--purple), #7c3aed);
}

.sec-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.sec-sub {
    color: var(--dim);
    font-size: 0.95rem;
}

h3 {
    font-size: 1.15rem;
    margin: 28px 0 14px;
    color: var(--secondary);
}

p,
li {
    color: var(--muted);
    margin-bottom: 8px;
}

ul {
    list-style: none;
    padding-left: 0;
}

li {
    padding-left: 22px;
    position: relative;
}

li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* === CODE BLOCKS === */
.code {
    background: #080c10;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 14px 0;
    overflow: hidden;
}

.code-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #0d1318;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--dim);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.r {
    background: #ff5f56;
}

.dot.y {
    background: #ffbd2e;
}

.dot.g {
    background: #27ca40;
}

pre {
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    overflow-x: auto;
}

.kw {
    color: var(--purple);
}

.fn {
    color: var(--primary);
}

.str {
    color: var(--green);
}

.num {
    color: var(--orange);
}

.c {
    color: var(--dim);
}

.var {
    color: var(--pink);
}

.prop {
    color: var(--accent);
}

.op {
    color: var(--muted);
}

.dec {
    color: var(--yellow);
}

.cls {
    color: var(--secondary);
}

/* === DEMOS === */
.demo {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px;
    margin: 14px 0;
}

.demo-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--dim);
    margin-bottom: 14px;
}

.demo-output {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    min-height: 50px;
    white-space: pre-wrap;
}

/* === GRIDS === */
.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* === TIP BOX === */
.tip {
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--green);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
}

.tip strong {
    color: var(--green);
}

.info {
    background: rgba(55, 118, 171, 0.1);
    border-left: 3px solid var(--primary);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
}

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

.warning {
    background: rgba(248, 113, 113, 0.1);
    border-left: 3px solid var(--red);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
}

.warning strong {
    color: var(--red);
}

/* === REFERENCE CARDS === */
.ref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.ref-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.ref-card h4 {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.ref-card code {
    color: var(--primary);
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.78rem;
    margin: 2px;
    display: inline-block;
}

/* === TABLES === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 0.88rem;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--card);
    color: var(--secondary);
    font-weight: 600;
}

td {
    color: var(--muted);
}

td code {
    color: var(--primary);
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
}

/* === FOOTER === */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

footer strong {
    color: var(--muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .desktop-nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }

    .sec-header {
        flex-direction: column;
    }

    .toc-grid {
        grid-template-columns: 1fr 1fr;
    }

    .grid2 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none;
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg2);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* === COLLAPSIBLE DETAILS === */
details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 16px 0;
    overflow: hidden;
}

details summary {
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

details summary:hover {
    background: rgba(255, 212, 59, 0.05);
}

details summary::before {
    content: '▶';
    font-size: 0.7rem;
    transition: transform 0.2s;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details>div {
    padding: 0 18px 18px;
    color: var(--muted);
    line-height: 1.8;
}

details p {
    margin-bottom: 12px;
}

details .code {
    margin: 12px 0;
}

/* =====================================================
   ENRICHMENT PROJECT UTILITIES
   ===================================================== */

/* Interactive Demo Box */
.interactive-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.interactive-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Cheat Sheet Table */
.cheat-sheet {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
    background: var(--card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.cheat-sheet th {
    background: rgba(55, 118, 171, 0.2);
    color: var(--text);
    text-align: left;
    padding: 10px 15px;
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
}

.cheat-sheet td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
}

.cheat-sheet tr:last-child td {
    border-bottom: none;
}

.cheat-sheet code {
    background: rgba(55, 118, 171, 0.1);
    color: var(--secondary);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* Best/Bad Practices */
.practice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.best-practice,
.bad-practice {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    background: var(--bg2);
}

.best-practice {
    border-color: #27ae60;
    /* Green */
    background: rgba(39, 174, 96, 0.05);
}

.bad-practice {
    border-color: #e74c3c;
    /* Red */
    background: rgba(231, 76, 60, 0.05);
}

.practice-title {
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.best-practice .practice-title {
    color: #27ae60;
}

.bad-practice .practice-title {
    color: #e74c3c;
}

@media (max-width: 768px) {
    .practice-grid {
        grid-template-columns: 1fr;
    }
}

/* Timeline specific styles (for Mod 00) */
.timeline-container {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    position: relative;
    padding-bottom: 20px;
}

.timeline-line {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.timeline-point {
    position: relative;
    z-index: 1;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.timeline-point:hover {
    transform: translateY(-5px);
}

.point-dot {
    width: 30px;
    height: 30px;
    background: var(--card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text);
    transition: all 0.3s;
}

.timeline-point.active .point-dot {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(55, 118, 171, 0.5);
}

.point-label {
    font-size: 0.8rem;
    color: var(--muted);
}

.timeline-content {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
    min-height: 80px;
    transition: opacity 0.3s;
}

/* Memory Box (Mod 01) */
.memory-box-container {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    background: var(--bg2);
    padding: 20px;
    border-radius: 8px;
}

.memory-var {
    text-align: center;
}

.memory-arrow {
    font-size: 1.5rem;
    color: var(--dim);
}

.memory-value {
    width: 100px;
    height: 60px;
    border: 2px solid var(--muted);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: var(--text);
    transition: all 0.3s;
    background: var(--card);
}

.memory-value.type-int {
    border-color: var(--orange);
    color: var(--orange);
}

.memory-value.type-str {
    border-color: var(--green);
    color: var(--green);
}

.memory-value.type-list {
    border-color: var(--purple);
    color: var(--purple);
}

/* Badge NEW */
.badge-new {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* === TOOLTIPS (Mod 14) === */
[data-tooltip] {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--accent);
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    /* Allows multiline */
    z-index: 1000;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    text-align: center;
    pointer-events: none;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 90%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
    z-index: 1000;
}

/* === QUIZ UI OVERHAUL === */
section#quiz-section {
    padding: 60px 0;
    /* background: linear-gradient(180deg, transparent 0%, rgba(0,255,136, 0.02) 100%); */
}

/* Glass Container */
.quiz-game,
.quiz-intro,
.quiz-results {
    background: rgba(30, 30, 35, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quiz-game:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Intro */
.quiz-intro {
    text-align: center;
}

.quiz-intro h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.quiz-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    box-shadow: 0 0 15px var(--accent);
}

/* Progress Bar */
.quiz-header {
    margin-bottom: 25px;
}

.quiz-progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.quiz-progress-bar>div {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent);
}

.quiz-stats {
    text-align: right;
    font-size: 0.85rem;
    color: var(--dim);
    font-family: 'JetBrains Mono', monospace;
}

/* Question */
.quiz-question h4 {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 30px;
    color: var(--text);
    font-weight: 600;
}

/* Options Grid */
.quiz-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 600px) {
    .quiz-options {
        grid-template-columns: 1fr 1fr;
    }
}

/* Option Buttons */
.quiz-option {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    color: var(--muted);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.quiz-option:hover:not(.selected):not([disabled]) {
    border-color: var(--accent);
    background: var(--bg);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: var(--text);
}

.quiz-option:hover:not(.selected):not([disabled])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0.05;
}

.opt-letter {
    font-weight: bold;
    color: var(--dim);
    background: var(--bg);
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.quiz-option:hover .opt-letter {
    color: var(--accent);
    border-color: var(--accent);
}

/* States */
.quiz-option.selected {
    pointer-events: none;
}

.quiz-option.correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.quiz-option.correct .opt-letter {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.quiz-option.wrong {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

.quiz-option.wrong .opt-letter {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

/* Feedback */
.quiz-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    animation: slideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quiz-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.quiz-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.feedback-icon {
    font-size: 1.5rem;
}

.feedback-text strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
}

.feedback-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Controls */
.quiz-controls {
    margin-top: 20px;
    text-align: right;
    animation: fadeIn 0.3s ease;
}

/* Results */
.quiz-results {
    text-align: center;
    padding: 40px;
}

.score-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    position: relative;
    background: var(--bg);
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    /* border thickness */
    border-radius: 50%;
    z-index: -1;
    background: inherit;
    /* Handled inline for gradient */
}

.score-circle span {
    z-index: 2;
}

/* Anim */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Buttons */
.quiz-btn {
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.quiz-btn.primary {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.quiz-btn.primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 20px var(--accent);
    transform: translateY(-2px);
}