
:root {
    --navy: #2B5082;
    --blue: #AFCFFF;
    --green: #BFD8C2;
    --orange: #FFD6A5;
    --cream: #F8F6F1;
    --white: #FFFFFF;
    --text: #24324A;
    --muted: #708096;
    --border: #E4E8EE;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans Thai",
        Arial,
        sans-serif;

    background: var(--cream);
    color: var(--text);
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}

/* ============================= */
/* HEADER */
/* ============================= */

header {
    padding: 64px 0 36px;
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

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

    border-radius: 16px;

    font-size: 24px;
    font-weight: 800;

    margin-bottom: 18px;
}

h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 64px);
    letter-spacing: -2px;
}

.subtitle {
    color: var(--muted);
    margin-top: 12px;
    font-size: 17px;
}

/* ============================= */
/* SEARCH */
/* ============================= */

.search-container {
    max-width: 620px;
    margin: 12px auto 42px;
}

.search-box {
    width: 100%;
    padding: 18px 22px;

    font-size: 17px;

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

    background: white;

    outline: none;

    box-shadow: 0 8px 30px rgba(0,0,0,.04);

    transition: .2s;
}

.search-box:focus {
    border-color: var(--navy);
    box-shadow: 0 8px 30px rgba(43,80,130,.12);
}

/* ============================= */
/* GRID */
/* ============================= */

.card-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(190px,1fr));

    gap: 18px;

    padding-bottom: 80px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card-item {
    background: white;

    border-radius: 24px;

    min-height: 190px;

    padding: 24px;

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

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(43,80,130,.12);
}

.card-number {
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.card-title {
    font-size: 23px;
    font-weight: 750;
}

.card-arrow {
    font-size: 22px;
    color: var(--muted);
}

/* ============================= */
/* CARD PAGE */
/* ============================= */

.card-page {
    max-width: 720px;
    margin: auto;
    padding: 28px 0 80px;
}

.back {
    display: inline-block;

    margin: 20px 0 36px;

    color: var(--navy);

    text-decoration: none;
    font-weight: 650;
}

.game-card {
    background: white;

    border-radius: 32px;

    padding: clamp(26px, 6vw, 50px);

    box-shadow: 0 20px 60px rgba(0,0,0,.07);
}

.big-number {
    display: inline-block;

    padding: 8px 13px;

    background: var(--blue);

    border-radius: 100px;

    color: var(--navy);

    font-weight: 800;

    margin-bottom: 18px;
}

.game-title {
    font-size: clamp(32px,6vw,48px);
    margin: 0 0 22px;
}

.question {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ============================= */
/* CHOICES */
/* ============================= */

.choice {
    display: flex;
    align-items: flex-start;

    gap: 15px;

    padding: 16px 18px;

    background: #FAFBFC;

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

    border-radius: 16px;

    margin-bottom: 10px;

    line-height: 1.45;
}

.choice-letter {
    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--navy);

    color: white;

    font-weight: 800;
}

/* ============================= */
/* REVEAL BUTTON */
/* ============================= */

.reveal-button {
    width: 100%;

    margin-top: 28px;

    padding: 18px;

    border: none;
    border-radius: 16px;

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

    font-size: 18px;
    font-weight: 750;

    cursor: pointer;

    transition: .2s;
}

.reveal-button:hover {
    transform: translateY(-2px);
}

/* ============================= */
/* ANSWER */
/* ============================= */

.answer-area {
    margin-top: 35px;

    opacity: 0;
    transform: translateY(10px);

    max-height: 0;
    overflow: hidden;

    transition:
        opacity .35s,
        transform .35s,
        max-height .5s;
}

.answer-area.show {
    opacity: 1;
    transform: translateY(0);

    max-height: 900px;
}

.answer-heading {
    text-align: center;

    font-size: 15px;
    font-weight: 800;

    color: var(--muted);

    letter-spacing: 1px;

    margin-bottom: 16px;
}

.answer-row {
    display: flex;
    align-items: center;

    gap: 16px;

    padding: 18px;

    border-radius: 18px;

    margin-bottom: 10px;

    font-size: 21px;
    font-weight: 750;
}

.answer-row:nth-child(2) {
    background: #EFF5FF;
}

.answer-row:nth-child(3) {
    background: #FFF3E7;
}

.answer-row:nth-child(4) {
    background: #EFF8F0;
}

.answer-row:nth-child(5) {
    background: #F8F0FF;
}

.answer-letter {
    min-width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: white;

    border-radius: 50%;

    font-weight: 850;
}

.hidden {
    display: none !important;
}

/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width:600px) {

    header {
        padding-top: 42px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-item {
        min-height: 155px;
        padding: 18px;
        border-radius: 20px;
    }

    .card-title {
        font-size: 18px;
    }

    .game-card {
        border-radius: 24px;
    }
}
