/* :root {
    --background: #f4f1ea;
    --surface: #ffffff;
    --text: #202124;
    --muted: #6d6d6d;
    --border: #d9d4ca;
    --accent: #222;
    --success: #286c45;
} */

:root {
    --background: #f4f1ea;
    --surface: #ffffff;
    --text: #202124;
    --muted: #6d6d6d;
    --border: #d9d4ca;
    --accent: #222;
    --success: #11d456;

    --play-button: #11d456;
}

* {
    box-sizing: border-box;
}

.button.play-button {
    background: var(--play-button);
}

.button.play-button:hover {
    background: #3f7653;
}

html,
body {
    margin: 0;
    padding: 0;
}


body {
    min-height: 100vh;

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

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


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

    padding: 20px 30px;

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

    background: var(--surface);
}


.logo {
    color: var(--text);

    font-size: 1.3rem;
    font-weight: 800;

    text-decoration: none;
}


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


nav a {
    color: var(--muted);

    font-size: 0.9rem;

    text-decoration: none;
}


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


.page {
    width: min(
        1100px,
        calc(100% - 32px)
    );

    margin: 0 auto;
}


.hero,
.game,
.result-page,
.history {
    padding: 70px 0;
}


.hero {
    max-width: 800px;
    margin: 0 auto;

    text-align: center;
}


.eyebrow {
    margin: 0 0 12px;

    color: var(--muted);

    font-size: 0.8rem;
    font-weight: 800;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}


h1 {
    margin: 0 0 20px;

    font-size: clamp(
        2.2rem,
        6vw,
        4.5rem
    );

    line-height: 0.95;
}


.intro {
    max-width: 600px;
    margin: 0 auto 40px;

    color: var(--muted);

    font-size: 1.1rem;
    line-height: 1.6;
}


.challenge-card,
.result-card {
    padding: 35px;

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

    background: var(--surface);
}


.challenge-card {
    max-width: 650px;

    margin-left: auto;
    margin-right: auto;
}


.small {
    color: var(--muted);
    font-size: 0.9rem;
}


.button {
    display: inline-block;

    padding: 14px 24px;

    border-radius: 999px;

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

    font-weight: 700;

    text-decoration: none;

    transition:
        transform 120ms ease,
        opacity 120ms ease;
}


.button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


.button.secondary {
    background: transparent;
    color: var(--text);

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


.game {
    text-align: center;
}


.game-header {
    position: relative;

    margin-bottom: 45px;
}


.click-counter {
    display: inline-flex;
    flex-direction: column;

    margin-top: 10px;

    color: var(--muted);

    font-size: 0.85rem;
}


.click-counter strong {
    color: var(--text);

    font-size: 2rem;
}


.reels {
    display: flex;

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

    gap: clamp(
        4px,
        1.2vw,
        14px
    );

    width: 100%;

    margin: 0 auto;

    padding: 10px 0;
}


.reel {
    /*
     * The clamp allows 10 reels to fit on
     * a phone without making 5-letter words
     * unnecessarily tiny.
     */

    width: clamp(
        42px,
        9vw,
        92px
    );

    aspect-ratio: 0.78;

    padding: 0;

    overflow: hidden;

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

    background: var(--surface);

    cursor: pointer;

    box-shadow:
        0 4px 0 var(--border);

    transition:
        transform 100ms ease,
        box-shadow 100ms ease;
}


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


.reel:active {
    transform: translateY(2px);

    box-shadow:
        0 1px 0 var(--border);
}


.reel:disabled {
    cursor: default;
}


.reel-window {
    display: block;

    width: 100%;
    height: 100%;

    overflow: hidden;
}


.reel-strip {
    display: flex;

    flex-direction: column;

    will-change: transform;
}


.reel-letter {
    display: flex;

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

    width: 100%;

    aspect-ratio: 0.78;

    flex-shrink: 0;

    font-size: clamp(
        1.4rem,
        5vw,
        3rem
    );

    font-weight: 800;

    line-height: 1;
}


.current-word {
    margin-top: 35px;

    min-height: 1.5em;

    font-size: clamp(
        1.4rem,
        5vw,
        2.4rem
    );

    font-weight: 800;

    letter-spacing: 0.15em;
}


.hint {
    margin-top: 12px;

    color: var(--muted);

    font-size: 0.9rem;
}


.win-message {
    max-width: 500px;

    margin: 45px auto 0;
    padding: 35px;

    border-radius: 18px;

    background: var(--surface);

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


.win-message.hidden {
    display: none;
}


.win-icon {
    width: 50px;
    height: 50px;

    display: flex;

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

    margin: 0 auto 15px;

    border-radius: 50%;

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

    font-size: 1.5rem;
    font-weight: 800;
}


.win-message h2 {
    margin: 0 0 10px;
}


.result-page,
.history {
    max-width: 800px;

    margin: 0 auto;

    text-align: center;
}


.result-intro {
    color: var(--muted);
}


.result-card {
    margin: 35px 0;
}


.result-label {
    margin: 0 0 8px;

    color: var(--muted);

    font-size: 0.8rem;
    font-weight: 800;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}


.result-word {
    margin: 15px 0 35px;

    font-size: clamp(
        2rem,
        7vw,
        4rem
    );

    font-weight: 900;

    letter-spacing: 0.1em;
}


.big-score {
    font-size: 4rem;
    font-weight: 900;
}


.stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin: 40px 0;
}


.stat {
    padding: 25px;

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

    background: var(--surface);
}


.stat span,
.stat small {
    display: block;

    color: var(--muted);
}


.stat strong {
    display: block;

    margin: 5px 0;

    font-size: 2rem;
}


.history-list {
    overflow: hidden;

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

    background: var(--surface);
}


.history-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 18px 22px;

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

    text-align: left;
}


