/* Leaderboard Specific Styles */

/* Hero Section */
.leaderboard-hero {
    min-height: 70vh;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.leaderboard-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
}

.title-glow {
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 50px rgba(102, 126, 234, 0.5);
    animation: titlePulse 3s infinite ease-in-out;
}

.leaderboard-subtitle {
    font-size: 1.3rem;
    color: #b8c6db;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.6;
}

.leaderboard-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 1.5rem 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.stat-label {
    font-size: 0.9rem;
    color: #b8c6db;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Achievement Categories */
.achievement-categories {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #667eea;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

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

.category-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.category-card p {
    color: #b8c6db;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.category-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

/* Main Leaderboard */
.main-leaderboard {
    padding: 4rem 0;
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.leaderboard-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #b8c6db;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Podium Section */
.podium-section {
    margin-bottom: 4rem;
}

.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.podium-place {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 2rem 1rem;
    text-align: center;
    flex: 1;
    position: relative;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.first-place {
    height: 200px;
    border-color: #FFD700;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,215,0,0.1));
    transform: scale(1.1);
}

.second-place {
    height: 160px;
    border-color: #C0C0C0;
    background: linear-gradient(135deg, rgba(192,192,192,0.2), rgba(192,192,192,0.1));
}

.third-place {
    height: 140px;
    border-color: #CD7F32;
    background: linear-gradient(135deg, rgba(205,127,50,0.2), rgba(205,127,50,0.1));
}

.place-medal {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: medalFloat 3s infinite ease-in-out;
}

.place-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.place-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 1rem;
}

.place-achievements {
    font-size: 0.8rem;
    color: #b8c6db;
}

/* Leaderboard Table */
.leaderboard-table {
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.table-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px 2fr;
    padding: 1rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.table-body {
    max-height: 600px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: grid;
    grid-template-columns: 80px 1fr 120px 200px 2fr;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: white;
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.leaderboard-entry:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.entry-rank {
    font-weight: bold;
    color: #00ffff;
    display: flex;
    align-items: center;
}

.entry-explorer {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.explorer-name {
    font-weight: 600;
    color: white;
}

.explorer-location {
    font-size: 0.8rem;
    color: #b8c6db;
    opacity: 0.8;
}

.entry-score {
    font-weight: bold;
    color: #f093fb;
    display: flex;
    align-items: center;
}

.entry-achievements {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
}

.achievement-badge {
    background: rgba(0,255,255,0.2);
    color: #00ffff;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    border: 1px solid rgba(0,255,255,0.3);
}

.entry-message {
    font-style: italic;
    color: #e8e8e8;
    line-height: 1.4;
    display: flex;
    align-items: center;
    position: relative;
}

.message-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-expand {
    color: #667eea;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    text-decoration: underline;
}

/* User Entry Section */
.user-entry-section {
    margin-top: 3rem;
}

.entry-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.entry-card h3 {
    color: white;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.entry-card > p {
    color: #b8c6db;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

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

.form-group label {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.8rem;
    color: white;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b8c6db;
    opacity: 0.7;
}

.character-count {
    text-align: right;
    font-size: 0.8rem;
    color: #b8c6db;
}

.your-achievements {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Achievement Modal */
.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #667eea;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 18px 18px 0 0;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    color: white;
}

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

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

@keyframes titlePulse {
    0%, 100% {
        text-shadow: 0 0 50px rgba(102, 126, 234, 0.5);
    }
    50% {
        text-shadow: 0 0 80px rgba(102, 126, 234, 0.8), 0 0 120px rgba(118, 75, 162, 0.6);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .table-header,
    .leaderboard-entry {
        grid-template-columns: 60px 1fr 100px 150px 1.5fr;
        font-size: 0.9rem;
    }

    .leaderboard-title {
        font-size: 2.5rem;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .first-place,
    .second-place,
    .third-place {
        width: 100%;
        max-width: 300px;
        height: auto;
        transform: none;
    }
}

@media (max-width: 768px) {
    .leaderboard-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        width: 100%;
        max-width: 200px;
    }

    .leaderboard-header {
        flex-direction: column;
        text-align: center;
    }

    .table-header,
    .leaderboard-entry {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .table-header > div,
    .leaderboard-entry > div {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 0.5rem;
    }

    .entry-message {
        margin-top: 0.5rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .leaderboard-hero {
        padding: 1rem 0;
        min-height: 60vh;
    }

    .leaderboard-title {
        font-size: 2rem;
    }

    .entry-card {
        margin: 0 1rem;
        padding: 1.5rem;
    }
}