* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5em;
    font-weight: 600;
}

/* Barre de recherche */
.search-container {
    margin-bottom: 25px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#search-input {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

#search-input:focus {
    border-color: #667eea;
}

#clear-search {
    padding: 10px 20px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#clear-search:hover {
    background: #d32f2f;
}

.search-info {
    text-align: right;
    color: #666;
    font-size: 14px;
    padding: 5px 10px;
}

/* Loading spinner */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 18px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tableau */
.games-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.games-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.games-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.games-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.games-table tbody tr:hover {
    background-color: #f8f9ff;
}

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

.games-table tbody tr:nth-child(even):hover {
    background-color: #f0f0ff;
}

.games-table td {
    padding: 12px 15px;
    color: #333;
    font-size: 14px;
}

.games-table td:first-child {
    font-weight: 600;
    color: #667eea;
}

.no-results {
    text-align: center !important;
    color: #999;
    font-style: italic;
    padding: 40px !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 45px;
}

.page-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.page-btn.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-btn:active {
    transform: translateY(0);
}

/* Messages d'erreur */
.error {
    text-align: center;
    color: #f44336;
    padding: 30px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .games-table {
        font-size: 12px;
    }
    
    .games-table th,
    .games-table td {
        padding: 8px 10px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .games-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
