:root {
    --bg: #f6f5f1;
    --surface: #ffffff;
    --surface-2: #eeece6;
    --text: #171717;
    --muted: #77746d;
    --border: #dedbd3;

    --shift: #536dfe;
    --clue: #e85d75;
    --remember: #45a982;
    --seconds: #e69a35;

    --radius: 22px;
}

[data-theme="dark"] {
    --bg: #11110f;
    --surface: #1b1b18;
    --surface-2: #252521;
    --text: #f5f3ed;
    --muted: #aaa79e;
    --border: #35352f;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    min-height: 100vh;
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    height: 78px;
    padding: 0 28px;

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

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

    position: sticky;
    top: 0;
    z-index: 100;

    background: color-mix(
        in srgb,
        var(--bg) 92%,
        transparent
    );

    backdrop-filter: blur(12px);
}

.brand {
    border: 0;
    background: none;
    color: var(--text);

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0;
}

.brand-mark {
    font-weight: 900;
    letter-spacing: -0.08em;
    font-size: 24px;
}

.brand-name {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.12em;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    width: 42px;
    height: 42px;

    border-radius: 50%;
    border: 1px solid var(--border);

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

    display: grid;
    place-items: center;

    transition: 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-2px);
    background: var(--surface-2);
}

main {
    max-width: 900px;
    margin: auto;
    padding: 55px 22px 80px;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

.hero {
    text-align: center;
    margin-bottom: 45px;
}

.eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--muted);
    margin: 0 0 15px;
}

.hero h1,
.stats-page h1 {
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.95;
    letter-spacing: -0.06em;
    margin: 0;
}

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

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.game-card {
    min-height: 240px;

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

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

    padding: 25px;

    text-align: left;

    position: relative;
    overflow: hidden;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.game-number {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}

.game-icon {
    position: absolute;
    right: 25px;
    top: 25px;

    font-size: 35px;
    font-weight: 900;
}

.game-info {
    position: absolute;
    left: 25px;
    bottom: 25px;
}

.game-info h2 {
    font-size: 25px;
    margin: 0 0 5px;
    letter-spacing: -0.04em;
}

.game-info p {
    margin: 0;
    color: var(--muted);
}

.play-arrow {
    position: absolute;
    right: 25px;
    bottom: 25px;

    font-size: 22px;
    font-weight: 800;
}

.completed {
    display: none;

    position: absolute;
    right: 25px;
    top: 75px;

    width: 30px;
    height: 30px;

    border-radius: 50%;

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

    place-items: center;

    font-size: 14px;
}

.game-card.is-completed .completed {
    display: grid;
}

.shift-card {
    border-top: 5px solid var(--shift);
}

.clue-card {
    border-top: 5px solid var(--clue);
}

.remember-card {
    border-top: 5px solid var(--remember);
}

.seconds-card {
    border-top: 5px solid var(--seconds);
}

.streak-card {
    margin-top: 15px;

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

    border-radius: var(--radius);

    padding: 20px 25px;

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

.streak-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.streak-card strong {
    font-size: 32px;
}

.streak-fire {
    font-size: 32px;
}

.back-button {
    border: 0;
    background: none;
    color: var(--muted);

    padding: 5px 0;

    font-weight: 700;
}

.back-button:hover {
    color: var(--text);
}

#gameContainer {
    max-width: 650px;
    margin: 35px auto;
}

.game-header {
    text-align: center;
    margin-bottom: 35px;
}

.game-header .game-title {
    font-size: 50px;
    letter-spacing: -0.06em;
    margin: 0;
}

.game-description {
    color: var(--muted);
}

.game-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
}

.primary-button {
    width: 100%;

    padding: 15px 20px;

    border: 0;
    border-radius: 12px;

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

    font-weight: 800;

    transition: 0.2s ease;
}

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

.secondary-button {
    width: 100%;

    padding: 13px 20px;

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

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

    font-weight: 700;
}

.result {
    text-align: center;
    padding: 30px 10px;
}

.result h2 {
    font-size: 35px;
    margin: 0 0 10px;
}

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

.streak-result {
    margin: 20px 0;
    font-size: 18px;
    font-weight: 800;
}

.share-button {
    margin-top: 15px;
}

/* SHIFT */

.shift-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;

    max-width: 300px;
    margin: 25px auto;
}

.shift-cell {
    aspect-ratio: 1;

    border: 0;
    border-radius: 14px;

    background: var(--surface-2);

    font-size: 30px;
    font-weight: 900;

    color: var(--text);
}

.shift-cell.selected {
    outline: 3px solid var(--shift);
}

.shift-target {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.shift-target-grid {
    display: grid;
    grid-template-columns: repeat(3, 35px);
    gap: 4px;

    justify-content: center;

    margin: 10px auto 25px;
}

.shift-target-cell {
    width: 35px;
    height: 35px;

    border-radius: 7px;

    background: var(--surface-2);

    display: grid;
    place-items: center;

    font-weight: 800;
}

/* ONE CLUE */

.clue-question {
    font-size: 26px;
    line-height: 1.35;
    text-align: center;

    padding: 35px 10px;
}

.answer-input {
    width: 100%;

    padding: 15px;

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

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

    outline: none;

    text-align: center;
}

.answer-input:focus {
    border-color: var(--text);
}

/* REMEMBER */

.memory-display {
    min-height: 300px;

    display: grid;
    place-items: center;

    position: relative;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 55px);
    gap: 9px;
}

.memory-item {
    width: 55px;
    height: 55px;

    border-radius: 12px;

    background: var(--surface-2);

    display: grid;
    place-items: center;

    font-size: 25px;
}

.memory-countdown {
    text-align: center;
    font-size: 45px;
    font-weight: 900;
}

/* 30 SECONDS */

.timer {
    text-align: center;
    font-size: 65px;
    font-weight: 900;
    letter-spacing: -0.07em;

    margin: 15px 0 25px;
}

.challenge {
    text-align: center;
}

.challenge-question {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 25px;
}

.challenge-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.challenge-option {
    padding: 15px;

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

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

    font-weight: 800;
}

.challenge-option:hover {
    background: var(--surface-2);
}

/* STATS */

.stats-page {
    text-align: center;
}

.big-stat {
    margin: 40px auto;

    width: 190px;
    height: 190px;

    border-radius: 50%;

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

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.big-stat span {
    font-size: 28px;
}

.big-stat strong {
    font-size: 55px;
    line-height: 1;
}

.big-stat small {
    color: var(--muted);
}

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

.stat-box {
    background: var(--surface);
    border: 1px solid var(--border);

    border-radius: 18px;

    padding: 25px;
}

.stat-box strong {
    display: block;
    font-size: 30px;
}

.stat-box span {
    color: var(--muted);
    font-size: 13px;
}

footer {
    max-width: 900px;
    margin: auto;

    padding: 25px 22px;

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

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

    color: var(--muted);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

/* MOBILE */

@media (max-width: 650px) {

    .site-header {
        padding: 0 17px;
        height: 68px;
    }

    .brand-name {
        font-size: 11px;
    }

    main {
        padding: 40px 15px 60px;
    }

    .hero {
        margin-bottom: 30px;
    }

    .hero h1 {
        font-size: 48px;
    }

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

    .game-card {
        min-height: 180px;
    }

    .game-info h2 {
        font-size: 23px;
    }

    .game-icon {
        font-size: 30px;
    }

    .game-header .game-title {
        font-size: 42px;
    }

    .memory-grid {
        grid-template-columns: repeat(4, 45px);
        gap: 7px;
    }

    .memory-item {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
