/* --- Correzione Hero Section & Scroll --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto !important; /* Forza sempre la possibilità di fare scroll */

}

/* Reset essenziale */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #111; color: #fff; font-family: 'Courier New', Courier, monospace; }

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}

/* Contenitore Canvas + CRT */
#crt-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 600px;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    overflow: hidden;
}
canvas {
    display: block;
    image-rendering: pixelated; /* Mantiene netti i bordi della pixel art */
    width: 100%;
    height: 100%;
}

/* Effetto Scanlines CRT */
.crt-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; /* Cruciale per permettere il touch sul canvas */
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 10;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 0.9; }
    100% { opacity: 0.95; }
}

/* Interfaccia Touch Mobile */
.touch-ui {
    display: none; /* Nascosto di default, gestito da media query */
    width: 100%;
    padding: 20px;
    justify-content: space-between;
    position: absolute;
    bottom: 0;
    z-index: 20;
}

.d-pad, .action-buttons { display: flex; flex-direction: column; align-items: center; }
.d-pad-row { display: flex; gap: 10px; }
button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid #555;
    color: white;
    height: 50px;
    border-radius: 5px;
    font-size: 20px;
    touch-action: manipulation; /* Previene lo zoom al doppio tap */
}
button:active { background: rgba(0, 255, 0, 0.5); }

/* Mostra i controlli su schermi piccoli */
@media (max-width: 768px) {
    .touch-ui { display: flex; }
    #crt-container { max-height: calc(100vh - 120px); } /* Lascia spazio ai controlli */
}


/* Fine partita, sigla e classifica: vedi arcade-ui.css */
.hidden { display: none !important; }

/* --- Stili SEO Testuali --- */
.seo-header, .seo-description {
    text-align: center;
    max-width: 800px;
    margin: 10px auto;
    padding: 0 15px;
}
.seo-header h1 { font-size: 1.5rem; color: #00ff00; }

/* Il titolo visibile non deve finire sotto la barra dei bottoni in alto a destra:
   sugli schermi medi va a sinistra della barra, su quelli piccoli sotto */
@media (max-width: 1100px) {
    .seo-header { max-width: none; margin: 0; padding: 26px 330px 10px 20px; text-align: left; }
}
@media (max-width: 768px) {
    .seo-header { padding: 80px 15px 10px; text-align: center; }
}
.seo-description h2 { font-size: 1.2rem; color: #ff0044; margin-bottom: 5px; }
.seo-description p { font-size: 0.9rem; color: #ccc; line-height: 1.4; }

/* --- Barra Utilità (HUD) --- */
#utility-bar {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 50;
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.75);
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #444;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#utility-bar button {
    background: #222;
    border: 1px solid #555;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    min-width: 40px;   /* i bottoni con icona restano quadrati... */
    width: auto;       /* ...quelli con testo (es. TUNE) si allargano */
    padding: 0 6px;
    white-space: nowrap;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.2s ease;
}

/* Bottone radio di Autostrada: icona + testo su una riga, entro la larghezza della barra */
#utility-bar #btn-radio {
    font-size: 0.8rem;
    gap: 4px;
}

/* Telefoni: barra più compatta, così entra anche con 7 bottoni (Autostrada).
   I bottoni restano di 40px per essere comodi da toccare; sugli schermi più stretti
   la barra va a capo invece di uscire dallo schermo. */
@media (max-width: 480px) {
    #utility-bar {
        top: 8px;
        right: 8px;
        gap: 4px;
        padding: 4px;
        max-width: calc(100vw - 16px);
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    #utility-bar #btn-radio { font-size: 0.7rem; }
}

#utility-bar button:hover {
    background: #00ff00;
    color: #000;
    border-color: #00ff00;
    transform: scale(1.1);
}

/* Toggle rapido per disattivare il CRT */
.crt-off { display: none !important; }

/* Overlay Pausa */
#pause-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 12; /* Sotto la UI del Game Over ma sopra il Canvas */
    display: flex;
    align-items: center;
    justify-content: center;
}

#pause-overlay h2 {
    color: #ffd700;
    font-size: 4rem;
    font-family: 'Courier New', Courier, monospace;
    text-shadow: 4px 4px 0px #ff0044;
    letter-spacing: 5px;
}

