* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #66b3ff 0%, #3a6ea5 100%);
    min-height: 100vh;
    padding: 20px;
}

h1 {
    color: white;
    text-align: center;
    font-size: 32px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.inizia {
    font-size: 16px;
    display: block;
    margin: 20px auto 0 auto;
}

.container {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    gap: 30px;
    align-items: flex-start;
}

/* Squadre più ampie, classifica più stretta */
.sinistra {
    width: 60%;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.destra {
    width: 40%;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.sinistra h2, .destra h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 4px solid #66b3ff;
    padding-bottom: 15px;
    text-align: center;
}

#listaSquadre {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
    align-items: stretch;
}

#listaSquadre > div {
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
    padding: 18px 22px;
    border-radius: 12px;
    border: 1px solid #c0c0c0;
    box-shadow: 0 4px 15px rgba(58, 110, 165, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

#listaSquadre > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(58, 110, 165, 0.12);
    border-color: #66b3ff;
}

#listaSquadre h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

#listaSquadre ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#classificaGiocatori {
    display: flex;
    flex-direction: column;
    gap: 10px;
    counter-reset: rank-counter;
}

#classificaGiocatori li {
    counter-increment: rank-counter;
    display: flex;
    align-items: center;
    gap: 16px;
}

#classificaGiocatori li::before {
    content: counter(rank-counter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #66b3ff 0%, #3a6ea5 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.giocatore {
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #333;
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
    border: 1px solid #c0c0c0;
    font-size: 14px;
}

.giocatore:hover {
    transform: translateX(4px);
}

#classificaGiocatori .giocatore {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #ebebeb 100%);
    border: 1px solid #c0c0c0;
    margin-bottom: 4px;
    border-radius: 8px;
}

#classificaGiocatori .giocatore span:first-child {
    flex: 1;
}

button, .btn {
    background: linear-gradient(135deg, #ff6700 0%, #66b3ff 100%);
    color: white;
    border: 1px solid rgba(0, 0, 0);
    padding: 11px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102,179,255,0.25);
    transition: all 0.3s ease;
    display: inline-block;
}

button:hover, .btn:hover {
    transform: translateY(-2px);
}

button:active, .btn:active {
    transform: translateY(0);
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: #66b3ff;
    padding: 8px 12px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

summary:hover {
    color: #3a6ea5;
    transform: translateX(2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        gap: 24px;
    }

    .sinistra {
        width: calc(60% - 12px);
        padding: 24px;
    }

    .destra {
        width: calc(40% - 12px);
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 20px;
    }

    .sinistra, .destra {
        width: 100%;
        padding: 20px;
    }

    .sinistra h2, .destra h2 {
        font-size: 20px;
    }

    #listaSquadre {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    #listaSquadre > div {
        min-width: 0;
        padding: 16px;
        min-height: 100px;
    }

    h1 {
        font-size: 28px;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 12px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .container {
        gap: 12px;
    }

    .sinistra, .destra {
        padding: 16px;
    }

    .sinistra h2, .destra h2 {
        font-size: 18px;
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    #listaSquadre {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #listaSquadre > div {
        min-width: 0;
        padding: 12px;
    }

    .giocatore {
        padding: 10px 12px;
        font-size: 13px;
    }

    button, .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    #classificaGiocatori li::before {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}
