body {
    background-color: #121212;
    color: #ffffff;
    font-family: Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* NAVBAR */

nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 15px 0;
    margin-bottom: 20px;
}

nav a {
    color: #4da3ff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

nav a:hover {
    color: #7dbdff;
    text-decoration: underline;
}

/* CARDS */

.card {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    margin: 30px auto;
}

/* FORMS */

input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background-color: #2b2b2b;
    color: white;
    box-sizing: border-box;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #4da3ff;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

button:hover {
    opacity: 0.9;
}

/* FLASH MESSAGES */

.flash {
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: bold;
}

.flash.success {
    background-color: #1f4d2e;
    color: #9df0b0;
}

.flash.error {
    background-color: #4d1f1f;
    color: #ff9b9b;
}

.flash.warning {
    background-color: #4d421f;
    color: #ffe58f;
}

/* HORIZONTAL RULE */

hr {
    border: none;
    border-top: 1px solid #333;
    margin-bottom: 20px;
}

/* DASHBOARD STATS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background-color: #1e1e1e;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card h3 {
    margin-top: 0;
    color: #4da3ff;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #2b2b2b;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: #4da3ff;
}

/* LEADERBOARD */

.leaderboard {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: #1e1e1e;
    padding: 15px 20px;
    border-radius: 12px;

    transition: transform 0.2s, background 0.2s;
}

.leaderboard-row:hover {
    transform: translateY(-2px);
    background-color: #252525;
}

.rank {
    font-size: 20px;
    width: 60px;
}

.name {
    flex: 1;
    font-weight: bold;
}

.xp {
    color: #4da3ff;
    font-weight: bold;
}

/* TOP 3 SPECIAL STYLES */

.rank-1 {
    border-left: 5px solid gold;
}

.rank-2 {
    border-left: 5px solid silver;
}

.rank-3 {
    border-left: 5px solid #cd7f32; /* bronze */
}

/* CHALLENGES */

.challenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.challenge-card {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0,0,0,0.35);
    transition: transform 0.2s, background 0.2s;
}

.challenge-card:hover {
    transform: translateY(-5px);
    background-color: #232323;
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.easy {
    border-left: 5px solid #4caf50;
}

.medium {
    border-left: 5px solid #ffb74d;
}

.hard {
    border-left: 5px solid #ef5350;
}

.easy .difficulty-badge {
    background-color: #1b3a22;
    color: #4caf50;
}

.medium .difficulty-badge {
    background-color: #3a2f1b;
    color: #ffb74d;
}

.hard .difficulty-badge {
    background-color: #3a1b1b;
    color: #ef5350;
}

.reward-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-weight: bold;
    color: #4da3ff;
}

.complete-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background-color: #4da3ff;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.complete-btn:hover {
    background-color: #6bb6ff;

.challenge-card.completed {
    opacity: 0.6;
    filter: grayscale(0.5);
}
}