:root {
    /* Nuovi colori a tema Verde Excel */
    --primary-color: #408e5e; /* Verde principale (es. intestazioni tabella, bottoni) */
    --secondary-color: #2c3e50; /* Testo scuro, simile a prima */
    --accent-color: #e74c3c;    /* Rosso per alert/errori, invariato */
    --light-bg: #ecf0f1;        /* Sfondo chiaro, invariato */
    --dark-text: #333;          /* Testo scuro, invariato */
    --white: #fff;              /* Bianco, invariato */
    --success-green: #2ecc71;   /* Verde più chiaro per feedback positivi */
    --warning-orange: #f39c12;  /* Arancione per avvisi, invariato */
    --hover-green: #229a53;     /* Verde per hover */
    --secondary-dark-green: #1a4d2e; /* NUOVO: Verde scuro per sezioni di riepilogo */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--white);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Sfondo del container principale in bianco */
.player-analysis-container {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.search-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.search-section label {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.search-section input,
.search-section select {
    width: 100%;
    max-width: 400px;
    padding: 12px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--white);
    color: var(--dark-text);
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23408e5e" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 24px;
    cursor: pointer;
}

.search-section input:focus,
.search-section select:focus {
    outline: none;
    border-color: var(--hover-green);
    box-shadow: 0 0 5px rgba(64, 142, 94, 0.5);
}

/* Sfondo delle sezioni interne in grigio chiaro */
.player-details {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--light-bg);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#player-info {
    text-align: center;
    margin-bottom: 20px;
}

#player-info h2 {
    color: var(--secondary-color);
    margin: 0;
}

#player-info p {
    margin: 5px 0;
    font-size: 1.1em;
    color: #555;
}

.unicorn-emoji, .top-player-emoji {
    font-size: 1.2em;
    margin-left: 5px;
}

/* Stili per le tabelle */
#player-stats-table,
.table-spoiler {
    margin: 20px 0;
}

#players-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#players-table thead th {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: left;
}

#players-table tbody tr {
    border-bottom: 1px solid #ddd;
}

#players-table tbody td {
    padding: 10px 12px;
    text-align: left;
}

#players-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Stili per i grafici */
.player-charts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.chart-container {
    background-color: var(--white);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 300px;
}

.chart-container h3 {
    text-align: center;
    margin-top: 0;
    color: var(--secondary-color);
}

/* Stili per i messaggi informativi */
.info-message {
    text-align: center;
    font-style: italic;
    color: #777;
    margin-top: 20px;
}

.info-message.active {
    display: block;
}

/* Stili per la FantaMedia */
.fm-green {
    color: var(--success-green);
    font-weight: bold;
}

.fm-yellow {
    color: var(--warning-orange);
    font-weight: bold;
}

.fm-red {
    color: var(--accent-color);
    font-weight: bold;
}

/* Stili per la sezione spoiler della tabella */
.table-spoiler {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.spoiler-header {
    background-color: var(--light-bg);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-weight: bold;
}

/* Nuovo stile per il riepilogo giocatori aperto */
.table-spoiler:not(.collapsed) .spoiler-header {
    background-color: var(--primary-color);
    color: var(--white);
}

.table-spoiler:not(.collapsed) .spoiler-header h2,
.table-spoiler:not(.collapsed) .spoiler-header .spoiler-icon {
    color: var(--white);
}

.spoiler-icon {
    transition: transform 0.3s ease;
}

.table-spoiler.collapsed .spoiler-icon {
    transform: rotate(-90deg);
}

.spoiler-content {
    display: block;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.table-spoiler.collapsed .spoiler-content {
    max-height: 0;
}

.table-container {
    padding: 15px;
}

/* Layout a due colonne per sezioni affiancate */
.two-column-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.two-column-layout > div {
    flex: 1 1 45%;
    padding: 20px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.two-column-layout ul {
    list-style-type: none;
    padding: 0;
}

.two-column-layout li {
    background-color: var(--white);
    margin: 5px 0;
    padding: 10px;
    border-radius: 5px;
    border-left: 5px solid var(--primary-color);
}

/* Media query per dispositivi più piccoli */
@media (max-width: 768px) {
    .two-column-layout {
        flex-direction: column;
    }
}

.highlight-player {
    background-color: #f0f0f0; /* Colore di sfondo più chiaro */
    font-weight: bold; /* Testo in grassetto */
    color: #408e5e; /* Colore del testo leggermente diverso */
}

