/* ===================================
   LEADERBOARD PAGE - HOLOGRAPHIC THEME
   =================================== */

/* Reset navbar layout for leaderboard page - desktop only */
body .navbar {
    display: block;
    text-align: initial;
}

body .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

body .nav-logo {
    text-align: left;
}

body .nav-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

body .nav-logo .logo-img {
    width: 40px;
    height: 40px;
}

/* Desktop nav links - let crystalline.css handle mobile hiding */
@media (min-width: 769px) {
    body .nav-links {
        display: flex;
        justify-content: flex-end;
    }
}

/* Reset footer layout */
body .footer {
    text-align: left;
}

body .footer .container {
    text-align: left;
}

body .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    text-align: left;
}

body .footer-section {
    text-align: left;
}

/* ===================================
   HERO SECTION - Holographic
   =================================== */

.leaderboard-hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 0 10px;
    background: linear-gradient(135deg, #0B0B0F 0%, #0F1016 50%, #0B0B0F 100%);
    overflow: hidden;
}

.leaderboard-hero .hero-bg-effects {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 50% 40% at 30% 40%, rgba(0, 212, 255, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 60% 50% at 70% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
    animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.leaderboard-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.leaderboard-title {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-display);
    background: linear-gradient(135deg, #00D4FF 0%, #A855F7 50%, #EC4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.trophy-icon {
    font-size: 3rem;
    -webkit-text-fill-color: initial;
    animation: trophyBounce 2s ease-in-out infinite;
}

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

.leaderboard-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===================================
   LEADERBOARD SECTION - Holographic
   =================================== */

.leaderboard-section {
    position: relative;
    padding: var(--spacing-md) 0 var(--spacing-xl);
    background: #0B0B0F;
    min-height: auto;
}

.leaderboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 40% 30% at 20% 30%, rgba(0, 212, 255, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 70%, rgba(168, 85, 247, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.leaderboard-section .container {
    position: relative;
    z-index: 1;
}

/* ===================================
   PODIUM (TOP 3) - Holographic
   =================================== */

.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    min-height: 260px;
}

.podium-card {
    position: relative;
    text-align: center;
    padding: var(--spacing-xl);
    background: rgba(17, 17, 24, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s ease;
    width: 200px;
}

.podium-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 212, 255, 0.15);
}

/* First Place - Tallest */
.podium-card.first {
    order: 2;
    padding-bottom: 100px;
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.15) 0%, rgba(17, 17, 24, 0.95) 40%);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.2);
}

