/**
 * 🎮 Gamification Sistemi CSS
 * Puan sistemi, seviyeler, günlük görevler ve başarılar
 */

/* Gamification Container */
.gamification-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.gamification-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gamification-header h2 {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    font-weight: bold;
}

.gamification-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* User Stats */
.user-gamification-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gamification-stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.gamification-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Level Progress */
.level-progress-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.level-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.level-current {
    font-size: 1.5rem;
    font-weight: bold;
}

.level-title {
    font-size: 1.1rem;
    opacity: 0.9;
}

.level-experience {
    font-size: 0.9rem;
    opacity: 0.8;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.level-progress {
    height: 100%;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.level-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Daily Tasks */
.daily-tasks-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.daily-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.daily-tasks-header h3 {
    margin: 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.daily-tasks-header h3::before {
    content: "📋";
    font-size: 1.5rem;
}

.daily-streak {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.daily-streak i {
    color: #ffd700;
}

.daily-tasks-grid {
    display: grid;
    gap: 1rem;
}

.daily-task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.daily-task-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.daily-task-item.completed {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

.task-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.task-info {
    flex: 1;
}

.task-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: white;
}

.task-info p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.task-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    opacity: 0.8;
    min-width: 40px;
}

.task-reward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.reward-points {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.completed-icon {
    color: #4CAF50;
    font-size: 1.2rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Badges Display */
.user-badges, .gamification-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.badge-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: scale(1.1);
}

.badge-item:hover .badge-tooltip {
    opacity: 1;
    visibility: visible;
}

.badge-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.badge-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Notifications */
.gamification-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid;
}

.gamification-notification-points {
    border-left-color: #4CAF50;
}

.gamification-notification-levelup {
    border-left-color: #FFD700;
}

.gamification-notification-achievement {
    border-left-color: #9C27B0;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.gamification-notification-points .notification-icon {
    background: #4CAF50;
}

.gamification-notification-levelup .notification-icon {
    background: #FFD700;
    color: #333;
}

.gamification-notification-achievement .notification-icon {
    background: #9C27B0;
}

.notification-text {
    flex: 1;
}

.notification-text h5 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1rem;
}

.notification-text p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Leaderboard */
.leaderboard-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 2rem;
}

.leaderboard-header h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.5rem;
}

.leaderboard-header p {
    margin: 0;
    color: #666;
}

.leaderboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
    justify-content: center;
}

.leaderboard-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.leaderboard-tab:hover,
.leaderboard-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.leaderboard-content {
    min-height: 400px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.leaderboard-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    border-color: rgba(102, 126, 234, 0.2);
}

.leaderboard-item.top-three {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.leaderboard-item.top-three:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.leaderboard-item.top-three .rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-size: 1.2rem;
}

.leaderboard-item:nth-child(1) .rank {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
}

.leaderboard-item:nth-child(2) .rank {
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%);
    color: #333;
}

.leaderboard-item:nth-child(3) .rank {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h5 {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 1rem;
}

.user-details p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.user-score {
    font-weight: bold;
    color: #667eea;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gamification-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .user-gamification-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gamification-stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .daily-tasks-container {
        padding: 1rem;
    }
    
    .daily-task-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .task-progress {
        width: 100%;
    }
    
    .leaderboard-tabs {
        flex-direction: column;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gamification-notification {
        left: 20px;
        right: 20px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .user-gamification-stats {
        grid-template-columns: 1fr;
    }
    
    .gamification-header h2 {
        font-size: 1.5rem;
    }
    
    .level-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .daily-tasks-header {
        flex-direction: column;
        gap: 1rem;
    }
}
