/* Shared components of the per-game landing pages (acc.html, iracing.html,
   lmu.html): the car-picker grid plus the intro copy and FAQ sections that
   sit above/below it. Generated markup for the car grid and the FAQ's
   supported-car list lives between CAR_PICKER / CAR_LIST marker comments in
   each page and is produced by tools/generate_car_pickers.py from
   api/config/car_catalog.json — edit the catalog, not the HTML. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.game-page {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding-top: 90px;
    padding-bottom: 90px;
}
.game-page > header {
    width: var(--game-container-width, 92%);
    max-width: 1800px;
    margin: 6px 0 14px;
    text-align: center;
}
.game-page > header img {
    width: 250px;
    height: auto;
}
.game-page > header h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}
.game-page .container {
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 193, 7, 0.08), transparent 28%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
        linear-gradient(180deg, rgba(46, 46, 46, 0.98), rgba(30, 30, 30, 0.98));
    padding: 18px 34px 24px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 12px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
    width: var(--game-container-width, 92%);
    max-width: 1800px;
}
.game-page .container::before {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}
.game-page .intro-copy {
    max-width: none;
    margin: 0 0 12px;
    text-align: center;
}
.game-page .intro-copy p {
    color: var(--color-accent-lighter);
    font-size: 0.86rem;
    font-weight: 600;
}
.game-page h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--color-text);
}
.game-page footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}
.intro-copy {
    text-align: center;
    margin-bottom: 20px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.intro-copy p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0;
}
.intro-copy a {
    color: var(--color-accent-lighter);
}
.faq {
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 193, 7, 0.18);
    text-align: left;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.faq h2 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    color: var(--color-text);
}
.faq-item {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
}
.faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-accent-lighter);
    font-size: 0.98rem;
}
.faq-item p {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text-soft);
}
.faq-item a {
    color: var(--color-accent-lighter);
}
.car-list {
    margin: 0;
    padding-left: 20px;
    columns: 2;
    column-gap: 20px;
}
.car-list li {
    break-inside: avoid;
}
.car-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 290px));
    justify-content: center;
    gap: 20px;
}
.car-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 193, 7, 0.32);
    border-radius: 8px;
    background: #171717;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.car-item:hover,
.car-item:focus-within {
    border-color: rgba(255, 193, 7, 0.86);
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 193, 7, 0.18);
    filter: saturate(1.08);
}
.car-button {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    background-size: cover;
    background-position: center;
    border: none;
    border-radius: 0;
    cursor: pointer;
    overflow: hidden;
}
.car-button:hover {
    transform: none;
    box-shadow: none;
}
.car-button.disabled {
    filter: grayscale(100%);
    cursor: not-allowed;
}
.car-button.disabled:hover,
.car-button:disabled:hover {
    transform: none;
    box-shadow: none;
}
.car-nameplate {
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    color: var(--color-ink);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: center;
    padding: 10px 12px;
    border-radius: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.car-item--disabled .car-nameplate {
    background: rgba(255, 193, 7, 0.35);
    color: var(--color-text-muted);
}
/* Per-car description: visually hidden but announced by screen readers, for
   accessibility context (car class/notes) beyond just the name — not an SEO
   mechanism. Search engines get per-car descriptions from the JSON-LD
   ItemList in <head> instead (see tools/generate_car_pickers.py), since
   CSS-hidden text carries little to no ranking weight. */
.car-blurb {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.car-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}
.car-section {
    min-height: 0;
    padding: 16px 18px 18px;
    border: 1px solid rgba(255, 193, 7, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 193, 7, 0.08), transparent 24%),
        rgba(10, 10, 10, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.car-section .car-selection {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 290px));
    justify-content: center;
    gap: 14px;
}
.car-section:first-child {
    padding-top: 0;
}
.car-section__title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    color: var(--color-accent-lighter);
    font-size: 1.05rem;
    text-align: center;
    text-transform: uppercase;
    width: auto;
    min-width: 116px;
    padding: 8px 16px;
    border-left: 3px solid var(--color-accent);
    border-bottom: 1px solid rgba(255, 193, 7, 0.28);
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.05));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
@media (min-width: 1200px) {
    .car-section {
        display: block;
    }
    .car-section__title {
        margin-bottom: 12px;
    }
    .car-selection,
    .car-section .car-selection {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
        overflow-x: visible;
        overscroll-behavior-inline: contain;
        scroll-snap-type: none;
        padding: 0;
    }
    .car-item,
    .car-section .car-item {
        flex: 0 0 clamp(188px, 14vw, 228px);
    }
}
@media (min-width: 1380px) {
    .car-item,
    .car-section .car-item {
        flex-basis: clamp(206px, 12vw, 238px);
    }
}
@media (min-width: 1600px) {
    .car-section {
        position: static;
        padding: 18px 22px 18px;
    }
    .car-section__title {
        position: static;
        justify-content: center;
        margin-bottom: 14px;
        min-height: 0;
    }
}
@media (min-width: 2200px) {
    .game-page .container,
    .game-page > header {
        max-width: 3000px;
    }
    .car-item,
    .car-section .car-item {
        flex-basis: 248px;
    }
}
@media (max-width: 720px) {
    .game-page .container {
        padding: 22px 16px;
    }
    .car-selection,
    .car-section .car-selection {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .car-nameplate {
        font-size: 0.92rem;
        padding: 8px;
    }
    .game-page .container {
        padding: 22px 16px;
    }
    .car-nameplate {
        padding: 10px 12px;
        font-size: 0.92rem;
    }
}
.tutorial-cta {
    margin-top: 25px;
    padding: 18px 20px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.35);
    text-align: left;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.tutorial-cta p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--color-accent-lighter);
}
.tutorial-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    color: var(--color-ink);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tutorial-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}
