/* ===============================================
   RESULTS SECTION - Modern & Responsive Design
   =============================================== */

/* Hero Section */
.results-hero {
    position: relative;
    min-height: 300px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.results-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
}

.results-hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 1.5rem;
}

.results-hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.results-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Member Hero Specific */
.member-hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.member-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
}

/* Container */
.results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Filters Card */
.results-filters-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.results-filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-icon {
    width: 18px;
    height: 18px;
    color: #667eea;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    color: #1f2937;
    transition: all 0.2s;
    cursor: pointer;
    font-weight: 500;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Filter Actions */
.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.show-all-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.show-all-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Results Table */
.results-table-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-table thead th {
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.results-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.results-table tbody tr:hover {
    background: #f9fafb;
}

.results-table tbody tr.pb-row {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.02) 100%);
}

.results-table tbody tr.pb-row:hover {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.12) 0%, rgba(251, 191, 36, 0.04) 100%);
}

.results-table tbody td {
    padding: 1rem;
    font-size: 0.95rem;
    color: #374151;
}

/* Table Cell Styles */
.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.member-name {
    font-weight: 600;
}

.member-link {
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.member-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.gender-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.gender-badge.gender-male {
    background: #dbeafe;
    color: #1e40af;
}

.gender-badge.gender-female {
    background: #fce7f3;
    color: #be185d;
}

.race-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.race-title {
    font-weight: 600;
    color: #1f2937;
}

.race-location {
    font-size: 0.8rem;
    color: #6b7280;
}

.distance-badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.time-cell {
    font-weight: 700;
    color: #1f2937;
}

.time-value {
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
}

.pace-cell {

    .rank-cell {
        font-weight: 700;
        color: #667eea;
    }

    .rank-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        height: 32px;
        border-radius: 8px;
        background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
        font-size: 0.95rem;
        font-weight: 700;
        color: #374151;
    }

    .pb-row .rank-number {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #92400e;
    }
    font-size: 0.9rem;
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.pb-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: #d1d5db;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.no-results p {
    font-size: 1rem;
    color: #6b7280;
}

/* Pagination */
.results-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.results-pagination nav {
    display: flex;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-container {
        padding: 1rem;
    }

    .results-filters-card {
        padding: 1.5rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .results-table-wrapper {
        overflow-x: auto;
    }

    .results-table {
        min-width: 800px;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .race-info {
        max-width: 200px;
    }

    .race-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .results-hero-title {
        font-size: 1.75rem;
    }

    .results-hero-subtitle {
        font-size: 0.95rem;
    }

    .filters-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-filter {
        width: 100%;
        justify-content: center;
    }
}
