body {
    font-family: 'Poppins', sans-serif;
    background: #020617;
    color: #e5e7eb;
    margin: 0;
}
.page {
    max-width: 1920px;
    padding-left: 40px;
    padding-right: 40px;
    float: none;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}
.medium-page {
    max-width: 1680px;
    padding-left: 40px;
    padding-right: 40px;
}
/* Navbar */
header{
    position: fixed;
    width: 100%;
    background-color: rgba(2, 6, 23, 0.78);   
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    z-index: 20;
}

.navbar-container {
    margin: 0 auto;
    height: 56px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
}

.logo-text {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.nav-menu {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6); 
    transition: all 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.95);
    background-color: rgba(249, 115, 22, 0.16);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.22);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(249, 115, 22, 0.9);
    color: white;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.35);
}

/* Main */
main{
    min-height: calc(100vh - 56px);
    padding-top: 70px;
    margin: 0 auto;
}

.risultati {
    display: flex;
    flex-direction: row;
    gap: 50px;
}

h1 {
    text-align: center;
    font-size: 42px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-top: 10px;
    margin-bottom: 10px;
    text-shadow:
        0 0 12px rgba(249, 115, 22, 0.45),
        0 0 28px rgba(59, 130, 246, 0.45);
}


/* Partite */
.match {
    width: 70%;
    margin-top: 50px;
}
.last_match{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: rgb(226, 232, 240);
    background: #0b1220;
    padding: 30px;
    border-radius: 50px;
    margin-bottom: 50px;
    box-shadow:
        0 18px 45px rgba(15, 23, 42, 0.85);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, background 0.25s ease;
}
.last_match::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    border: 1px solid rgba(148, 163, 184, 0.25);
    pointer-events: none;
}
.last_match:hover {
    transform: translateY(-3px);
    background-color: #0f172a;
}
.risultato-match {
    font-size: 40px;
    font-weight: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    width: 100%;
}
.logo_squadra{
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.gol-count {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: rgba(226, 232, 240, 0.95);
}

.formazioni-flex{ 
    width: 100%; 
    display: flex;
}
.colonna-left { 
    width: 50%;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;

}
.colonna-right { 
    width: 50%;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-wrap: wrap;
    align-content: center;
}

/* Partite page: formazione toggle */
.partite-page {
    width: 60%;
    margin: 0 auto;
    padding: 10px 0 30px;
}

.partite-page .titolo-table {
    margin-left: 0;
    margin-top: 16px;
    margin-bottom: 16px;
}

.partite-card {
    width: 100%;
}

.partite-page .last_match {
    margin-top: 18px;
}

.partite-page .risultato-match {
    font-size: 36px;
}

@media (max-width: 1024px) {
    .partite-page {
        width: calc(100% - 80px);
    }
}

@media (max-width: 640px) {
    .partite-page {
        width: calc(100% - 24px);
    }
    .partite-page .risultato-match {
        font-size: 24px;
    }
}

.formation-details {
    width: 100%;
    margin-top: 14px;
}
.formation-summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.55);
    cursor: pointer;
    user-select: none;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.formation-summary::-webkit-details-marker { display: none; }
.formation-details[open] .formation-summary {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.12);
}
.formation-summary:hover {
    transform: translateY(-1px);
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.10);
}
.formation-summary-text {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.95);
}
.formation-summary-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-weight: 900;
    line-height: 1;
    transition: transform 0.18s ease;
}
.formation-details[open] .formation-summary-icon { transform: rotate(45deg); }

.formation-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.35);
}

.formation-grid { gap: 14px; }
.formation-col { gap: 8px; }
.player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.45);
}
.player-row:hover { border-color: rgba(249, 115, 22, 0.30); }
.player-name {
    font-weight: 700;
    color: rgba(226, 232, 240, 0.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabelle */
.table{
    width: 30%;
    color: rgb(226, 232, 240);
    margin-top: 50px;
    padding:    20  px;
}
.titolo-table{
    margin-left: 10px;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.tab-totale{
    background: #0b1220;
    padding: 30px;
    border-radius: 50px;
    margin-bottom: 50px;
    margin-top: 10px;
}
.tab-gol{
    background: #0b1220;
    padding: 30px;
    border-radius: 50px;
    margin-top: 10px;
}
.table-wrapper{
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 30vh;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.35);
}
.table-wrapper::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.18);
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.45);
    border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ffffff; 
}

.classifica-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.classifica-table thead th {
    background: transparent;
    position: static;
    border-bottom: 0;
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
}
.classifica-table tr {
    transition: background 0.25s ease, transform 0.18s ease;
}
.classifica-table tr:nth-child(odd) {
    background-color: rgba(15, 23, 42, 0.6);
}
.classifica-table tr:nth-child(even) {
    background-color: rgba(15, 23, 42, 0.3);
}
.classifica-table tr:hover {
    background-color: rgba(249, 115, 22, 0.18);
    transform: translateX(1px);
}
.classifica-table td {
    padding: 8px 10px;
    text-align: center;

    white-space: nowrap;
}
.classifica-table td.nome-player,
.classifica-table td.nome-player-m {
    text-align: left;
}
.classifica-table td.pos-fix {
    width: 35px;
    color: rgba(148, 163, 184, 0.9);
}
.classifica-table td.punti-fix,
.classifica-table td.m-notfix {
    font-weight: 600;
}


.tab-content { display: none; }
.tab-content.is-active { display: block; } 

.rankings-page .classifica-table { min-width: 780px; }

.rankings-page .table-wrapper{
    overflow: auto;
    max-height: 70vh;
    background: #020617;
    position: relative;
}

.rankings-page .classifica-table thead th {
    position: sticky;
    top: 0;
    background: #020617;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 10px;
}

.nome-player,
.punti-fix,
.nome-player-th,
.punti-fix-th,
.nome-player-m,
.pos-fix,
.nome-player-m-th,
.pos-fix-th {
    background: #020617;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 1px 0 0 0 rgba(148, 163, 184, 0.22);
}

.nome-player,
.nome-player-th,
.nome-player-m,
.nome-player-m-th {
    position: sticky;
    left: 0;
    text-align: left;
    font-weight: 700;
}
.nome-player,
.nome-player-th {
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.punti-fix,
.punti-fix-th {
    position: sticky;
    left: 220px;
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    font-weight: 900;
    color: #f97316;
}
.th-notfix{
    z-index: 20;
}
.nome-player-th,
.punti-fix-th{
    top: 0;
    z-index: 40;
}
.nome-player-m-th, 
.pos-fix-th {
    top: 0;
    z-index: 39;
}
.pos-fix,
.pos-fix-th {
    position: sticky;
    left: 0;
    font-weight: 900;
    z-index: 11;
}

.tab-container {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px 0 8px;
}

.tab-btn {
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(2, 6, 23, 0.55);
    color: rgba(226, 232, 240, 0.88);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.tab-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.10);
    color: rgba(255, 255, 255, 0.95);
}
.tab-btn.active {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.18);
    color: white;
}

.season-selector {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    padding: 6px 0 16px;
}
.season-select-custom {
    width: min(420px, 100%);
    background: rgba(2, 6, 23, 0.75);
    color: rgba(226, 232, 240, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    outline: none;
}
.season-select-custom:focus {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.rankings-page .tab-content {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    padding-bottom: 24px;
}

.pts-box {
    min-width: 44px;
    font-weight: 900;
}

@media only screen and (min-width: 768px) and (max-width: 1023px){ 
.risultati {
    flex-direction: column;
    gap: 50px;
} 
}