/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark: #1e293b;
    --dark-secondary: #334155;
    --light: #f1f5f9;
    --white: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Sidebar */
/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    /* ✅ Colore originale */
    background: linear-gradient(180deg, #1E293B, #0f172a);
    /* Slate scuro con gradiente */
    color: white;
    padding: 2rem 0;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 100;
}

/* IMPORTANTE: Desktop - sempre visibile */
@media screen and (min-width: 769px) {
    .sidebar {
        left: 0 !important;
    }

    .sidebar.active {
        left: 0 !important;
        /* Blocca anche se ha classe active */
    }
}

/* Mobile - nascosta di default */
/* ============================================
   MOBILE - Sidebar nascosta di default
   ============================================ */

@media screen and (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        left: -100% !important;
        width: 80% !important;
        max-width: 320px !important;
        height: 100vh !important;
        z-index: 10000 !important;
        transition: left 0.3s ease !important;
    }

    .sidebar.active {
        left: 0 !important;
        /* ← QUESTO DEVE FUNZIONARE */
    }

    .main-content {
        margin-left: 0 !important;
        padding-top: 80px !important;
    }

    .topbar {
        margin-left: 0 !important;
        padding-left: 70px !important;
    }
}



.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--dark-secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: white;
    /* ← ASSICURATI CHE CI SIA */
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
    color: white;
    /* ← AGGIUNGI */
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    font-weight: 600;
    color: white;
    /* ← AGGIUNGI */
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: white;
    /* ← ASSICURATI CHE CI SIA */
}

.nav-item span {
    color: white;
    /* ← AGGIUNGI QUESTA RIGA */
}


