/* Rankings Page Styles */

:root {
    --gold: #fbbf24;
    --silver: #94a3b8;
    --bronze: #b45309;
    --primary-blue: #0a2351;
    --accent-blue: #3b82f6;
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
}

/* Hero Section (Copied from Tournaments for consistency) */
.hero-section {
    background: linear-gradient(135deg, #0a2351 0%, #1a3a6e 50%, #0a2351 100%);
    height: 600px;
    /* Fixed height for consistency */
    padding: 150px 40px 0;
    /* Fixed top padding, bottom handled by flex/height */
    /* Optimized padding */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align content to top */
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin-top: 20px;
    /* Reduced spacing */
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #f97316;
}

.stat-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.floating-icon {
    font-size: 12rem;
    opacity: 0.15;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Container Adjustments for Overlap */
.container.minus-margin {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 24px 80px;
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-visual {
        display: none;
    }

    .hero-stats {
        justify-content: center;
        gap: 24px;
    }
}

.rankings-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard property */
    -webkit-text-fill-color: transparent;
}

.rankings-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    line-height: 1.6;
}

.rankings-filter-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.filter-group {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 12px;
}

.filter-tab {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}

.filter-tab.active {
    background: white;
    color: #0a2351;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.filter-selects {
    display: flex;
    gap: 16px;
}

.custom-select {
    background: #1e293b;
    color: white;
    border: 1px solid #334155;
    padding: 12px 20px;
    border-radius: 12px;
    outline: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    min-width: 180px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.custom-select:hover {
    border-color: var(--accent-blue);
}

/* Podium Section */
.podium-section {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 30px;
    margin-top: 60px;
    margin-bottom: 80px;
    padding-bottom: 20px;
}

.podium-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    width: 260px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.podium-card:hover {
    transform: translateY(-10px) !important;
}

.podium-card.gold {
    order: 2;
    transform: scale(1.15);
    z-index: 2;
    border-top: 6px solid var(--gold);
    background: linear-gradient(to bottom, #fff, #fffbf0);
}

.podium-card.silver {
    order: 1;
    transform: translateY(20px);
    border-top: 6px solid var(--silver);
    background: linear-gradient(to bottom, #fff, #f8fafc);
}

.podium-card.bronze {
    order: 3;
    transform: translateY(40px);
    border-top: 6px solid var(--bronze);
    background: linear-gradient(to bottom, #fff, #fff7ed);
}

.medal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.athlete-img-placeholder {
    width: 90px;
    height: 90px;
    background: #f1f5f9;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #cbd5e1;
    font-size: 1.8rem;
    margin-bottom: 16px;
    border: 4px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.athlete-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.athlete-info .country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.athlete-info .score {
    display: inline-block;
    font-weight: 700;
    color: var(--accent-blue);
    background: #eff6ff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.rank-badge {
    position: absolute;
    top: -16px;
    background: #0f172a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: white;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Rankings Table */
.rankings-table-wrapper {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 100px;
    border: 1px solid #f1f5f9;
}

.rankings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.rankings-table th {
    background: #f8fafc;
    padding: 20px 30px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #e2e8f0;
}

.rank-row {
    transition: all 0.2s ease;
}

.rank-row:hover {
    background: #f8fafc;
    transform: scale(1.005);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    z-index: 10;
    position: relative;
}

.rank-row td {
    padding: 20px 30px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.rank-row:last-child td {
    border-bottom: none;
}

.rank-number {
    font-weight: 800;
    color: #94a3b8;
    font-size: 1.2rem;
    width: 32px;
    display: inline-block;
    text-align: center;
}

.top-rank .rank-number {
    color: #0f172a;
}

.athlete-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}

.athlete-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475569;
    font-size: 0.95rem;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.athlete-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
}

.td-country {
    color: #475569;
    font-weight: 500;
}

.category-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.td-points {
    color: #0f172a;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    /* Assuming monospaced or numbers font */
}

/* Responsive */
@media (max-width: 900px) {
    .podium-section {
        flex-direction: column;
        align-items: center;
        gap: 40px;
        margin-top: 40px;
    }

    .podium-card.gold,
    .podium-card.silver,
    .podium-card.bronze {
        order: 0;
        transform: none !important;
        width: 100%;
        max-width: 320px;
    }

    .rankings-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .filter-selects {
        flex-direction: column;
    }
}