/* --- REGOLA GLOBALE: RIMOZIONE SOTTOLINEATURA LINK --- */
a {
    text-decoration: none; /* Rimuove la sottolineatura di default */
    color: #007bff; 
}

a:hover {
    text-decoration: none; /* Rimuove la sottolineatura anche al passaggio del mouse */
    color: #0056b3;
}

/* Stili per evidenziare il risultato in player_detail.php */
.result-win {
    font-weight: bold;
    color: #28a745; /* Verde per la Vittoria */
}

.result-loss {
    font-weight: bold;
    color: #dc3545; /* Rosso per la Sconfitta */
}

/* --- LAYOUT E STRUTTURA GENERALE --- */

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}
h1, h2 {
    color: #004c99; 
    text-align: center;
    margin-bottom: 20px;
}
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* BACKGROUND, SHADOW E BORDER RADIUS RIMOSSI QUI */
}
hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 30px 0;
}

/* --- STILE PROFILO --- */
#player-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 10px 0;
}
#player-profile strong {
    color: #555;
    margin-right: 5px;
}

/* --- STILE TABELLE SCORREVOLI (CLASSIFICA E PARTITE) --- */

#ranking-history-container, #match-history-container { 
    max-height: 450px; 
    overflow-y: auto; /* Abilita lo scorrimento verticale */
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border-radius: 4px;
}

#ranking-history-table, #match-history-table {
    width: 100%;
    border-collapse: collapse;
}

#ranking-history-table th, #ranking-history-table td,
#match-history-table th, #match-history-table td {
    padding: 10px 15px;
    border: 1px solid #eee; 
    text-align: left;
    white-space: nowrap; 
}

#ranking-history-table thead th, #match-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

/* Stile per alternare i colori delle righe per migliorare la leggibilità */
#ranking-history-table tbody tr:nth-child(even),
#match-history-table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}
/* Forzare il background bianco per le righe dispari */
#ranking-history-table tbody tr:nth-child(odd),
#match-history-table tbody tr:nth-child(odd) {
    background-color: white;
}


/* --- STILE DATI SPECIFICI --- */

/* Evidenziazione per la colonna Rank */
#ranking-history-table .rank-data {
    font-weight: bold;
    color: #d9534f;
    text-align: center;
}

/* STILI PER IL RISULTATO DEL MATCH (W/L) */
.match-win {
    background-color: #d4edda; 
    color: #155724; 
    font-weight: bold;
    text-align: center;
}

.match-loss {
    background-color: #f8d7da; 
    color: #721c24; 
    font-weight: bold;
    text-align: center;
}