/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.topbar {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.portieri {
    background: #8b5cf6;
}

.stat-icon.difensori {
    background: #3b82f6;
}

.stat-icon.centrocampisti {
    background: #10b981;
}

.stat-icon.attaccanti {
    background: #ef4444;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Player List */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.player-item:hover {
    background: var(--border-color);
    cursor: pointer;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.player-name {
    font-weight: 600;
}

.player-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.player-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Search Input */
.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Formation */
.formation-container {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.campo-calcio {
    background: linear-gradient(to bottom, #2d5016, #1a3d0f);
    border-radius: 12px;
    padding: 2rem;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    position: relative;
}

.campo-calcio::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.formation-line {
    display: flex;
    justify-content: center;
    z-index: 1;
}

.formation-players {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.formation-player {
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.formation-player-name {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.formation-player-score {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--white);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.player-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.player-card-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.player-card-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.player-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Import Section */
.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.file-upload {
    text-align: center;
    padding: 2rem;
}

.upload-label {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover {
    border-color: var(--primary-color);
    background: var(--light);
}

.upload-label i {
    font-size: 3rem;
    color: var(--primary-color);
}

.file-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .import-grid {
        grid-template-columns: 1fr;
    }

    .topbar-right {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tabella Rosa migliorata */
.table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-container thead {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-container th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-container tbody tr {
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.table-container tbody tr:hover {
    background: linear-gradient(90deg, #f0f9ff, white);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.table-container tbody tr:nth-child(even) {
    background: #fafafa;
}

.table-container tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #f0f9ff, #fafafa);
}

.table-container td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Badge migliorati */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

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

/* Punteggio evidenziato */
.score-highlight {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    text-align: center;
}

.mini-stat i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.mini-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.mini-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Tabella Rosa - Versione Migliorata */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1000px;
}

.table-container thead {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-container thead th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 3px solid #1e40af;
}

.table-container tbody tr {
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
}

.table-container tbody tr:hover {
    background: linear-gradient(90deg, #eff6ff, white);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.table-container tbody tr:nth-child(even) {
    background: #f9fafb;
}

.table-container tbody tr:nth-child(even):hover {
    background: linear-gradient(90deg, #eff6ff, #f9fafb);
}

.table-container tbody td {
    padding: 1rem;
    vertical-align: middle;
    font-size: 0.95rem;
}

/* Colonna nome */
.table-container tbody td:first-child {
    font-weight: 600;
    color: #111827;
}

/* Badge migliorati */
.badge {
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

/* Score highlight */
.score-highlight {
    font-size: 1.15rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Progress bars */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    width: 60px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .table-container table {
        font-size: 0.9rem;
    }

    .table-container th,
    .table-container td {
        padding: 0.75rem 0.5rem;
    }
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gestione Section - Styling */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

#editPlayerForm label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

#editPlayerForm input[type="number"],
#editPlayerForm input[type="text"],
#editPlayerForm select {
    font-size: 1rem;
}

/* Radio buttons stato */
input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Classifica editor */
#classificaEditor {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.classifica-team-editor {
    padding: 1rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.classifica-team-editor:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.classifica-team-editor label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.classifica-team-editor input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .import-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: block !important;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* Tabelle responsive */
    .table-container {
        overflow-x: auto;
    }

    table {
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.5rem;
    }

    /* Nascondi colonne meno importanti su mobile */
    th:nth-child(4),
    td:nth-child(4),
    /* Squadra */
    th:nth-child(6),
    td:nth-child(6) {
        /* Titolarità */
        display: none;
    }

    /* Formazione campo più piccolo */
    .campo-calcio {
        padding: 1rem;
    }

    .campo-player {
        min-width: 80px !important;
        font-size: 0.8rem;
        padding: 0.5rem !important;
    }

    /* Controlli import */
    .import-grid {
        grid-template-columns: 1fr;
    }

    /* Paginazione */
    #paginationControls button {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Mobile piccoli (max 480px) */
@media (max-width: 480px) {
    .topbar-right {
        display: none;
    }

    h1 {
        font-size: 1.5rem;
    }

    .card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    /* Nascondi più colonne */
    th:nth-child(7),
    td:nth-child(7) {
        /* Stato */
        display: none;
    }
}

/* Overlay per sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Animazione per righe classifica */
#classificaEditorBody tr {
    transition: all 0.3s ease;
}

#classificaEditorBody tr:hover {
    transform: translateX(5px);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-sm:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#classificaEditor {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 400px;
}

.btn-arrow:not(:disabled):hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-arrow:not(:disabled):active {
    transform: scale(1.05) translateY(0);
}

/* Animazioni classifica */
#classificaEditorBody tr {
    transition: background 0.2s ease, transform 0.3s ease;
    position: relative;
}

#classificaEditorBody tr:hover {
    background: #f9fafb !important;
}

/* Animazione pulsanti freccia */
.btn-arrow {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-arrow:not(:disabled):hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-arrow:not(:disabled):active {
    transform: scale(1.05) translateY(0);
}

/* Animazione icone */
.btn-arrow i {
    transition: transform 0.2s ease;
}

.btn-arrow:not(:disabled):hover i {
    animation: bounce 0.6s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Highlight temporaneo per nuova posizione */
@keyframes highlightNew {
    0% {
        background: #dbeafe;
    }

    100% {
        background: white;
    }
}

/* Effetto pulse sui punteggi quando cambiano */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* ============================================
   RESPONSIVE MOBILE & TABLET
   ============================================ */

/* Media query per tablet (max 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        padding: 1rem;
    }

    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 0.9rem;
    }
}

/* Media query per mobile (max 768px) */
@media screen and (max-width: 768px) {
    /* Sidebar mobile - menu hamburger */
    /* ============================================
   SIDEBAR - Colori leggibili
   ============================================ */

    .sidebar.active {
        left: 0;
    }

    /* Pulsante hamburger */
    .mobile-menu-btn {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.75rem 1rem;
        font-size: 1.5rem;
        cursor: pointer;
        display: none;
        /* Nascosto di default */
    }

    /* Mostra solo su mobile */
    @media screen and (max-width: 768px) {
        .mobile-menu-btn {
            display: flex !important;
            position: fixed !important;
            top: 1rem !important;
            left: 1rem !important;
            z-index: 10001 !important;
            background: #3b82f6 !important;
            color: white !important;
            width: 50px !important;
            height: 50px !important;
            border-radius: 12px !important;
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5) !important;
        }

        /* Sidebar nascosta di default */
        .sidebar {
            position: fixed !important;
            left: -100% !important;
            width: 80% !important;
            max-width: 300px !important;
            height: 100vh !important;
            z-index: 10000 !important;
            transition: left 0.3s ease !important;
        }

        /* Sidebar aperta */
        .sidebar.active {
            left: 0 !important;
        }

        /* Overlay */
        .sidebar-overlay {
            display: none !important;
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            height: 100% !important;
            background: rgba(0, 0, 0, 0.7) !important;
            z-index: 9999 !important;
        }

        .sidebar-overlay.active {
            display: block !important;
        }

        /* Main content */
        .main-content {
            margin-left: 0 !important;
            padding-top: 80px !important;
        }

        /* Topbar nascosta su mobile */
        .topbar {
            padding-left: 70px !important;
        }
    }

    /* Assicurati che sia nascosto su desktop */
    @media screen and (min-width: 769px) {
        .mobile-menu-btn {
            display: none !important;
        }
    }


    /* Main content occupa tutto lo schermo */
    .main-content {
        margin-left: 0;
        padding: 1rem;
        margin-top: 60px;
    }

    /* Header mobile */
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    /* Stats grid mobile - 1 colonna */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    /* Tabelle responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    table th,
    table td {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* Bottoni mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Cards mobile */
    .player-card {
        padding: 1rem;
    }

    /* Formazione mobile */
    .formation-field {
        padding: 1rem;
    }

    .formation-line {
        gap: 0.5rem;
    }

    .player-badge {
        padding: 0.5rem;
        font-size: 0.7rem;
        min-width: 60px;
    }

    /* Modal mobile */
    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Wizard mobile */
    #setupWizard>div {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .wizard-step h2 {
        font-size: 1.3rem;
    }

    /* Classifica editor mobile */
    #classificaEditor table {
        font-size: 0.85rem;
    }

    #classificaEditor .btn-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Media query per mobile piccolo (max 480px) */
@media screen and (max-width: 480px) {
    .mobile-menu-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }

    .sidebar {
        width: 85% !important;
    }
}

/* Overlay per sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .nav-item,
    .player-badge {
        min-height: 44px;
        /* Apple touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-arrow {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Landscape mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .main-content {
        margin-top: 50px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   WIZARD SETUP MOBILE
   ============================================ */

/* Wizard responsive - tablet */
@media screen and (max-width: 1024px) {
    #setupWizard>div {
        max-width: 90%;
        padding: 2rem;
    }

    .method-card {
        padding: 1.5rem;
    }
}

/* Wizard responsive - mobile */
@media screen and (max-width: 768px) {
    #setupWizard {
        padding: 1rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    #setupWizard>div {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
        margin: 0;
        border-radius: 12px;
        max-height: none;
    }

    /* Step 1: Benvenuto */
    #wizardStep1 h1 {
        font-size: 1.8rem;
    }

    #wizardStep1 .fas.fa-futbol {
        font-size: 3rem;
    }

    #wizardStep1 p {
        font-size: 1rem;
    }

    /* Step 2: Scelta metodo - 1 colonna */
    #wizardStep2>div[style*="grid"] {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
    }

    .method-card {
        padding: 2rem 1rem;
        width: 100%;
        border-width: 2px;
    }

    .method-card i {
        font-size: 2.5rem;
    }

    .method-card h3 {
        font-size: 1.1rem;
    }

    /* Step 3: CSV Upload */
    .file-upload label {
        padding: 2rem 1rem;
    }

    .file-upload i {
        font-size: 3rem;
    }

    #wizardStep3 code {
        font-size: 0.7rem;
        white-space: pre-wrap;
        word-break: break-all;
    }

    /* Step 4: Form manuale - 1 colonna */
    #addPlayerForm>div[style*="grid"] {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    #addPlayerForm h4 {
        margin: 1rem 0 0.5rem 0;
        font-size: 1rem;
    }

    #addPlayerForm input,
    #addPlayerForm select {
        font-size: 16px;
        /* Previene zoom iOS */
        padding: 0.75rem;
    }

    #addPlayerForm label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    /* Lista giocatori aggiunti */
    #manualPlayersList {
        max-height: 150px;
        margin-bottom: 1rem;
    }

    #addedPlayersList>div {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem;
    }

    #addedPlayersList small {
        margin-top: 0.5rem;
    }

    /* Bottoni wizard */
    .wizard-step button {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 8px;
    }

    #wizardStep3>div[style*="flex"],
    #wizardStep4>div[style*="flex"] {
        flex-direction: column !important;
        gap: 0.75rem;
    }

    #wizardStep3>div[style*="flex"] button,
    #wizardStep4>div[style*="flex"] button {
        width: 100%;
        flex: none !important;
    }

    /* Info box */
    div[style*="background: #fef3c7"] {
        padding: 1rem;
        margin-top: 1rem;
    }

    div[style*="background: #fef3c7"] p {
        font-size: 0.9rem;
    }
}