.history-row:last-child {
    border-bottom: 0;
}


.history-row strong,
.history-row span {
    display: block;
}


.history-row span {
    margin-top: 3px;

    color: var(--muted);

    font-size: 0.8rem;
}


.history-score {
    font-weight: 800;

    text-align: right;
}


.history-score small {
    color: var(--muted);
}


.unfinished {
    font-weight: 500;
}


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


footer {
    padding: 30px;

    color: var(--muted);

    font-size: 0.8rem;

    text-align: center;
}


@media (max-width: 600px) {

    .site-header {
        padding: 15px;

        flex-direction: column;
        gap: 12px;
    }


    nav {
        gap: 12px;
    }


    .page {
        width: min(
            100% - 20px,
            1100px
        );
    }


    .hero,
    .game,
    .result-page,
    .history {
        padding: 45px 0;
    }


    .reels {
        gap: 4px;
    }


    .reel {
        width: clamp(
            32px,
            calc(
                (100vw - 45px) / 10
            ),
            68px
        );

        border-radius: 8px;
    }


    .reel-letter {
        font-size: clamp(
            1.1rem,
            7vw,
            2rem
        );
    }


    .current-word {
        letter-spacing: 0.08em;
    }


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


    .challenge-card,
    .result-card {
        padding: 25px 18px;
    }

 .word-status {
margin-top: 30px;
}

.status-message {
margin-bottom: 6px;


font-size: 0.8rem;
font-weight: 800;

letter-spacing: 0.12em;
text-transform: uppercase;


}

.status-message.incorrect {
color: #9b3b3b;
}

.status-message.correct {
color: var(--success);
}

/*

* Override the earlier current-word styling
* so the status message sits directly above it.
  */
  .current-word {
  margin-top: 0;

  min-height: 1.5em;

  font-size: clamp(
  1.4rem,
  5vw,
  2.4rem
  );

  font-weight: 800;

  letter-spacing: 0.15em;
  }

/* How to play */

.how-to-play {
max-width: 650px;


margin: 0 auto 40px;
padding: 25px 30px;

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

background: var(--surface);

text-align: left;


}

.how-to-play h2 {
margin: 0 0 12px;


font-size: 1.2rem;


}

.how-to-play p {
margin: 0;


color: var(--muted);

line-height: 1.6;


}

/* Mobile */

@media (max-width: 600px) {


.site-header {
    padding: 15px;

    flex-direction: column;
    gap: 12px;
}


nav {
    gap: 12px;
}


.page {
    width: min(
        100% - 20px,
        1100px
    );
}


.hero,
.game,
.result-page,
.history {
    padding: 45px 0;
}


.reels {
    gap: 4px;
}


.reel {
    width: clamp(
        32px,
        calc(
            (100vw - 45px) / 10
        ),
        68px
    );

    border-radius: 8px;
}


.reel-letter {
    font-size: clamp(
        1.1rem,
        7vw,
        2rem
    );
}


.current-word {
    min-height: 1.5em;

    font-size: clamp(
        1.4rem,
        5vw,
        2.4rem
    );

    font-weight: 800;

    letter-spacing: 0.15em;
}


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


.challenge-card,
.result-card {
    padding: 25px 18px;
}


.how-to-play {
    padding: 22px;
}


}




}

.how-to-play {
    max-width: 650px;

    margin: 0 auto 40px;
    padding: 25px 30px;

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

    background: var(--surface);

    text-align: left;
}


.how-to-play h2 {
    margin-top: 0;
    margin-bottom: 12px;

    font-size: 1.2rem;
}


.how-to-play p {
    margin: 0;

    color: var(--muted);

    line-height: 1.6;
}


@media (max-width: 600px) {

    .how-to-play {
        padding: 22px;
    }

}