#ricerca-giocatori-container {
    max-width: 1500px;
    margin: 20px auto;
    padding: 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

#ricerca-giocatori-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

#ricerca-giocatori-container > * {
    position: relative;
    z-index: 1;
}

.header-section {
    text-align: center;
    margin-bottom: 35px;
    padding: 35px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    color: #2d3436;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.header-section h1 {
    margin: 0 0 20px 0;
    font-size: 3em;
    font-weight: 900;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 50%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -1px;
}

.subtitle {
    margin: 0;
    font-size: 1.3em;
    color: #636e72;
    font-weight: 500;
    opacity: 0.9;
}

.search-section {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.search-section h3 {
    margin: 0 0 30px 0;
    color: #2d3436;
    font-size: 1.8em;
    font-weight: 800;
    text-align: center;
}

.filters-container {
    width: 100%;
}

.filter-row {
    margin-bottom: 25px;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.float-left {
    float: left;
}

.filter-field {
    width: 23%;
    margin-right: 2.66%;
}

.filter-field:last-child {
    margin-right: 0;
}

.select-filter {
    width: 100%;
    padding: 18px 20px;
    border: 3px solid #ddd6fe;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.4s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    height: 60px;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: 600;
}

.select-filter:focus {
    border-color: #74b9ff;
    box-shadow: 0 0 0 5px rgba(116, 185, 255, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.select-filter:hover {
    border-color: #a29bfe;
    transform: translateY(-1px);
}

.buttons-row {
    text-align: center;
    margin-top: 25px;
}

.btn-primary, .btn-secondary, .btn-info, .btn-warning {
    padding: 18px 30px;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 16px;
    margin: 0 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: white;
}

.btn-primary:hover, .btn-secondary:hover, .btn-info:hover, .btn-warning:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.results-section {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.results-info {
    margin-bottom: 25px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #81ecec 0%, #74b9ff 100%);
    border-radius: 15px;
    font-weight: 700;
    color: white;
    text-align: center;
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.3);
}

.results-count {
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.results-filters {
    font-size: 0.9em;
    opacity: 0.9;
}

.loading-spinner {
    text-align: center;
    padding: 80px;
    font-size: 1.6em;
    color: #74b9ff;
    font-weight: 700;
    animation: pulse-loading 1.5s infinite;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.table-container {
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    background: white;
}

.giocatori-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 15px;
}

.giocatori-table thead th {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: black;
    padding: 10px 11px;
    text-align: left;
    font-weight: 1000;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 12px;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Allineamento header per colonne monetarie (ora colonne 5 e 6) */
.giocatori-table thead th:nth-child(5),
.giocatori-table thead th:nth-child(6) {
    text-align: right;
}

.giocatori-table thead th:hover {
    background: linear-gradient(135deg, #0984e3 0%, #6c5ce7 100%);
}

.giocatori-table thead th.sortable::after {
    content: " 📊";
    opacity: 0.7;
}

.giocatori-table tbody td {
    padding: 18px;
    border-bottom: 2px solid #f1f3f4;
    transition: all 0.3s ease;
    vertical-align: middle;
}

/* Allineamento destra per cartellino e stipendio (ora colonne 5 e 6) */
.giocatori-table tbody td:nth-child(5),
.giocatori-table tbody td:nth-child(6) {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #00b894;
}

.giocatori-table tbody tr {
    transition: all 0.3s ease;
}

.giocatori-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4ff 100%);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(116, 185, 255, 0.2);
}

.giocatori-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

.no-results {
    text-align: center;
    color: #636e72;
    font-style: italic;
    padding: 60px !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-size: 18px;
    font-weight: 600;
}

/* Stili per ruoli colorati con badge */
.ruolo-portiere { 
    background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
    color: red;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(253, 203, 110, 0.4);
}

.ruolo-difensore { 
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: blue;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0, 184, 148, 0.4);
}

.ruolo-centrocampista { 
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: red;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(116, 185, 255, 0.4);
}

.ruolo-attaccante { 
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: blue;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(253, 121, 168, 0.4);
}

/* Badge per fantasquadra */
.fantasquadra-badge {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.fantasquadra-libero {
    background: linear-gradient(135deg, #f2fa02 0%, #f30404 100%);
}

/* Stili per la data di scadenza */
.data-scadenza {
    color: #e74c3c !important;
    font-weight: bold !important;
    font-size: 11px !important;
    display: block !important;
    margin-top: 4px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Stili per giocatori liberi */
.giocatore-libero {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%) !important;
}

.giocatore-libero td {
    color: #d32f2f !important;
    font-weight: bold !important;
}

.giocatore-libero:hover {
    background: linear-gradient(135deg, #fff59d 0%, #ffee58 100%) !important;
    transform: scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(255, 235, 59, 0.4) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ricerca-giocatori-container {
        margin: 10px;
        padding: 20px;
    }
    
    .header-section h1 {
        font-size: 2.2em;
    }
    
    .filter-field {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 15px;
    }
    
    .buttons-row {
        margin-top: 20px;
    }
    
    .btn-primary, .btn-secondary, .btn-info, .btn-warning {
        margin: 5px;
        padding: 15px 20px;
    }
    
    .giocatori-table {
        font-size: 13px;
    }
    
    .giocatori-table thead th,
    .giocatori-table tbody td {
        padding: 12px 8px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .filter-field {
        width: 48%;
        margin-right: 4%;
    }
    
    .filter-field:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 25px;
    }
    
    .header-section h1 {
        font-size: 1.8em;
    }
    
    .search-section,
    .results-section {
        padding: 25px;
    }
    
    .table-container {
        font-size: 12px;
    }
}