/* Fantacalcio Theme */
body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    color: #000000;
}

/* Layout Fix - Prevent sidebar overlap with main content */
@media (min-width: 1024px) {
    #primary {
        margin-left: 18rem; /* 288px = lg:w-72 (18rem) */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

main p {
    margin-bottom: 1.5em;
}

main h1,
main h2,
main h3,
main h4,
main h5 {
    margin: 0 0 1.5em;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.3;
}

h1 {
    margin-top: 0;
    font-size: 3.052rem;
}

h2 {
    font-size: 2.441rem;
}

h3 {
    font-size: 1.953rem;
}

h4 {
    font-size: 1.563rem;
}

h5 {
    font-size: 1.25rem;
}

small,
.text_small {
    font-size: 0.8rem;
}

dt,
tr {
    font-family: 'Poppins', sans-serif;
}

main p {
    margin-bottom: 1.5em;
}

main a {
    text-decoration: underline;
    color: red;
}

/* Extra */
#download--button {
    background: #00000082;
    padding: 10px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
}

/* Login Page */
.language-switcher {
    display: none;
}

/* Homepage */

/** Squadre di club **/
#players--squad thead {
    text-align: center;
    font-weight: 700;
}

/* Widgets API Football */
.wg_logo {
    display: initial;
}

/* Albo d'oro */
.bg-gold {
    background-color: #ff9800;
    /* Questo è un colore dorato approssimativo */
}

.bg-silver {
    background-color: #00d2be;
    /* Questo è un colore argenteo approssimativo */
}

.bg-bronze {
    background-color: #2b4562;
    /* Questo è un colore bronzo approssimativo */
}

/* Stili per l'Albo d'Oro migliorato */
.albo-doro-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #4f46e5;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Hall of Fame Podium Styles Ridisegnati */
.hall-of-fame-redesigned {
    position: relative;
    overflow: hidden;
}

.podium-stage-new {
    position: relative;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 25%, #fdf2f8 50%, #fef7cd 75%, #f0f9ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.podium-stage-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.champion-column {
    position: relative;
    z-index: 10;
}

.medal-spectacular {
    position: relative;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.champion-card-new {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.champion-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.champion-card-new:hover {
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 15px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.podium-base-3d {
    perspective: 1000px;
}

.podium-base-3d > div {
    transform-style: preserve-3d;
    position: relative;
}

.podium-base-3d > div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, rgba(0, 0, 0, 0.1) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Animazioni migliorate */
@keyframes medal-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
        transform: scale(1.05);
    }
}

.medal-spectacular:hover {
    animation: medal-glow 2s ease-in-out infinite;
}

/* Responsive design migliorato */
@media (max-width: 1024px) {
    .podium-stage-new {
        padding: 1.5rem;
    }
    
    .champion-column {
        margin: 0 0.5rem;
    }
    
    .medal-spectacular {
        margin-bottom: 1.5rem;
    }
    
    .champion-card-new {
        max-width: 280px;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .podium-stage-new {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .relative.z-10.flex {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .champion-column {
        order: 0 !important;
        margin-bottom: 2rem;
    }
    
    .champion-card-new {
        max-width: 320px;
    }
    
    .podium-base-3d {
        display: none;
    }
}

/* Effetti speciali per il primo posto */
.champion-column:nth-child(2) .medal-spectacular {
    animation: medal-glow 3s ease-in-out infinite;
}

.champion-column:nth-child(2) .champion-card-new {
    transform: scale(1.05);
}

.champion-column:nth-child(2) .champion-card-new:hover {
    transform: scale(1.1) rotate(1deg);
}



.medal {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.player-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.player-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.player-team {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.player-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.player-stat {
    text-align: center;
}

.player-stat-value {
    font-weight: bold;
    font-size: 1.2rem;
}

.player-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Tabella migliorata */
.enhanced-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.enhanced-leaderboard-table th {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.enhanced-leaderboard-table th:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.enhanced-leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.enhanced-leaderboard-table tr:hover {
    background-color: #f9fafb;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: bold;
    color: white;
    margin-right: 0.5rem;
}

.rank-1 { background: linear-gradient(135deg, #ffd700, #ffed4e); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #e5e5e5); }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #daa520); }
.rank-other { background: linear-gradient(135deg, #6b7280, #9ca3af); }

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-details {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-compare {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
}

.btn-share {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #4f46e5, #7c3aed);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin: 2rem 0;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    flex: 1;
    max-width: 45%;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-year {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #4f46e5;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    z-index: 10;
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.stats-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stats-card h4 {
    margin-bottom: 1rem;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #4f46e5;
}

.record-label {
    font-weight: 500;
    color: #374151;
}

.record-value {
    font-weight: bold;
    color: #4f46e5;
}

/* Loading Skeleton */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .albo-doro-header {
        padding: 1rem;
        text-align: center;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .podium-container {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        margin-top: 1rem !important;
        min-width: 250px;
    }
    
    .enhanced-leaderboard-table {
        font-size: 0.875rem;
    }
    
    .enhanced-leaderboard-table th,
    .enhanced-leaderboard-table td {
        padding: 0.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .timeline-item {
        flex-direction: column !important;
    }
    
    .timeline-content {
        max-width: 100%;
        margin: 0 1rem;
    }
    
    .timeline-line {
        left: 1rem;
    }
    
    .timeline-year {
        left: 1rem;
        transform: translateY(-50%);
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Modal Improvements */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* View Toggle Buttons */
.view-toggle {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.view-toggle:hover {
    border-color: #4f46e5;
    transform: translateY(-1px);
}

.view-toggle.active {
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

/* Search and Filter Styles */
.search-filter-container {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Export Button */
.export-btn {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(5, 150, 105, 0.3);
}

@media only screen and (min-width:768px) {

    /** Classifiche **/
    #wg-football-standings img {
        width: 3%;
    }

    #wg-football-standings .wg_width_20 {
        width: auto;
    }
}