.results-detail-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    /* Keep content below fixed navbar */
    padding-top: 6rem;
}

/* Header Section */
.race-header {
    background: linear-gradient(135deg, var(--blue-primary), var(--green-primary), var(--orange-primary));
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.race-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(30deg);
}

.header-content {
    position: relative;
    z-index: 1;
}

.back-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: white;
}

.race-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.race-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    color: white;
}

.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Podium Section */
.podium-section {
    margin-bottom: 3rem;
    border-radius: 24px;
    padding: 2rem;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
        linear-gradient(135deg, #0066FF, #FF6B00, #00CC66) border-box;
    box-shadow: 0 8px 40px rgba(0, 102, 255, 0.10), 0 2px 12px rgba(255, 107, 0, 0.08);
}

.section-title {
    color: var(--text-body);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--orange-primary);
}

.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 2rem 1rem;
    background: var(--surface-bg);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border-radius: 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.podium-place:hover {
    transform: translateY(-10px);
}

.podium-place.first {
    border-color: rgba(255, 215, 0, 0.55);
    background: rgba(255, 215, 0, 0.04);
    box-shadow: 0 0 28px rgba(255, 215, 0, 0.18);
}

.podium-place.second {
    border-color: rgba(192, 192, 192, 0.55);
    background: rgba(192, 192, 192, 0.04);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.14);
}

.podium-place.third {
    border-color: rgba(205, 127, 50, 0.55);
    background: rgba(205, 127, 50, 0.04);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.14);
}

.crown {
    color: gold;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.place-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border: 3px solid rgba(0, 0, 0, 0.12);
}

.first .place-avatar {
    width: 100px;
    height: 100px;
    border-color: gold;
    background: rgba(255, 215, 0, 0.1);
}

.second .place-avatar {
    border-color: silver;
    background: rgba(192, 192, 192, 0.1);
}

.third .place-avatar {
    border-color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
}

