/* Leaderboard Page Styles - Modern Gaming Design */

/* Variables for consistent theming */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gold-gradient: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --silver-gradient: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    --bronze-gradient: linear-gradient(135deg, #cd7f32 0%, #e6a85c 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    --danger-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --background-light: rgba(255, 255, 255, 0.95);
    --background-dark: rgba(0, 0, 0, 0.1);
    --shadow-primary: 0 10px 30px rgba(102, 126, 234, 0.3);
    --shadow-hover: 0 15px 40px rgba(102, 126, 234, 0.4);
    --border-radius: 16px;
    --border-radius-lg: 24px;
}

.leaderboard-container {
    background: var(--primary-gradient);
    min-height: 100vh;
    padding: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Section */
.leaderboard-header {
    text-align: center;
    padding: 2rem 0 4rem 0;
}

.hero-section {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.title-icon {
    font-size: 4rem;
    animation: bounce 2s infinite;
}

.title-decoration {
    font-size: 2rem;
    animation: sparkle 3s ease-in-out infinite;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0;
}

/* Statistics Overview Cards */
.stats-overview {
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--background-light);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
}

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

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.stat-info h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
}

.stat-info p {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Leaderboard Section */
.leaderboard-section {
    background: var(--background-light);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.section-title {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-icon {
    font-size: 1.5rem;
}

.section-subtitle {
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

/* Player Rows */
.leaderboard-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-row {
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.player-row:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

/* Special styling for top 3 */
.player-row.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 255, 255, 0.9));
    border-color: #ffd700;
}

.player-row.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(255, 255, 255, 0.9));
    border-color: #c0c0c0;
}

.player-row.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(255, 255, 255, 0.9));
    border-color: #cd7f32;
}

.player-row.champion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
    animation: shimmer 2s linear infinite;
}

.player-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.rank-badge {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.player-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
}

.stat-item .stat-icon {
    font-size: 1rem;
}

/* Player Details Grid */
.player-details {
    display: none; /* Hidden by default, show on larger screens */
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

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

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-top: 0.2rem;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Progress Bar */
.player-progress {
    width: 100px;
}

.progress-bar {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: var(--success-gradient);
    height: 100%;
    border-radius: 10px;
    transition: width 1.5s ease-out;
}

/* Sidebar Sections */
.recent-games-section,
.weekly-stats-section,
.quick-actions-section {
    background: var(--background-light);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recent-games-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.game-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
}

.game-players {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.vs {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.9rem;
}

.game-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.winner {
    color: #28a745;
    font-weight: 600;
}

.duration {
    color: #666;
}

.game-time {
    text-align: right;
}

.time-ago {
    font-size: 0.8rem;
    color: #888;
}

.time-ago.recent {
    color: var(--primary-color);
    font-weight: 600;
}

/* Weekly Stats */
.weekly-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.weekly-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.weekly-stat-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.02);
}

.weekly-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.weekly-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.weekly-info p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    font-weight: 600;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn.primary:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-btn.secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.action-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Animations */
.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (min-width: 992px) {
    .player-details {
        display: block;
    }
}

@media (max-width: 1200px) {
    .page-title {
        font-size: 3rem;
    }
    
    .player-row {
        grid-template-columns: auto 1fr auto;
    }
    
    .player-progress {
        width: 80px;
    }
}

@media (max-width: 768px) {
    .leaderboard-container {
        padding: 10px 0;
    }
    
    .leaderboard-header {
        padding: 1.5rem 0 3rem 0;
    }
    
    .page-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .title-icon {
        font-size: 3rem;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 2rem;
    }
    
    .leaderboard-section,
    .recent-games-section,
    .weekly-stats-section,
    .quick-actions-section {
        padding: 1.5rem;
    }
    
    .player-row {
        grid-template-columns: auto 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .player-progress {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 1rem;
    }
    
    .game-players {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }
    
    .quick-actions {
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .player-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .game-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .weekly-stat-item {
        padding: 0.75rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
} 