/* --- Start Screen Overlay --- */

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Copre l'area ma senza tagliare */
    background-color: #0f051d; /* Il tuo sfondo scuro */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Partiamo sempre dall'alto! */
    align-items: center;
    overflow-y: auto; /* Fondamentale: abilita lo scroll se ci sono troppi bottoni */
    padding: 20px;
    box-sizing: border-box;
    z-index: 20;
}

.start-box {
    border: 3px solid #00ff00;
    background: #111;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 20px #00ff00;
    max-width: 600px;
    width: 100%;
}

.start-box h2 {
  color: #00ff00;
  font-size: 1.6rem; 
  line-height: 1.1; 
  margin-top: 0;
  margin-bottom: 5px;
  text-shadow: 2px 2px 0px #005500;
}
.start-box h3 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; }
.start-box .mission { color: #ffd700; font-size: 1.2rem; margin-bottom: 30px; }

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.legend-col {
    background: #222;
    padding: 15px;
    border: 1px solid #444;
    border-radius: 5px;
}

.legend-col h4 { font-size: 1.1rem; margin-bottom: 10px; color: #fff; }
.legend-col .emoji-row { font-size: 1.8rem; margin-bottom: 10px; letter-spacing: 2px; }
.legend-col small { font-family: sans-serif; color: #aaa; font-size: 0.85rem; }

/* --- Stili della Homepage --- */
.home-body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
}

/* 1. Hero Section Dinamica */
.hero-section {
    position: relative;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), url('../img/hero-bg.webp') center/cover no-repeat;
    background-color: #1a1a1a;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    border-bottom: 4px solid #ff0044;
}

.hero-content {
    position: relative;
    z-index: 5;
    max-width: 700px;
}

.hero-badge {
    background: #ff0044;
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    border-radius: 4px;
    text-transform: uppercase;
}

.hero-section h1,
.hero-section .hero-title {
    font-size: 3rem;
    color: #00ff00;
    margin: 15px 0 10px 0;
    text-shadow: 3px 3px 0px #005500;
}

.hero-section p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 25px;
}

.btn-play-hero {
    display: inline-block;
    background: transparent;
    color: #00ff00;
    border: 3px solid #00ff00;
    padding: 12px 25px;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.btn-play-hero:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 20px #00ff00;
}

/* 2. Layout Principale e Griglia Giochi */
.home-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: #ff0044;
    margin-bottom: 5px;
}