.place-number {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.first .place-number { color: gold; }
.second .place-number { color: silver; }
.third .place-number { color: #cd7f32; }

.place-name {
    color: var(--text-body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    max-width: 150px;
}

.place-time {
    color: var(--green-primary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.place-club {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.podium-bar {
    width: 120px;
    border-radius: 8px 8px 0 0;
}

.podium-bar.gold {
    height: 120px;
    background: linear-gradient(180deg, gold, #b8860b);
}

.podium-bar.silver {
    height: 90px;
    background: linear-gradient(180deg, silver, #808080);
}

.podium-bar.bronze {
    height: 60px;
    background: linear-gradient(180deg, #cd7f32, #8b4513);
}

/* Results Section */
.results-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: white;
    color: var(--text-body);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    background: transparent;
    color: var(--text-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--blue-primary), var(--green-primary));
    border-color: transparent;
    color: white;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-bottom: 2rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.12), rgba(0, 204, 102, 0.12), rgba(255, 107, 0, 0.12));
    color: var(--text-body);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.results-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    color: var(--text-body);
    font-size: 0.9rem;
}

.result-row {
    transition: all 0.3s ease;
}

.result-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

.gold-row {
    background: rgba(255, 215, 0, 0.05);
}

.silver-row {
    background: rgba(192, 192, 192, 0.05);
}

.bronze-row {
    background: rgba(205, 127, 50, 0.05);
}

.position-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

.position-badge.gold {
    background: linear-gradient(135deg, gold, #ffd700);
    color: #333;
}

.position-badge.silver {
    background: linear-gradient(135deg, silver, #c0c0c0);
    color: #333;
}

.position-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

.position-number {
    color: var(--text-body);
    font-weight: 600;
}

.bib-number {
    background: rgba(0, 0, 0, 0.07);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
}

.category-badge {
    background: rgba(0, 204, 102, 0.2);
    color: var(--green-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.time-display {
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--orange-primary);
}

.gender-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gender-badge.male {
    background: rgba(0, 102, 255, 0.2);
    color: var(--blue-primary);
}

.gender-badge.female {
    background: rgba(255, 105, 180, 0.2);
    color: #ff69b4;
}

/* Stats Cards */
.results-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--orange-primary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-body);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Congratulations Banner */
.congrats-banner {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15), rgba(0, 204, 102, 0.15), rgba(255, 107, 0, 0.15));
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.congrats-banner h2 {
    color: var(--text-body);
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.congrats-banner h2 i {
    color: gold;
}

.confetti-left,
.confetti-right {
    color: gold;
    font-size: 1.5rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

.confetti-right {
    animation-delay: 0.75s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Top Women & Men Sections */
.highlight-section {
    margin-bottom: 2rem;
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.women-section {
    border-color: rgba(255, 105, 180, 0.45);
    background: rgba(255, 105, 180, 0.04);
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.08);
}

.women-section .section-title i {
    color: #ff69b4;
}

.men-section {
    border-color: rgba(30, 144, 255, 0.45);
    background: rgba(30, 144, 255, 0.04);
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.08);
}

.men-section .section-title i {
    color: #1e90ff;
}

.highlight-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.highlight-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 200px;
    max-width: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.highlight-card.gold {
    border-color: rgba(255, 215, 0, 0.4);
    background: rgba(255, 215, 0, 0.05);
}

.highlight-card.silver {
    border-color: rgba(192, 192, 192, 0.4);
    background: rgba(192, 192, 192, 0.05);
}

.highlight-card.bronze {
    border-color: rgba(205, 127, 50, 0.4);
    background: rgba(205, 127, 50, 0.05);
}

.card-rank {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.highlight-card.gold .card-rank {
    background: linear-gradient(135deg, gold, #ffd700);
    color: #333;
}

.highlight-card.silver .card-rank {
    background: linear-gradient(135deg, silver, #c0c0c0);
    color: #333;
}

.highlight-card.bronze .card-rank {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

.card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 105, 180, 0.1);
    border: 2px solid rgba(255, 105, 180, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ff69b4;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.card-info {
    width: 100%;
}

.card-name {
    color: var(--text-body);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.card-time {
    color: var(--green-primary);
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.card-time i {
    margin-right: 0.35rem;
}

.card-club {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Categories Section */
.categories-section {
    margin-bottom: 2rem;
}

.categories-section .section-title i {
    color: var(--blue-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 102, 255, 0.15);
}

.category-header {
    background: linear-gradient(135deg, var(--blue-primary), var(--green-primary));
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-header i {
    color: white;
}

.category-header h3 {
    color: white;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.category-list {
    padding: 0.75rem;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: background 0.3s ease;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.category-item.first {
    background: rgba(255, 215, 0, 0.08);
}

.category-item.second {
    background: rgba(192, 192, 192, 0.05);
}

.category-item.third {
    background: rgba(205, 127, 50, 0.05);
}

.item-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.75rem;
}

.category-item.first .item-rank {
    background: linear-gradient(135deg, gold, #ffd700);
    color: #333;
}

.category-item.second .item-rank {
    background: linear-gradient(135deg, silver, #c0c0c0);
    color: #333;
}

.category-item.third .item-rank {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

.item-name {
    flex: 1;
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
}

.item-time {
    color: var(--orange-primary);
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-body);
}

.no-results i {
    font-size: 4rem;
    color: rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
}

.no-results h3 {
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .results-detail-container {
        padding: 1rem;
        padding-top: 5.5rem;
        padding-bottom: 3%;
    }

    .race-header {
        padding: 1.5rem;
    }

    .race-title {
        font-size: 1.75rem;
    }

    .race-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-place {
        order: 2;
    }

    .podium-place.first {
        order: 1;
    }

    .podium-bar {
        display: none;
    }

    .filter-bar {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .results-stats {
        gap: 1rem;
    }

    .stat-card {
        min-width: 100px;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .results-detail-container {
        padding-top: 5.25rem;
    }
}
