/* Leaderboard Styles - Matrix Portal */
/* Hybrid public/private leaderboard page */

/* Main Container */
.leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 5;
    min-height: 100vh;
}

/* Header */
.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(0, 20, 0, 0.6);
    border: 2px solid #00ff00;
    border-radius: 8px;
}

.leaderboard-header h1 {
    color: #00ff00;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px #00ff00;
}

.subtitle {
    color: #00cc00;
    font-size: 1.2rem;
}

.user-rank {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 10px #ffd700;
}

/* Public Notice */
.public-notice {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.public-notice p {
    color: #00ffff;
    margin: 0;
}

.public-notice a {
    color: #00ff00;
    text-decoration: underline;
    font-weight: 600;
}

.public-notice a:hover {
    text-shadow: 0 0 5px #00ff00;
}

/* Current User Highlight Card */
.user-card-highlight {
    background: linear-gradient(135deg, rgba(0, 50, 0, 0.8), rgba(0, 100, 0, 0.8));
    border: 3px solid #ffd700;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.user-card-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rank-badge {
    background: #ffd700;
    color: #000;
    padding: 1rem 1.5rem;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.user-info {
    flex: 1;
}

.user-alias {
    font-size: 1.5rem;
    color: #00ff00;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.user-stats-inline {
    color: #00cc00;
    font-size: 1rem;
}

.user-stats-inline span {
    margin: 0 0.3rem;
}

/* Leaderboard Table */
.leaderboard-table-container {
    background: rgba(0, 20, 0, 0.6);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    color: #00ff00;
}

.leaderboard-table thead {
    background: rgba(0, 50, 0, 0.8);
}

.leaderboard-table th {
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #00ff00;
    color: #00ff00;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

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

.leaderboard-table tbody tr:hover {
    background: rgba(0, 50, 0, 0.5);
}

/* Current User Row Highlight */
.current-user-row {
    background: rgba(255, 215, 0, 0.1) !important;
    border: 2px solid #ffd700;
}

.current-user-row td {
    font-weight: 600;
    color: #ffd700;
}

/* Top 3 Highlight */
.top-three {
    background: rgba(0, 100, 0, 0.3);
}

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

.col-user {
    min-width: 150px;
}

.col-level {
    text-align: center;
    width: 80px;
}

.col-puzzles {
    text-align: center;
    width: 100px;
}

.col-points {
    text-align: center;
    width: 100px;
}

.col-time {
    text-align: center;
    width: 100px;
}

.col-achievements {
    text-align: center;
    width: 100px;
}

.col-membership {
    text-align: center;
    width: 100px;
}

/* Rank Medals */
.rank-medal {
    font-size: 2rem;
    display: inline-block;
}

.rank-number {
    color: #00ff00;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Level Badge */
.level-badge {
    background: #00ff00;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
}

/* Membership Badge */
.membership-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.membership-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.membership-badge.registered {
    background: #00ff00;
    color: #000;
}

.membership-badge.guest {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid #00ff00;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 2rem !important;
    color: #00cc00;
    font-style: italic;
}

/* CTA Section */
.leaderboard-cta {
    background: rgba(0, 50, 0, 0.6);
    border: 2px solid #00ff00;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.leaderboard-cta h2 {
    color: #00ff00;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.leaderboard-cta p {
    color: #00cc00;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #00ff00;
    color: #000;
    text-decoration: none;
    border: 2px solid #00ff00;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cta-button:hover {
    background: transparent;
    color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    transform: translateY(-2px);
}

/* Navigation */
.leaderboard-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(0, 50, 0, 0.6);
    color: #00ff00;
    text-decoration: none;
    border: 2px solid #00ff00;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    background: #00ff00;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

/* Refresh Notice */
.refresh-notice {
    text-align: center;
    color: #00cc00;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-top: 2px solid #00ff00;
    color: #00cc00;
}

.site-footer p {
    margin: 0.5rem 0;
}

.site-footer a {
    color: #00ff00;
    text-decoration: underline;
}

.site-footer a:hover {
    text-shadow: 0 0 5px #00ff00;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .leaderboard-header h1 {
        font-size: 2rem;
    }
    
    .user-card-content {
        flex-direction: column;
        text-align: center;
    }
    
    .leaderboard-table-container {
        overflow-x: scroll;
    }
    
    .leaderboard-table {
        font-size: 0.85rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.5rem;
    }
    
    .rank-medal {
        font-size: 1.5rem;
    }
    
    .leaderboard-nav {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
    }
    
    .cta-button {
        width: 100%;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .leaderboard-table {
        font-size: 0.9rem;
    }
}

/* Animation for rank changes */
@keyframes rankUp {
    0% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.leaderboard-table tbody tr {
    animation: rankUp 0.5s ease-out;
}