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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    padding: 20px;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: #ff0000;
    margin-bottom: 40px;
    font-size: 3em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
}

h2 {
    color: #ff0000;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff0000;
    padding-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #f9f9f9;
    color: #333;
}

input:focus, select:focus {
    outline: none;
    border-color: #ff0000;
    background: #fff;
}

button {
    background: #ff0000;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    background: #cc0000;
}

button.secondary {
    background: #6c757d;
    font-size: 14px;
    padding: 8px 15px;
    margin-left: 10px;
}

button.secondary:hover {
    background: #5a6268;
}

button.danger {
    background: transparent;
    color: #999;
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
}

button.danger:hover {
    background: #fee;
    color: #d00;
    border-color: #d00;
}

button.score-button {
    background: #ff0000;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 900;
    width: 100%;
    margin-top: 15px;
}

button.score-button:hover {
    background: #cc0000;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    border-color: #ff0000;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.1);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.team-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
}

.team-elo {
    font-size: 2em;
    color: #ff0000;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

.team-poule {
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.team-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.match-item {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #ff0000;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #ff0000;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.match-teams {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
}

.match-odds {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.odds-box {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.odds-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.odds-value-small {
    font-size: 1.8em;
    font-weight: bold;
    color: #ff0000;
}

.score-input-container {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    border: 2px solid #ff0000;
}

.score-input-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.score-team-section {
    flex: 1;
    text-align: center;
}

.score-team-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.score-input-row input {
    width: 80px;
    height: 60px;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.score-input-row input:focus {
    border-color: #ff0000;
    background: #fff;
}

.vs-small {
    font-weight: bold;
    color: #ff0000;
    font-size: 1.5em;
}

.delete-match-btn {
    text-align: center;
    margin-top: 10px;
}

.match-history {
    margin-top: 20px;
}

.match-date {
    font-size: 0.9em;
    color: #666;
}

.match-score {
    font-size: 1.2em;
    font-weight: bold;
    margin: 5px 0;
    color: #333;
}

.winner {
    color: #00aa00;
}

.loser {
    color: #ff0000;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 25px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    color: #333;
    font-weight: 600;
}

.tab.active {
    background: #ffffff;
    border-bottom: 3px solid #ff0000;
    color: #ff0000;
}

.tab:hover {
    background: #fff;
}

.tab-content {
    display: none;
}

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

select option {
    background: #fff;
    color: #333;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #ff0000;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

.close {
    color: #999;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ff0000;
}

.logout-btn {
    background: #ff0000;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    display: inline-block;
}

.logout-btn:hover {
    background: #cc0000;
}

.bet-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-card:hover {
    border-color: #ff0000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    transform: translateY(-2px);
}

.bet-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 0, 0, 0.2);
}

/* Classement des utilisateurs */
.leaderboard-container {
    margin-top: 20px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.leaderboard-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: #f8f9ff;
    transform: scale(1.01);
}

.leaderboard-table tbody tr:last-child {
    border-bottom: none;
}

.leaderboard-table td {
    padding: 15px;
}

/* Style pour le top 3 */
.leaderboard-table .rank-1 {
    background: linear-gradient(90deg, #fff9e6 0%, #ffffff 100%);
    font-weight: bold;
}

.leaderboard-table .rank-2 {
    background: linear-gradient(90deg, #f5f5f5 0%, #ffffff 100%);
    font-weight: bold;
}

.leaderboard-table .rank-3 {
    background: linear-gradient(90deg, #fff3e6 0%, #ffffff 100%);
    font-weight: bold;
}

.rank-cell {
    font-size: 1.2em;
    font-weight: bold;
    color: #667eea;
    width: 80px;
}

.username-cell {
    font-size: 1.1em;
    color: #000;  
    font-weight: 500;  
}

.credits-cell {
    text-align: right;
    font-weight: 600;
    color: #28a745;
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 600px) {
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .rank-cell {
        width: 60px;
        font-size: 1em;
    }
}

/* ========== SWITCH PARIS (Toggle moderne) ========== */

.bet-status-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
}

.bet-status-label {
    font-size: 0.95em;
    color: #666;
    font-weight: 500;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dc3545;
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(28px);
}

/* Badge statut */
.bet-status-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bet-status-badge.open {
    background-color: #28a745;
    color: white;
}

.bet-status-badge.closed {
    background-color: #dc3545;
    color: white;
}

/* Hover effect sur le switch */
.slider:hover {
    opacity: 0.9;
}

/* Animation de pulsation pour le badge */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.bet-status-badge.open {
    animation: pulse 2s infinite;
}