/* ======================================================
   STORICO PARTITE
   ====================================================== */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #eef4f8;
    overflow: hidden;
}

/* Canvas neve */
#snow {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at top, #0f2f44, #081b28);
}

/* Contenitore */
.storico-container {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 100%;

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

/* Box principale */
.storico-box {
    background: rgba(8, 27, 40, 0.88);
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

    max-width: 1100px;
    width: 95%;
    max-height: 85vh;

    display: flex;
    flex-direction: column;
}

/* Titolo */
.storico-title {
    text-align: center;
    margin: 0 0 32px 0;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Stato caricamento */
.loading {
    text-align: center;
    color: #a9c0d4;
}

/* Griglia partite */
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;

    overflow-y: auto;
    padding-right: 6px; /* spazio per scrollbar */
}

.games-grid::-webkit-scrollbar {
    width: 8px;
}

.games-grid::-webkit-scrollbar-track {
    background: transparent;
}

.games-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.games-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}


/* Card partita */
.game-item {
    background: rgba(15, 47, 68, 0.85);
    border-radius: 14px;
    padding: 18px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

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

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

.game-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

/* Titolo partita */
.game-item h2 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #eef4f8;
}

/* Data */
.game-item p {
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    color: #a9c0d4;
}

/* Bottone dettagli */
.game-item .button {
    align-self: flex-start;

    padding: 8px 16px;
    border-radius: 8px;

    background: linear-gradient(135deg, #1c4e68, #163c52);
    color: #eef4f8;
    text-decoration: none;

    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;

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

.game-item .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* Responsive */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .storico-box {
        padding: 32px 24px;
    }

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