/* shared styles for the text pages (how to play, questions) */

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: #fff;
    background-color: #2c3486;
}

/* static version of the start screen's gradient; stays put while the page scrolls */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/mesh-gradient-updated.webp") center / cover;
    z-index: -2;
}

/* fine grain on top of the gradient so it doesn't band */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.07;
    pointer-events: none;
    z-index: -1;
}

.page {
    box-sizing: border-box;
    width: min(880px, 100% - 32px);
    margin: 0 auto;
    padding: 28px 0 40px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.page-header img {
    display: block;
    width: auto;
    height: 40px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.page-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.page-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.page-nav a:hover,
.page-nav a[aria-current="page"] {
    background-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.page-nav .nav-play,
.page-nav .nav-play:hover {
    background-color: #fff;
    color: #1d2150;
}

/* dark glass card, same look as the start overlay */
.card {
    padding: 44px 48px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background-color: rgba(8, 9, 20, 0.6);
    background-image: linear-gradient(150deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0) 45%);
    box-shadow: 0 24px 64px rgba(10, 12, 40, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.card h1 {
    margin: 0 0 0.4em;
    font-size: 2.2em;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.card h2 {
    margin: 1.8em 0 0.6em;
    font-size: 1.35em;
    font-weight: 700;
    line-height: 1.3;
}

.card h3 {
    margin: 1.4em 0 0.3em;
    font-size: 1.05em;
    font-weight: 700;
}

.card p,
.card li {
    color: rgba(255, 255, 255, 0.85);
}

.card p {
    margin: 0 0 1em;
}

.card a {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 3px;
}

.card a:hover {
    text-decoration-color: #fff;
}

.card strong {
    color: #fff;
}

.lead {
    font-size: 1.1em;
}

/* numbered setup steps */
.steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    margin-bottom: 0.9em;
    padding-left: 2.6em;
    counter-increment: step;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 1.7em;
    height: 1.7em;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.14);
    font-size: 0.9em;
    font-weight: 700;
    color: #fff;
}

.question-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.question-list li {
    padding: 0.6em 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.question-list li:last-child {
    border-bottom: none;
}

/* "1" / "2" key chips, same as the start overlay's hint */
.vote-key {
    display: inline-grid;
    place-items: center;
    min-width: 1.6em;
    height: 1.6em;
    margin: 0 0.15em;
    border-radius: 0.45em;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.key-a {
    background-color: rgba(39, 163, 224, 1);
}

.key-b {
    background-color: #e44646;
}

/* call to action back to the game */
.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 2em 0 0;
    padding: 20px 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.06);
}

.cta p {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.card a.button,
.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 14px;
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(10, 12, 40, 0.25);
    font-weight: 700;
    color: #1d2150;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(10, 12, 40, 0.32);
}

.button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-footer {
    margin-top: 24px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.page-footer a {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 3px;
}

.page-footer span {
    margin: 0 8px;
    opacity: 0.6;
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .card h1 {
        font-size: 1.8em;
    }

    .page-header img {
        height: 32px;
    }
}
