:root {
    --bg: #f5f7fb;
    --card: rgba(255, 255, 255, 0.92);
    --text: #132238;
    --muted: #5b6472;
    --accent: #4f7cff;
    --accent-dark: #3652d9;
    --good: #16a34a;
    --bad: #dc2626;
    --border: rgba(19, 34, 56, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(180deg, #111827 0 180px, var(--bg) 180px 100%);
    min-height: 100vh;
}

header {
    color: white;
    text-align: center;
    padding: 42px 20px 24px;
}

header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: 0.3px;
}

#quizScreen,
#scoreScreen {
    width: min(900px, calc(100% - 32px));
    margin: 24px auto 40px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

#scoreScreen {
    display: none;
    text-align: center;
}

#questionText {
    font-size: 1.35rem;
    line-height: 1.5;
    margin: 18px 0 20px;
}

#questionNumber {
    color: var(--accent-dark);
    font-weight: bold;
}

#answerButtons {
    display: grid;
    gap: 12px;
}

.answer-option,
#startButton,
#nextButton,
#memoryButton,
.button-link {
    width: 100%;
    display: block;
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.answer-option {
    background: #eef2ff;
    color: var(--text);
    border: 1px solid #dbe4ff;
}

.answer-option:hover:not(:disabled) {
    background: #e0e7ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(79, 124, 255, 0.12);
}

.answer-option:disabled {
    cursor: default;
    opacity: 0.95;
}

.answer-option.correct {
    background: #dcfce7;
    border-color: #86efac;
}

.answer-option.wrong {
    background: #fee2e2;
    border-color: #fca5a5;
}

#startButton,
#nextButton,
#memoryButton,
.button-link {
    background: linear-gradient(135deg, var(--accent), #6d8cff);
    color: white;
    box-shadow: 0 12px 24px rgba(79, 124, 255, 0.22);
}

#startButton:hover,
#nextButton:hover,
#memoryButton:hover,
.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 124, 255, 0.28);
}

#feedback {
    min-height: 1.5em;
    margin: 16px 0 12px;
    font-weight: bold;
    color: var(--muted);
}

#scoreScreen h2 {
    margin-top: 0;
}

#finalScore {
    font-weight: bold;
    color: var(--accent-dark);
}

#scoreMessage {
    font-size: 1.1rem;
    color: var(--muted);
    margin: 12px 0 22px;
}

.subtitle {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.8);
}

.memory-page {
    width: min(1000px, calc(100% - 32px));
    margin: 24px auto 40px;
}

.memory-intro {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

.month-list {
    display: grid;
    gap: 18px;
}

.month-card {
    display: flex;
    flex-direction: column;
    gap: 16px;

    background: white;
    padding: 24px;
    border-radius: 18px;

    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}
.month-name {
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.month-card img {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.caption {
    width: 100%;
    margin: 0;

    color: var(--text);
    line-height: 1.6;

    text-align: left;
}

.memory-bottom {
    margin-top: 22px;
    text-align: center;
}

.button-link {
    display: inline-block;
    width: auto;
    padding: 12px 18px;
}

#startScreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

#startScreen #startButton,
#startScreen .button-link {
    width: min(420px, 100%);
    display: block;
    padding: 16px 18px;
    font-size: 1.1rem;
}

#skipQuizButton {
    position: fixed;
    right: 24px;
    bottom: 24px;

    width: auto;
    padding: 10px 16px;

    background: white;
    color: var(--muted);

    border: 1px solid var(--border);
    border-radius: 12px;

    font-size: 0.9rem;
    cursor: pointer;

    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

#skipQuizButton:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 100%;
    max-width: 700px;
    margin: 20px auto 28px;
}

.collage img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}