/* Wizard responsive - mobile piccolo */
@media screen and (max-width: 480px) {
    #setupWizard>div {
        padding: 1rem;
    }

    #wizardStep1 h1 {
        font-size: 1.5rem;
    }

    #wizardStep1 .fas.fa-futbol {
        font-size: 2.5rem;
    }

    .method-card {
        padding: 1.5rem 1rem;
    }

    .method-card i {
        font-size: 2rem;
    }

    .method-card h3 {
        font-size: 1rem;
    }

    .method-card p {
        font-size: 0.85rem;
    }

    #addPlayerForm {
        padding: 1rem;
    }

    #addPlayerForm input,
    #addPlayerForm select {
        padding: 0.6rem;
    }

    .wizard-step h2 {
        font-size: 1.2rem;
    }

    #wizardStep3 code {
        font-size: 0.65rem;
        padding: 0.75rem;
    }
}

/* Fix per statistiche in Step 4 */
@media screen and (max-width: 768px) {

    /* Grid statistiche - 2 colonne invece di 3 */
    #addPlayerForm div[style*="repeat(3, 1fr)"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    /* Ultima riga info centrata */
    #addPlayerForm div[style*="repeat(3, 1fr)"]>div:last-child {
        grid-column: 1 / -1;
    }
}

/* Landscape mobile per wizard */
@media screen and (max-width: 768px) and (orientation: landscape) {
    #setupWizard {
        padding: 0.5rem;
    }

    #setupWizard>div {
        padding: 1rem;
    }

    .method-card {
        padding: 1rem;
    }

    #addPlayerForm {
        padding: 1rem;
    }
}