.section-header p {
    color: #888;
    font-size: 0.95rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.game-card {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: #00ff00;
}

.game-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-content {
    padding: 20px;
}

.game-category {
    font-size: 0.75rem;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-content h3 {
    font-size: 1.4rem;
    color: #fff;
    margin: 8px 0;
}

.record-badge {
    margin-top: 15px;
    background: #111;
    border: 1px dashed #444;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #ccc;
}

.record-badge strong {
    color: #00ff00;
}

/* 3. Hall of Fame (Tabella Classifiche) */
.hall-of-fame {
    margin-bottom: 60px;
}

.table-container {
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 8px;
    overflow-x: auto;
    padding: 10px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table th, .leaderboard-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #252525;
}

.leaderboard-table th {
    color: #ff0044;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.leaderboard-table td.player-name {
    color: #00ff00;
    font-weight: bold;
}

.leaderboard-table td.score {
    text-align: right;
    color: #ffd700;
    font-weight: bold;
}

/* 4. Footer EEAT */
.eeat-footer {
    background: #0d0d0d;
    border-top: 3px solid #333;
    padding: 40px 20px 20px 20px;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-seo h3, .footer-links h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
}

.footer-links a:hover {
    color: #00ff00;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1a1a1a;
    padding-top: 20px;
    font-size: 0.8rem;
    color: #666;
}

/* Stili Schermata Selezione Regioni */
.region-selection-box {
    max-width: 650px !important;
    width: 90%;
}


.regions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
    width: 100%;
    box-sizing: border-box;
}

.region-btn {
    background: #1a1a2e;
    color: #fff;
    border: 2px solid #555;
    padding: 12px 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border-radius: 4px;
    width: 100%; /* Si adatta perfettamente alla colonna */
    box-sizing: border-box;
}

.region-btn:hover {
    border-color: #00ff00;
    background: #252542;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
    transform: translateY(-2px);
}

.region-btn .reg-icon {
    font-size: 1.2rem;
    flex-shrink: 0; /* Impedisce all'icona di schiacciarsi */
}

/* Pulsante Nazionale a tutta larghezza e flessibile */
.national-btn {
    grid-column: span 2;
    background: #2a0815;
    border-color: #ff0044;
    justify-content: center;
    text-align: center;
    white-space: normal; /* Permette al testo di andare a capo in modo pulito se lo schermo è molto stretto */
}

.national-btn:hover {
    border-color: #ff0044;
    background: #4a0d26;
    box-shadow: 0 0 15px rgba(255, 0, 68, 0.4);
}


.game-instructions {
    background: rgba(0, 255, 0, 0.05); /* Sfondo verde quasi trasparente */
    border: 1px dashed #00ff00; /* Bordo tratteggiato in perfetto stile retro */
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 90%;
    text-align: left;
    border-radius: 4px;
    box-sizing: border-box;
}

.game-instructions h4 {
    color: #ffaa00; /* Richiama l'arancione del popup di errore */
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 1px;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #eeeeee;
}

.game-instructions li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.game-instructions li:last-child {
    margin-bottom: 0;
}

.game-instructions strong {
    color: #00ff00;
}

/* --- Desktop: le schermate sovrapposte crescono insieme al campo (--ui-scale la imposta assets/js/desktop-fit.js) --- */
.start-box, #pause-overlay > * { zoom: var(--ui-scale, 1); }
.crt-overlay { background-size: 100% calc(2px * var(--ui-scale, 1) + 2px); }

/* --- Desktop (mouse + schermo >= 769px): i giochi "classici" riempiono l'altezza dello schermo ---
   Si attiva con class="fit-big" su <html>. Proporzioni del campo: --ar su #crt-container (default 4:3). */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    html.fit-big .game-wrapper { height: 100vh; height: calc(100dvh - var(--head-h, 0px)); }
    html.fit-big #crt-container {
        --h: min(2400px, calc(100dvh - var(--head-h, 0px) - 16px), calc(100vw / var(--ar, 1.3333)));
        height: var(--h);
        width: calc(var(--h) * var(--ar, 1.3333));
        max-width: none;
        max-height: none;
        flex: none;
    }
    /* la schermata iniziale resta centrata nel campo piu' grande (se e' piu' alta, scorre dall'alto) */
    html.fit-big .start-box { margin: auto; }
    html.fit-big #gameCanvas { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; }
    /* i pulsanti touch di Autostrada su desktop sono superflui (c'e' la tastiera) */
    html.fit-big .arcade-mobile-controls { display: none !important; }
}

/* Barra pulsanti in colonna nello spazio libero a destra del campo (la attiva desktop-fit.js) */
html.bar-side #utility-bar {
    flex-direction: column;
    right: auto;
    left: var(--bar-left, auto);
}

/* Testo solo per motori di ricerca e screen reader (es. <h1> dei giochi a schermo intero) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Miniature delle card (proporzione fissa: niente salti di layout, CLS = 0) */
.card-image { background: #0b0b0b; line-height: 0; }
.card-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: cover;
}
.thumb-placeholder {
    aspect-ratio: 8 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
    background: #222;
    color: #555;
    text-align: center;
    line-height: 1.3;
}

