/* Gamification Page Styles */
.gamification-container {
    background-color: var(--bg-color);
    /* V4.3: Use theme variable */
    color: var(--text-color);
    /* V4.3: Use theme variable */
    min-height: 100vh;
    padding: 2rem;
    padding-top: 100px;
    /* Header Space */
    font-family: 'Outfit', sans-serif;
    text-align: center;
}

.neon-text {
    color: var(--primary-color);
    /* V4.3: Readable in both themes */
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    /* V4.3: Changed to sans-serif for readability */
}

.btn-back {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    /* V4.3: Visible in light/dark modes */
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.subtitle {
    color: var(--text-light);
    /* V4.3: Use theme variable */
    margin-bottom: 2rem;
}

/* Current Status Card */
.current-status-card {
    background: var(--surface-color);
    /* V4.3: Use theme variable */
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    max-width: 500px;
    margin: 0 auto 3rem auto;
    border: 1px solid var(--text-light);
}

.rank-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.current-rank {
    color: var(--primary-color);
    /* V4.3: Use theme variable */
    font-size: 2rem;
    margin: 0;
}

.points-display {
    background: var(--bg-color);
    /* V4.3: Use theme variable */
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    margin: 1rem 0;
    border: 1px solid var(--text-light);
}

.points {
    color: var(--secondary-color);
    /* V4.3: Use theme variable */
    font-weight: bold;
    font-size: 1.5rem;
}

.label {
    color: var(--text-light);
    /* V4.3: Use theme variable */
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-container {
    margin-top: 1.5rem;
    text-align: left;
}

.progress-bar {
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .progress-bar {
    background-color: #444;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #E1306C, #F77737);
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-light);
    /* V4.3: Use theme variable */
    text-align: center;
}

/* Levels Timeline */
.levels-timeline {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.level-card {
    background: var(--surface-color);
    /* V4.3: Use theme variable */
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-left: 5px solid #ccc;
    transition: transform 0.3s;
    opacity: 0.6;
    box-shadow: var(--box-shadow);
}

.level-card.unlocked {
    border-left-color: #4CAF50;
    /* Green for unlocked */
    opacity: 1;
    background: var(--surface-color);
    box-shadow: var(--box-shadow);
}

.level-card.unlocked .level-icon {
    filter: none;
}

.level-card.locked .level-icon {
    filter: grayscale(100%);
}

.level-icon {
    font-size: 2.5rem;
}

.level-info {
    text-align: left;
}

.level-info h3 {
    margin: 0;
    color: var(--text-color);
    /* V4.3: Use theme variable */
}

.level-info .range {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.level-info p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0.3rem 0 0 0;
}

.action-area {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-gamification {
    background: linear-gradient(45deg, #E1306C, #C13584);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.4);
    transition: transform 0.2s;
}

.btn-gamification:hover {
    transform: scale(1.05);
}

.btn-secondary:hover {
    color: #fff;
}

.btn-leaderboard {
    background: linear-gradient(45deg, #FFD700, #FFA000);
    color: #000;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-leaderboard:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #FFA000, #FFD700);
    color: #000;
}

.btn-back {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    /* V4.3: Visible in light/dark modes */
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back:hover {
    background: #E1306C;
    color: #fff;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.4);
    transform: translateY(-2px);
}

/* Leaderboard Styles */
.leaderboard-card {
    background: var(--surface-color);
    /* V4.3: Theme var */
    border-radius: 15px;
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--box-shadow);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leaderboard-table th {
    padding: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--text-light);
}

.leaderboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

[data-theme="dark"] .leaderboard-table td {
    border-bottom: 1px solid #333;
}

.leaderboard-row:last-child td {
    border-bottom: none;
}

.rank-num {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-light);
    width: 50px;
    text-align: center;
}

.chef-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chef-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-color);
}

.chef-name {
    font-weight: bold;
    color: var(--text-color);
}

.chef-rank {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.chef-points {
    color: var(--secondary-color);
    font-weight: bold;
    text-align: right;
}

/* Top 3 Styling */
.top-1 .rank-num {
    font-size: 1.5rem;
}

.top-1 .chef-name {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.top-1 .chef-avatar-small {
    border-color: #FFD700;
}

.top-2 .chef-name {
    color: #C0C0C0;
}

.top-2 .chef-avatar-small {
    border-color: #C0C0C0;
}

.top-3 .chef-name {
    color: #CD7F32;
}

.top-3 .chef-avatar-small {
    border-color: #CD7F32;
}