/* Touch improvements per wizard */
@media (hover: none) and (pointer: coarse) {
    .method-card {
        min-height: 120px;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }

    .method-card:active {
        transform: scale(0.98);
        background: #f0f9ff;
    }

    .wizard-step button {
        min-height: 48px;
        -webkit-tap-highlight-color: transparent;
    }

    #addPlayerForm input,
    #addPlayerForm select {
        min-height: 44px;
    }
}

/* Fix iOS Safari */
input,
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 8px;
}

/* Previeni zoom su focus iOS */
@media screen and (max-width: 768px) {

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Miglior rendering font mobile */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Pulsante hamburger mobile */
.mobile-menu-btn {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    /* Nascosto di default */
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mostra solo su mobile */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* FORZA HAMBURGER VISIBILE SU MOBILE */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
        position: fixed !important;
        top: 1rem !important;
        left: 1rem !important;
        z-index: 10001 !important;
    }
}

/* ============================================
   TOPBAR MOBILE FIX
   ============================================ */

@media screen and (max-width: 768px) {
    .topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 0.75rem 1rem 0.75rem 70px !important;
        /* Spazio per hamburger */
        z-index: 9999 !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        display: flex !important;
        justify-content: flex-end !important;
    }

    .topbar-right {
        display: flex !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    .topbar .btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
    }

    .topbar .btn i {
        display: none !important;
        /* Nascondi icone su mobile per risparmiare spazio */
    }

    .main-content {
        padding-top: 80px !important;
        /* Spazio per topbar fissa */
    }
}

/* Mobile piccolo - pulsanti stacked */
@media screen and (max-width: 480px) {
    .topbar-right {
        flex-direction: column !important;
        width: 100% !important;
    }

    .topbar .btn {
        width: 100% !important;
        text-align: center !important;
    }
}

