/* Isı Haritası Stilleri */
.heatmap-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 10px;
}

.heatmap-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Renk Paleti */
.heat-level-0 { background: #dc2626; } /* Kırmızı - Çok zor */
.heat-level-1 { background: #ea580c; } /* Turuncu-kırmızı */
.heat-level-2 { background: #f59e0b; } /* Turuncu */
.heat-level-3 { background: #eab308; } /* Sarı */
.heat-level-4 { background: #84cc16; } /* Açık yeşil */
.heat-level-5 { background: #22c55e; } /* Yeşil */
.heat-level-6 { background: #06b6d4; } /* Açık mavi */
.heat-level-7 { background: #3b82f6; } /* Mavi */
.heat-level-8 { background: #6366f1; } /* İndigo */
.heat-level-9 { background: #8b5cf6; } /* Mor - Mükemmel */

/* Kelime Izgara Düzeni */
.vocabulary-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.word-tile {
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.word-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-yellow);
}

.word-german {
    font-weight: bold;
    font-size: 1rem;
    color: white;
    margin-bottom: 4px;
}

.word-turkish {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.word-stats {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.success-rate {
    font-weight: bold;
}

.attempt-count {
    font-size: 0.6rem;
    opacity: 0.7;
}

/* Filtre ve Sıralama */
.heatmap-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Liste Görünümü */
.vocabulary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.word-list-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.word-list-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
}

.word-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.word-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.word-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.word-performance {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.performance-bar {
    width: 60px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* Ders Bazlı Görünüm */
.lesson-heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.lesson-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.lesson-card:hover {
    border-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.lesson-title {
    font-weight: bold;
    color: var(--text-primary);
}

.lesson-score {
    font-size: 0.9rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
}

.lesson-progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.lesson-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.lesson-words {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.mini-word-tile {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .heatmap-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .heatmap-legend {
        flex-wrap: wrap;
    }
    
    .vocabulary-heatmap {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }
    
    .word-tile {
        min-height: 70px;
        padding: 10px 6px;
    }
    
    .heatmap-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .lesson-heatmap {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode */
.dark-mode .heatmap-container {
    background: var(--dark-card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.dark-mode .word-tile,
.dark-mode .word-list-item,
.dark-mode .lesson-card {
    background: var(--dark-card);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .filter-select {
    background: var(--dark-input);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--dark-text);
}

/* Animasyonlar */
@keyframes heatPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.word-tile.updating {
    animation: heatPulse 1s ease-in-out;
}

.performance-fill {
    background: linear-gradient(90deg, 
        #dc2626 0%, 
        #ea580c 12.5%, 
        #f59e0b 25%, 
        #eab308 37.5%, 
        #84cc16 50%, 
        #22c55e 62.5%, 
        #06b6d4 75%, 
        #3b82f6 87.5%, 
        #8b5cf6 100%
    );
}