/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: #f0f0f0;
    background: #0f0f23;
    overflow-x: hidden;
    position: relative;
}

/* === GRID OVERLAY === */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* === SECTIONS BASE === */
section {
    position: relative;
    z-index: 1;
}

/* === NEON GLOW UTILITIES === */
.neon-glow-green {
    color: #39ff14;
    text-shadow:
        0 0 7px #39ff14,
        0 0 15px #39ff14,
        0 0 30px #39ff14;
}

.neon-glow-pink {
    color: #ff1493;
    text-shadow:
        0 0 7px #ff1493,
        0 0 15px #ff1493,
        0 0 30px #ff1493;
}

.neon-glow-blue {
    color: #00d4ff;
    text-shadow:
        0 0 7px #00d4ff,
        0 0 15px #00d4ff,
        0 0 30px #00d4ff;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: #0f0f23;
}

.brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(2.8rem, 8vw, 6rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #f0f0f0;
    opacity: 0.7;
    margin-bottom: 2.5rem;
}

.start-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: #0f0f23;
    background: #39ff14;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow:
        0 0 15px rgba(57, 255, 20, 0.4),
        0 0 30px rgba(57, 255, 20, 0.2);
    margin-bottom: 2.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.start-banner:hover {
    transform: scale(1.05);
    box-shadow:
        0 0 20px rgba(57, 255, 20, 0.6),
        0 0 40px rgba(57, 255, 20, 0.3);
}

.bolt-icon {
    flex-shrink: 0;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow:
            0 0 15px rgba(57, 255, 20, 0.4),
            0 0 30px rgba(57, 255, 20, 0.2);
    }
    50% {
        box-shadow:
            0 0 25px rgba(57, 255, 20, 0.6),
            0 0 50px rgba(57, 255, 20, 0.3),
            0 0 80px rgba(57, 255, 20, 0.15);
    }
}

/* === XP BAR === */
.xp-bar-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.xp-bar {
    width: 100%;
    height: 14px;
    background: #1a1a3a;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.xp-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #39ff14, #00d4ff);
    border-radius: 7px;
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.xp-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #ffd700;
}

.xp-value {
    font-family: 'Fira Code', monospace;
    color: #ffd700;
    font-weight: 700;
}

/* === CHALLENGES SECTION === */
.challenges {
    padding: 4rem 2rem 6rem;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* === LEVEL UP TEXT === */
.level-up-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    text-align: center;
    color: #ffd700;
    text-shadow:
        0 0 7px #ffd700,
        0 0 15px #ffd700,
        0 0 30px #ffd700;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.6s ease, transform 0.6s ease;
    padding: 1rem 0;
}

.level-up-text.visible {
    opacity: 1;
    transform: scale(1);
}

/* === QUEST CARDS === */
.quest-card {
    display: flex;
    background: #1a1a3a;
    border: 2px solid #39ff14;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quest-card:nth-child(3) {
    border-color: #ff1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.2);
}

.quest-card:nth-child(5) {
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.quest-card:nth-child(6) {
    border-color: #ff1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.2);
}

.quest-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.35);
}

.quest-card:nth-child(3):hover {
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.35);
}

.quest-card:nth-child(5):hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
}

.quest-card:nth-child(6):hover {
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.35);
}

.card-accent {
    width: 6px;
    flex-shrink: 0;
}

.accent-green {
    background: #39ff14;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

.accent-pink {
    background: #ff1493;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

.accent-blue {
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
}

.card-body {
    padding: 1.5rem;
    flex: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.difficulty {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    background: rgba(57, 255, 20, 0.1);
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.3);
}

.diff-intermediate {
    background: rgba(255, 20, 147, 0.1);
    color: #ff1493;
    border-color: rgba(255, 20, 147, 0.3);
}

.diff-advanced {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border-color: rgba(0, 212, 255, 0.3);
}

.diff-expert {
    background: rgba(255, 20, 147, 0.1);
    color: #ff1493;
    border-color: rgba(255, 20, 147, 0.3);
}

.xp-reward {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f0f0f0;
}

.bolt-icon-sm {
    flex-shrink: 0;
}

.card-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: rgba(240, 240, 240, 0.7);
    line-height: 1.65;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-progress {
    flex: 1;
    height: 6px;
    background: rgba(240, 240, 240, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #39ff14, #00d4ff);
    border-radius: 3px;
    transition: width 1s ease;
}

.card-status {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: rgba(240, 240, 240, 0.4);
    white-space: nowrap;
}

/* === FADE IN ANIMATION === */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger quest card animations */
.quest-card.fade-in:nth-child(2) { transition-delay: 0s; }
.quest-card.fade-in:nth-child(3) { transition-delay: 0.15s; }
.quest-card.fade-in:nth-child(5) { transition-delay: 0.3s; }
.quest-card.fade-in:nth-child(6) { transition-delay: 0.45s; }

/* === LEADERBOARD === */
.leaderboard {
    padding: 4rem 2rem 6rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.board {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.board-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #1a1a3a;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 20, 147, 0.15);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.board-entry:hover {
    border-color: rgba(255, 20, 147, 0.4);
    box-shadow: 0 0 12px rgba(255, 20, 147, 0.15);
}

.rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-number {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 700;
}

.rank-gold {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #0f0f23;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rank-silver {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #0f0f23;
    box-shadow: 0 0 8px rgba(192, 192, 192, 0.3);
}

.rank-bronze {
    background: linear-gradient(135deg, #cd7f32, #a0622e);
    color: #0f0f23;
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.3);
}

.rank-default {
    background: rgba(240, 240, 240, 0.1);
    color: #f0f0f0;
}

.player-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #f0f0f0;
    flex: 1;
}

.player-xp {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* === REWARD SECTION === */
.reward {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.reward-inner {
    text-align: center;
    max-width: 500px;
}

.reward-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 2rem;
}

.final-xp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.final-xp-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(240, 240, 240, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.final-xp-value {
    font-family: 'Fira Code', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3);
}

.reward-text {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgba(240, 240, 240, 0.6);
    margin-bottom: 2.5rem;
}

.reward-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: #1a1a3a;
    border: 1px solid rgba(57, 255, 20, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.badge:hover {
    transform: translateY(-4px);
}

.badge span {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: rgba(240, 240, 240, 0.6);
}

.badge-green {
    border-color: rgba(57, 255, 20, 0.3);
}
.badge-green:hover {
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

.badge-pink {
    border-color: rgba(255, 20, 147, 0.3);
}
.badge-pink:hover {
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.3);
}

.badge-blue {
    border-color: rgba(0, 212, 255, 0.3);
}
.badge-blue:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .challenges {
        padding: 2rem 1rem 4rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .leaderboard {
        padding: 2rem 1rem 4rem;
    }

    .board-entry {
        padding: 0.75rem 1rem;
    }

    .reward-badges {
        gap: 1rem;
    }

    .badge {
        padding: 0.75rem;
    }

    .level-up-text {
        font-size: 1.8rem;
    }
}