/* ============================================
   📱 OTTIMIZZAZIONE MOBILE COMPLETA
   ============================================ */

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

    /* --- LAYOUT GENERALE --- */
    .main-content {
        margin-left: 0 !important;
        padding: 100px 1rem 1rem 1rem !important;
        /* Spazio per topbar + hamburger */
        width: 100% !important;
    }

    /* --- CARDS --- */
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        /* Una colonna */
        gap: 1rem !important;
    }

    .stat-card,
    .card {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .stat-card h3 {
        font-size: 0.9rem !important;
    }

    .stat-value {
        font-size: 1.5rem !important;
    }

    /* --- TABELLE --- */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -1rem !important;
        /* Full width */
        padding: 0 1rem !important;
    }

    table {
        font-size: 0.85rem !important;
        min-width: 600px !important;
        /* Scroll orizzontale */
    }

    table th,
    table td {
        padding: 0.5rem 0.25rem !important;
        white-space: nowrap !important;
    }

    /* Nascondi colonne meno importanti su mobile */
    table th:nth-child(n+6),
    table td:nth-child(n+6) {
        display: none !important;
    }

    /* --- FORMAZIONE --- */
    .formation-container {
        padding: 1rem !important;
        overflow-x: auto !important;
    }

    .formation-row {
        margin-bottom: 0.75rem !important;
    }

    .player-card {
        padding: 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .player-card .player-name {
        font-size: 0.75rem !important;
    }

    .player-card .player-score {
        font-size: 1rem !important;
    }

    /* --- CLASSIFICA --- */
    .classifica-table {
        font-size: 0.9rem !important;
    }

    .classifica-table td {
        padding: 0.75rem 0.5rem !important;
    }

    /* --- FILTRI --- */
    .filters,
    .filter-controls {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .filter-group {
        width: 100% !important;
    }

    .filter-group select,
    .filter-group input {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
        /* Prevent zoom on iOS */
    }

    /* --- PULSANTI --- */
    .btn-group {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .btn {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
    }

    /* --- MODALE --- */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 1rem !important;
        padding: 1rem !important;
    }

    .modal-header {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    /* --- FORM --- */
    .form-group {
        margin-bottom: 1rem !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }

    /* --- DASHBOARD --- */
    .dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .page-title {
        font-size: 1.5rem !important;
    }

    /* --- SEZIONE IMPORTA DATI --- */
    .upload-area {
        padding: 1.5rem !important;
    }

    .file-input-wrapper {
        flex-direction: column !important;
    }

    /* --- WIZARD SETUP --- */
    .wizard-container {
        padding: 1rem !important;
        width: 95% !important;
    }

    .wizard-step {
        padding: 1rem !important;
    }

    .player-input-row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* --- NOTIFICHE --- */
    .notification {
        width: calc(100% - 2rem) !important;
        right: 1rem !important;
        left: 1rem !important;
        font-size: 0.9rem !important;
    }

    /* --- SCROLL SMOOTH --- */
    * {
        -webkit-overflow-scrolling: touch !important;
    }
}

/* --- MOBILE PICCOLO (< 480px) --- */
@media screen and (max-width: 480px) {
    .main-content {
        padding: 90px 0.75rem 0.75rem 0.75rem !important;
    }

    table {
        font-size: 0.75rem !important;
    }

    .stat-card h3 {
        font-size: 0.8rem !important;
    }

    .stat-value {
        font-size: 1.25rem !important;
    }

    .page-title {
        font-size: 1.25rem !important;
    }
}

/* Pulsanti frecce verticali */
.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-icon {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-icon:hover:not(:disabled) {
    background: #2563eb;
    transform: scale(1.1);
}

.btn-icon:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.5;
}

.team-points-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
}

/* Animazioni classifica ULTRA FLUIDE */
#classificaEditorBody tr {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

#classificaEditorBody tr:hover {
    background: linear-gradient(135deg, #f0f9ff, #dbeafe) !important;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Effetto pulse per evidenziazione */
@keyframes pulse-highlight {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.badge-portiere {
    background: #60a5fa;
    color: white;
}

/* blu */
.badge-difensore {
    background: #10b981;
    color: white;
}

/* verde */
.badge-centrocampista {
    background: #f59e42;
    color: white;
}

/* arancione */
.badge-attaccante {
    background: #ef4444;
    color: white;
}

/* rosso */
.table-container table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

.table-container th,
.table-container td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-container thead tr:hover,
.table-container thead th:hover {
    background: var(--primary-color) !important;
    /* Il blu acceso che hai nei titoli */
    color: white !important;
}

.table-container thead {
    background: var(--primary-color);
    color: white;
}

.table th,
table td {
    text-align: center !important;
    vertical-align: middle;
}

table.centro th,
table.centro td {
    text-align: center !important;
    vertical-align: middle;
}

.classifica-header th {
    text-align: center !important;
    vertical-align: middle;
}

.wizard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wizard-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.wizard-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.wizard-option {
    padding: 2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s;
}

.wizard-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}
.wizard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.wizard-content {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wizard-content h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.wizard-content > p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.wizard-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.wizard-option {
    padding: 2.5rem 2rem;
    border: 3px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.3s;
    background: #fafafa;
}

.wizard-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.25);
    background: white;
}

.wizard-option h3 {
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.wizard-option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.wizard-option .btn {
    margin-top: 0.5rem;
}
