body {
    font-family: "Poppins", sans-serif;
    background-color: #f4f7f6;
    color: #c8102e;
    margin: 0;
}
.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
}
nav {
    background-color: #c8102e;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
nav a.brand {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
}
nav .search-container input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 125px;
}
nav .search-container button {
    padding: 8px 12px;
    background-color: #e07a5f;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}
.leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
    gap: 20px;
}
.leaderboard-card, .player-summary, table {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}
table {
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: #f8f9fa;
}
tr:hover { background-color: #f1f1f1; }
.win { background-color: #e8f5e9; } 
.loss { background-color: #ffebee; } 

.page-header {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap; 
    gap: 20px; 
}


.page-header h1 {
    margin: 0; 
    color: #3d405b; 
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 12px; 
}

.filter-container label {
    font-weight: 600; 
    color: #555;
    font-size: 0.95rem;
}


.filter-container label .fa-filter {
    margin-right: 5px;
    color: #c8102e;
}

.filter-reset-button {
    padding: 8px 15px;
    background-color: #6c757d; /* A neutral grey */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: 10px;
    transition: background-color 0.2s;
}
.filter-reset-button:hover {
    background-color: #5a6268;
}
 
.filter-container select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 35px 10px 15px; 
    font-size: 1rem;
    font-family: "Poppins", sans-serif;
    color: #333;
    cursor: pointer;
    min-width: 250px; 
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23555"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1.2em;

    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}


.filter-container select:focus {
    outline: none;
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.event-title {
    color: #e07a5f;
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-container {
        width: 100%; 
    }
    
    .filter-container select {
        width: 100%; 
    }
}

.event-title {
    color: #e07a5f;
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
}

.win { background-color: #e8f5e9; } 
.loss { background-color: #ffebee; } 


.pending { background-color: #e0f7fa; } 
.special-result { 
    background-color: #bdb9b9; 
    color: #ffffff;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.like-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
#likeButton {
    background-color: #e07a5f;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}
#likeButton:hover {
    background-color: #d46a4d;
}
#likeButton:disabled {
    background-color: #a5a5a5;
    cursor: not-allowed;
}
#likeCount {
    font-weight: bold;
    font-size: 1.2rem;
}

.results-container {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.results-list {
    list-style-type: none;
    padding: 0;
    margin-top: 20px;
}
.results-list li {
    margin-bottom: 10px;
}
.results-list a {
    display: block;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-decoration: none;
    color: #0d1b2a;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
}
.results-list a:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}