.podium-card.first .rank-badge {
    background: linear-gradient(135deg, #00D4FF 0%, #00B4E6 50%, #A855F7 100%);
    color: #000;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

/* Second Place */
.podium-card.second {
    order: 1;
    padding-bottom: 60px;
    background: linear-gradient(180deg, rgba(168, 85, 247, 0.1) 0%, rgba(17, 17, 24, 0.95) 40%);
}

.podium-card.second .rank-badge {
    background: linear-gradient(135deg, #A855F7 0%, #8B5CF6 50%, #7C3AED 100%);
    color: #fff;
}

/* Third Place */
.podium-card.third {
    order: 3;
    padding-bottom: 40px;
    background: linear-gradient(180deg, rgba(236, 72, 153, 0.1) 0%, rgba(17, 17, 24, 0.95) 40%);
}

.podium-card.third .rank-badge {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 50%, #BE185D 100%);
    color: #fff;
}

.rank-badge {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.podium-name {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xs);
}

.podium-institution {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: var(--spacing-md);
    min-height: 2.5em;
}

.podium-points {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00D4FF 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.podium-points-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

/* ===================================
   CONTROLS - Holographic
   =================================== */

.leaderboard-controls {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.leaderboard-controls .search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.leaderboard-controls .search-box svg {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.leaderboard-controls .search-box input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 48px;
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.leaderboard-controls .search-box input:focus {
    outline: none;
    border-color: #00D4FF;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.leaderboard-controls .filter-select {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.leaderboard-controls .filter-select:focus {
    outline: none;
    border-color: #00D4FF;
}

/* ===================================
   LEADERBOARD TABLE - Holographic
   =================================== */

.leaderboard-table-container {
    background: rgba(17, 17, 24, 0.8);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(0, 212, 255, 0.2);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

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

.leaderboard-table thead {
    background: rgba(0, 212, 255, 0.1);
}

.leaderboard-table th {
    padding: var(--spacing-lg);
    text-align: left;
    font-weight: 700;
    color: #00D4FF;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.leaderboard-table td {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.leaderboard-table tbody tr {
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.leaderboard-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank Column */
.rank-col {
    width: 80px;
    text-align: center !important;
}

.leaderboard-table td.rank-col {
    text-align: center;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    background: rgba(0, 212, 255, 0.1);
    color: #00D4FF;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.rank-number.top-3 {
    background: linear-gradient(135deg, #00D4FF 0%, #A855F7 100%);
    color: #000;
    border: none;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* Name Column */
.name-col {
    min-width: 200px;
}

.participant-name {
    font-weight: 600;
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 1rem;
}

/* Institution Column */
.institution-col {
    min-width: 200px;
}

.institution-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.institution-name.nirma {
    color: #00D4FF;
}

/* Points Column */
.points-col {
    width: 120px;
    text-align: right !important;
}

.leaderboard-table td.points-col {
    text-align: right;
}

.points-value {
    font-weight: 700;
    font-size: 1.125rem;
    background: linear-gradient(135deg, #00D4FF 0%, #A855F7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   LOADING & EMPTY STATES - Holographic
   =================================== */

.loading-state td,
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl) !important;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--text-muted);
}

.loading-spinner .spinner {
    color: #00D4FF;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-3xl);
    color: var(--text-muted);
}

.empty-state svg {
    color: rgba(0, 212, 255, 0.3);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-family: var(--font-display);
    color: var(--text-primary);
    margin: 0;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .leaderboard-hero {
        padding: 100px 0 30px;
        min-height: auto;
    }
    
    .leaderboard-title {
        font-size: 2rem;
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .trophy-icon {
        font-size: 2rem;
    }
    
    .leaderboard-subtitle {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    
    .leaderboard-section {
        padding: var(--spacing-md) 0 var(--spacing-xl);
    }
    
    .podium-container {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md);
    }
    
    .podium-card {
        width: 100%;
        max-width: 100%;
        padding: var(--spacing-lg) !important;
        margin: 0;
    }
    
    .podium-card.first,
    .podium-card.second,
    .podium-card.third {
        order: unset;
        padding-bottom: var(--spacing-lg) !important;
    }
    
    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .podium-name {
        font-size: 1.1rem;
    }
    
    .podium-points {
        font-size: 1.5rem;
    }
    
    .leaderboard-controls {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md);
    }
    
    .leaderboard-controls .search-box {
        width: 100%;
    }
    
    .leaderboard-controls .filter-select {
        width: 100%;
    }
    
    .leaderboard-table-container {
        margin: 0 var(--spacing-sm);
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .leaderboard-table {
        font-size: 0.875rem;
        min-width: 100%;
        width: 100%;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 12px 10px;
    }
    
    .leaderboard-table th.institution-col,
    .leaderboard-table td.institution-col {
        display: none;
    }
    
    .leaderboard-table th.rank-col {
        width: 60px;
        text-align: center;
    }
    
    .leaderboard-table th.name-col {
        text-align: left;
    }
    
    .leaderboard-table th.points-col {
        width: 70px;
        text-align: right;
    }
    
    .leaderboard-table td.rank-col {
        text-align: center;
    }
    
    .leaderboard-table td.points-col {
        text-align: right;
    }
    
    .rank-col {
        width: 60px;
    }
    
    .rank-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
        margin: 0 auto;
    }
    
    .participant-name {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .points-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary);
    }
    
    .leaderboard-table tbody tr {
        border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    }
    
    .leaderboard-table tbody tr:hover {
        background: rgba(0, 212, 255, 0.05);
    }
}

@media (max-width: 480px) {
    .leaderboard-hero {
        padding: 90px 0 20px;
    }
    
    .leaderboard-title {
        font-size: 1.75rem;
    }
    
    .leaderboard-subtitle {
        font-size: 0.8rem;
    }
    
    .podium-card {
        padding: var(--spacing-md) !important;
    }
    
    .podium-name {
        font-size: 1rem;
    }
    
    .podium-institution {
        font-size: 0.7rem;
    }
    
    .podium-points {
        font-size: 1.25rem;
    }
    
    .leaderboard-table-container {
        margin: 0 8px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }
    
    .leaderboard-table th.rank-col {
        width: 50px;
    }
    
    .leaderboard-table th.points-col {
        width: 60px;
    }
    
    .rank-number {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    
    .participant-name {
        font-size: 0.85rem;
    }
    
    .points-value {
        font-size: 0.95rem;
    }
}
