:root {
    --bg: #0a0a0a;
    --panel: #1a1a1a;
    --accent: #89cff0;
    --accent2: #ff69b4;
    --text: #e0e0e0;
    --muted: #a0a0a0;
    --ok: #75f8b0;
    --partial: #ffe08a;
    --bad: #ff7a7a;
    --border: #333;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--panel);
    border-bottom: 2px solid var(--accent2);
    padding: 1.5rem 2rem;
}

h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    letter-spacing: 0.3px;
    font-weight: 800;
    color: var(--accent2);
}

.subtitle {
    color: var(--muted);
    margin: 0 0 10px 0;
    font-size: 14px;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 6px;
}

button {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.05s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background: var(--panel);
}

button:active {
    transform: translateY(1px);
}

main {
    padding: 2rem 2rem;
}

section.topic {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

section.topic h2 {
    margin: 0 0 1rem 0;
    font-size: 20px;
    color: var(--accent);
}

.question {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    background: var(--bg);
}

.qtitle {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 10px 0;
}

.qrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.answer {
    margin-top: 10px;
    padding: 10px;
    border-left: 3px solid var(--accent);
    background: var(--panel);
    display: none;
    color: var(--text);
}

.markgrp {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-size: 12px;
    user-select: none;
    transition: all 0.15s ease;
}

.mark:hover {
    background: var(--panel);
}

.mark.ok {
    border-color: #245842;
    background: #0d1a15;
    color: var(--ok);
}

.mark.partial {
    border-color: #5a4a24;
    background: #1a150d;
    color: var(--partial);
}

.mark.bad {
    border-color: #5a2a2a;
    background: #1a0f0f;
    color: var(--bad);
}

.mark.active {
    outline: 2px solid currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05), inset 0 0 0 999px rgba(255, 255, 255, 0.02);
}

.foot {
    margin: 18px 0;
    color: var(--muted);
    font-size: 13px;
}

.results {
    margin: 22px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    display: none;
}

.rating {
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--accent2);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 12px;
}
