/* =====================================================
   கழகப் போர்வாள் - 2026 Gamification Styles
   ===================================================== */

/* Gamification Dashboard Container */
.gamification-dashboard {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    background: #fdfdfd;
}

.premium-card-red {
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    border-radius: 30px;
    padding: 35px;
    color: white;
    box-shadow: 0 20px 40px rgba(220, 20, 60, 0.25);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-card-red::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card-premium {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.rank-box-mini {
    background: white;
    padding: 18px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.rank-box-mini:hover {
    transform: scale(1.05);
    border-color: #DC143C;
}

.progress-shine {
    position: relative;
    overflow: hidden;
}

.progress-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine-progress 2s infinite;
}

@keyframes shine-progress {
    100% { left: 100%; }
}

.avatar-premium {
    border: 5px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.avatar-premium:hover {
    transform: scale(1.1) rotate(5deg);
}


/* Points Widget Styles */
.points-widget {
    background: linear-gradient(135deg, #DC143C 0%, #8B0000 100%);
    border-radius: 16px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.3);
    margin-bottom: 24px;
    animation: slideInDown 0.5s ease;
}

.points-widget.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
}

.points-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.level-icon {
    font-size: 48px;
    animation: bounce 2s infinite;
}

.points-info h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.level-name {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 600;
}

.progress-section {
    margin-top: 16px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.progress-text {
    font-size: 12px;
    opacity: 0.9;
    text-align: center;
}

.streak-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 600;
}

.streak-icon {
    font-size: 20px;
    animation: flicker 1.5s infinite;
}

/* Leaderboard Styles */
.leaderboard-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #DC143C;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f0f0f0;
}

.leaderboard-tabs button {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.leaderboard-tabs button.active {
    color: #DC143C;
    border-bottom-color: #DC143C;
}

.leaderboard-tabs button:hover {
    color: #DC143C;
}

.leaders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leader-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.leader-card:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.leader-card.top-three {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 100%);
    border-color: #FFD700;
}

.leader-card.current-user {
    background: linear-gradient(135deg, #FFE4E4 0%, #FFD4D4 100%);
    border-color: #DC143C;
}

.leader-card .rank {
    font-size: 24px;
    font-weight: 800;
    min-width: 50px;
    text-align: center;
}

.leader-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #DC143C;
}

.leader-info {
    flex: 1;
}

.leader-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.leader-info .constituency {
    font-size: 13px;
    color: #666;
}

.leader-points {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.leader-points .points {
    font-size: 24px;
    font-weight: 800;
    color: #DC143C;
}

.leader-points .points-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* Daily Missions Styles */
.daily-missions {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.missions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mission-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.mission-card:hover {
    border-color: #DC143C;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.1);
}

.mission-card.completed {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-color: #4CAF50;
}

.mission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mission-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.mission-header .bonus {
    background: #DC143C;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.mission-card .progress-bar {
    background: #e0e0e0;
    height: 8px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.mission-card .progress-fill {
    background: linear-gradient(90deg, #DC143C, #8B0000);
    height: 100%;
    transition: width 0.5s ease;
}

.mission-card.completed .progress-fill {
    background: linear-gradient(90deg, #4CAF50, #2E7D32);
}

.mission-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-footer p {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.completed-badge {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Achievements Styles */
.achievements-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.achievement-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-card.earned {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE4B5 100%);
    border-color: #FFD700;
}

.badge-icon {
    font-size: 48px;
    margin-bottom: 12px;
    animation: bounce 2s infinite;
}

.achievement-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.achievement-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.points-reward {
    background: #DC143C;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.earned-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gamification-dashboard {
        padding: 12px;
    }

    .points-widget {
        padding: 16px;
    }

    .level-icon {
        font-size: 36px;
    }

    .points-info h3 {
        font-size: 24px;
    }

    .leaderboard-container,
    .daily-missions,
    .achievements-container {
        padding: 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .leaderboard-tabs button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .leader-photo {
        width: 40px;
        height: 40px;
    }

    .leader-info h4 {
        font-size: 14px;
    }

    .leader-points .points {
        font-size: 20px;
    }

    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .badge-icon {
        font-size: 36px;
    }
}

/* No Missions Message */
.no-missions {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
