/* Results Page Specific Styles */

/* Page Header */
.page-header {
    background: url("https://images.pexels.com/photos/5716001/pexels-photo-5716001.jpeg") no-repeat center center/cover;
    color: black;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Results Search Section */
.results-search-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.search-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Form Section */
.search-form-section {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header i {
    font-size: 3rem;
    color:rgba(94,10,0,255);
    margin-bottom: 1rem;
}

.form-header h2 {
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #6b7280;
}

.results-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color:rgba(94,10,0,255);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-btn {
    margin-top: 1rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Results Display Section */
.results-display-section {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.display-header {
    text-align: center;
    margin-bottom: 2rem;
}

.display-header h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.display-header p {
    color: #6b7280;
}

.results-content {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results {
    text-align: center;
    color: #9ca3af;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Individual Result Display */
.result-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    animation: slideIn 0.5s ease;
}

.result-header {
    margin-bottom: 2rem;
}

.result-header h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-header p {
    color: #6b7280;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color:rgba(94,10,0,255);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.result-actions .btn {
    min-width: 150px;
}

/* Performance Chart */
.performance-chart {
    background: #f9fafb;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.chart-header {
    text-align: center;
    margin-bottom: 1rem;
}

.chart-header h4 {
    color: #374151;
    font-weight: 600;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: space-around;
    height: 150px;
    margin: 1rem 0;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.bar {
    width: 30px;
    background: linear-gradient(to top,rgba(94,10,0,255), #8b5cf6);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
}

.bar:hover {
    background: linear-gradient(to top, rgba(94,10,0,255), #7c3aed);
}

.bar-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.bar-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

/* Leaderboard Section */
.leaderboard-section {
    padding: 4rem 0;
    background: white;
}

.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background:rgba(94,10,0,255);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.leaderboard-container {
    position: relative;
}

.leaderboard {
    display: none;
    animation: fadeIn 0.5s ease;
}

.leaderboard.active {
    display: block;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.leaderboard-header p {
    color: #6b7280;
}

/* Leaderboard Table */
.leaderboard-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.table-header {
    background: linear-gradient(135deg,rgba(94,10,0,255) 0%, #8b5cf6 100%);
    color: white;
    padding: 1rem;
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 120px;
    gap: 1rem;
    font-weight: 600;
    text-align: center;
}

.table-body {
    display: flex;
    flex-direction: column;
}

.table-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 100px 120px;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
    transition: all 0.3s ease;
}

.table-row:hover {
    background: #f8fafc;
}

.table-row:last-child {
    border-bottom: none;
}

/* Special styling for top 3 */
.table-row.winner {
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
    border-left: 4px solid #f59e0b;
}

.table-row.runner-up {
    background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
    border-left: 4px solid #9ca3af;
}

.table-row.third {
    background: linear-gradient(135deg, #fef2e2 0%, #ffffff 100%);
    border-left: 4px solid #ea580c;
}

.rank {
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rank i {
    color: #f59e0b;
}

.participant {
    text-align: left;
}

.participant-info strong {
    display: block;
    color: #1f2937;
    font-weight: 600;
}

.participant-info span {
    color: #6b7280;
    font-size: 0.875rem;
}

.score,
.time,
.completion,
.problems {
    text-align: center;
    font-weight: 600;
    color: #374151;
}

.badge {
    text-align: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.gold {
    background: #fef3c7;
    color: #92400e;
}

.badge.silver {
    background: #f3f4f6;
    color: #374151;
}

.badge.bronze {
    background: #fef2e2;
    color: #ea580c;
}

.badge:not(.gold):not(.silver):not(.bronze) {
    background: #e0e7ff;
    color: #3730a3;
}

/* Statistics Section */
.statistics-section {
    padding: 4rem 0;
    background: #f8fafc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: rgba(94,10,0,255);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: #6b7280;
    font-weight: 500;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .search-form-section,
    .results-display-section {
        padding: 2rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr 80px 80px 100px;
        gap: 0.5rem;
        font-size: 0.875rem;
    }
    
    .participant-info span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .result-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .search-form-section,
    .results-display-section {
        padding: 1.5rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 50px 1fr 70px 90px;
        gap: 0.25rem;
        padding: 0.75rem 0.5rem;
    }
    
    .time,
    .completion {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .leaderboard-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 100%;
        max-width: 300px;
    }
}