/* --- Pagine legali (Privacy, Cookie) --- */
.legal-body .crt-overlay { position: fixed; }
.legal-main { max-width: 820px; margin: 0 auto; padding: 28px 18px 40px; line-height: 1.65; color: #ddd; }
.legal-main h1 { color: #00ff41; font-size: clamp(1.6rem, 6vw, 2.4rem); text-shadow: 3px 3px 0 #003d10; margin-bottom: 6px; }
.legal-main h2 { color: #ffd400; font-size: 1.15rem; margin: 26px 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.legal-main h3 { color: #fff; font-size: 1rem; margin: 16px 0 6px; }
.legal-main p, .legal-main ul { margin-bottom: 10px; }
.legal-main ul { padding-left: 22px; }
.legal-main a { color: #00e5ff; }
.legal-main a:hover { color: #fff; }
.legal-main code { color: #00ff41; background: #1a1a1a; padding: 1px 6px; }
.legal-back { margin-bottom: 14px; }
.legal-updated { color: #888; font-size: 0.85rem; margin-bottom: 8px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 10px 0 14px; font-size: 0.9rem; }
.legal-table th, .legal-table td { border: 1px solid #333; padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: #1a1a1a; color: #ffd400; }
@media (max-width: 600px) { .legal-table, .legal-table thead, .legal-table tbody, .legal-table tr, .legal-table td { display: block; } .legal-table thead { display: none; } .legal-table tr { border: 1px solid #333; margin-bottom: 10px; } .legal-table td { border: 0; border-bottom: 1px solid #222; } }
@media (max-width: 600px) { .legal-table td[data-label]::before { content: attr(data-label) ": "; color: #ffd400; font-weight: bold; } }

/* =====================================================================
   Profili giocatore: tavolozza, simboli e pannello "Il mio profilo".
   La tavolozza sta SOLO qui: JS e PHP usano le classi .ib-cN / .ib-gN.
   ===================================================================== */
.ib-c0  { --tag: #39ff14; }  /* verde */
.ib-c1  { --tag: #ff2bd6; }  /* magenta */
.ib-c2  { --tag: #00f0ff; }  /* ciano */
.ib-c3  { --tag: #ffe600; }  /* giallo */
.ib-c4  { --tag: #ff8a00; }  /* arancio */
.ib-c5  { --tag: #ff3355; }  /* rosso */
.ib-c6  { --tag: #b36bff; }  /* viola */
.ib-c7  { --tag: #4d8dff; }  /* blu */
.ib-c8  { --tag: #ff8fc0; }  /* rosa */
.ib-c9  { --tag: #7dffcf; }  /* menta */
.ib-c10 { --tag: #c8ff00; }  /* lime */
.ib-c11 { --tag: #e6f0ff; }  /* ghiaccio */
.ib-anon { --tag: #9aa3ad; }

.ib-tag {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3em;
    font-weight: bold;
    white-space: nowrap;
    color: var(--tag, #9aa3ad);
}
.ib-tag .ib-initials { color: inherit; letter-spacing: 1px; }
.ib-glyph {
    font-family: 'Segoe UI Symbol', 'Apple Symbols', 'DejaVu Sans', 'Noto Sans Symbols2', sans-serif;
    font-size: 0.85em;
    color: inherit;
    text-shadow: 0 0 6px var(--tag, transparent);
}
.ib-g0 .ib-glyph::before { content: '\25B2'; }  /* ▲ */
.ib-g1 .ib-glyph::before { content: '\25CF'; }  /* ● */
.ib-g2 .ib-glyph::before { content: '\25A0'; }  /* ■ */
.ib-g3 .ib-glyph::before { content: '\25C6'; }  /* ◆ */
.ib-g4 .ib-glyph::before { content: '\2605'; }  /* ★ */
.ib-g5 .ib-glyph::before { content: '\271A'; }  /* ✚ */
.ib-g6 .ib-glyph::before { content: '\25BC'; }  /* ▼ */
.ib-g7 .ib-glyph::before { content: '\2665'; }  /* ♥ */

/* --- Pannello "Il mio profilo" (home) --- */
.player-card { max-width: 900px; margin: 0 auto 40px; padding: 0 16px; }
.pc-box {
    max-width: 640px;
    margin: 0 auto;
    padding: 18px 20px;
    background: #0c0c0c;
    border: 2px solid #00ff41;
    box-shadow: 0 0 14px rgba(0, 255, 65, 0.25);
    font-family: 'Courier New', Courier, monospace;
    color: #ddd;
}
.pc-box .pc-lead { margin: 0 0 10px; color: #fff; }
.pc-box .pc-note { margin: 10px 0 0; font-size: 0.8rem; color: #8a8f98; }
.pc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pc-label { font-weight: bold; letter-spacing: 2px; color: #00ff41; }
.pc-form input {
    box-sizing: border-box;
    width: 9ch;
    padding: 6px 8px;
    font: bold 1.4rem 'Courier New', Courier, monospace;
    letter-spacing: 4px;
    text-align: center;
    text-transform: uppercase;
    color: #00ff41;
    background: #000;
    border: 2px solid #00ff41;
    border-radius: 0;
    outline: none;
}
.pc-form input:focus { box-shadow: 0 0 10px #00ff41; }
.pc-btn {
    padding: 8px 16px;
    font: bold 1rem 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    color: #fff;
    background: #000;
    border: 2px solid #fff;
    border-radius: 0;
    cursor: pointer;
    touch-action: manipulation;
}
.pc-btn:hover:not(:disabled) { background: #fff; color: #000; }
.pc-btn:disabled { opacity: 0.55; cursor: default; }
.pc-btn:focus-visible, .pc-form input:focus-visible { outline: 3px solid #00ff41; outline-offset: 2px; }
.pc-btn.pc-danger { border-color: #ff4466; color: #ff4466; }
.pc-btn.pc-danger:hover:not(:disabled) { background: #ff4466; color: #000; }
.pc-msg { min-height: 1.2em; margin: 10px 0 0; font-size: 0.9rem; color: #00ff41; }
.pc-msg.pc-error { color: #ff4466; }
.pc-who { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.pc-who .ib-tag { font-size: 1.8rem; }
.pc-since { font-size: 0.8rem; color: #8a8f98; }
.pc-codeline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px; }
.pc-codeval { min-width: 5ch; font: bold 1.5rem 'Courier New', Courier, monospace; letter-spacing: 6px; color: #ffd400; }
.pc-records-title { margin: 14px 0 6px; font-size: 0.95rem; letter-spacing: 1px; color: #00ff41; }
.pc-records { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.pc-records li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed #333; }
.pc-records li span:last-child { font-variant-numeric: tabular-nums; color: #fff; }
.pc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hall-of-fame .ib-tag { font-size: 1em; }

/* --- Testo sotto il gioco (inc/game_info.php): H1, introduzione, come si gioca, altri giochi --- */
.game-info {
    max-width: 900px; margin: 0 auto; padding: 36px 16px 64px;
    color: #ccc; font-size: 1rem; line-height: 1.6;
    border-top: 2px solid #1d1d2e;
}
.game-info h1 { font-size: clamp(1.3rem, 4vw, 1.7rem); line-height: 1.25; color: #00ff41; margin-bottom: 12px; }
.game-info h2 { font-size: 1.15rem; color: #ff0044; margin: 28px 0 8px; }
.game-info h3 { font-size: 1rem; color: #e6e6e6; margin: 18px 0 4px; }
.game-info-txt + .game-info-txt { margin-top: 10px; }
.game-info-list { margin: 6px 0 12px 22px; }
.game-info-list li { margin: 4px 0; }
.game-info-lead { color: #e6e6e6; }
.game-info-related { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 12px 0 20px; }
.game-info-related a {
    display: flex; flex-direction: column; gap: 8px; height: 100%;
    color: #fff; text-decoration: none; background: #161623; border: 1px solid #2a2a40; border-radius: 8px; overflow: hidden;
}
.game-info-related a:hover, .game-info-related a:focus-visible { border-color: #00ff41; }
.game-info-related img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.game-info-related span { padding: 0 12px 12px; font-size: .95rem; line-height: 1.3; }
.game-info-back a { display: inline-flex; align-items: center; min-height: 44px; color: #00ff41; }
.game-info-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-bottom: 8px; font-size: .85rem; color: #8a8a9a; }
.game-info-crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: #b9b9cc; text-decoration: none; }
.game-info-crumbs a:hover, .game-info-crumbs a:focus-visible { color: #00ff41; }
@media (max-width: 640px) {
    .game-info-related { grid-template-columns: 1fr; }
    .game-info-related a { flex-direction: row; align-items: center; }
    .game-info-related img { width: 40%; flex: none; }
    .game-info-related span { padding: 12px 12px 12px 0; }
}

/* Pulsante nelle pagine legali (Gestisci preferenze cookie) */
.legal-main a.legal-btn { display: inline-block; background: #111; color: #00ff41; border: 2px solid #00ff41; padding: 10px 16px; text-decoration: none; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.legal-main a.legal-btn:hover, .legal-main a.legal-btn:focus-visible { background: #00ff41; color: #111; outline: none; }
