/* ===============================
   NAPI RÉSZLETES STATISZTIKA MODAL
   Add hozzá a style.css végéhez!
   =============================== */

/* Kattintható oszlopok */
.day-bar.clickable {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.day-bar.clickable:hover {
    transform: translateY(-3px);
}

.day-bar.clickable:hover .bar {
    filter: brightness(1.2);
}

/* Modal alap */
.day-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.day-detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-detail-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.day-detail-content {
    position: relative;
    background: var(--card-bg, #1e3a5f);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.day-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.day-detail-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color, #fff);
}

.day-detail-close {
    background: none;
    border: none;
    color: var(--text-muted, #8ba3c7);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.15s;
}

.day-detail-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.day-detail-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Fő statisztikák */
.day-stats-summary {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.day-stat-big {
    text-align: center;
    min-width: 100px;
}

.day-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color, #fff);
}

.day-stat-value.excellent {
    color: #00d26a;
}

.day-stat-value.good {
    color: #ffc107;
}

.day-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted, #8ba3c7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-stat-grid {
    display: flex;
    gap: 16px;
    flex: 1;
    justify-content: center;
}

.day-stat-item {
    text-align: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    min-width: 70px;
}

.day-stat-item.correct .day-stat-num {
    color: #00d26a;
}

.day-stat-item.error .day-stat-num {
    color: #ff6b6b;
}

.day-stat-num {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

.day-stat-text {
    font-size: 0.75rem;
    color: var(--text-muted, #8ba3c7);
    text-transform: uppercase;
}

/* Szekciók */
.day-detail-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.day-detail-section {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px;
}

.day-detail-section.full {
    grid-column: 1 / -1;
}

.day-detail-section h3 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted, #8ba3c7);
}

/* Bontás sorok */
.day-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-label {
    font-size: 0.9rem;
    color: var(--text-color, #fff);
}

.breakdown-value {
    font-weight: 600;
    color: var(--accent-color, #4dabf7);
}

/* Tananyagok */
.day-materials {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-material-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.material-name {
    font-size: 0.9rem;
    color: var(--text-color, #fff);
}

.material-stats {
    font-size: 0.85rem;
    color: var(--accent-color, #4dabf7);
    font-weight: 500;
}

/* Mastered badges */
.day-mastered-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mastered-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #000;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.unmastered-badge {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Szavak lista */
.day-words-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.day-word-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

.word-text {
    font-weight: 500;
    color: var(--text-color, #fff);
}

.word-meaning {
    font-size: 0.85rem;
    color: var(--text-muted, #8ba3c7);
}

.word-errors {
    font-size: 0.8rem;
    color: #ff6b6b;
    font-weight: 600;
    white-space: nowrap;
}

/* Órás chart */
.hour-chart {
    display: flex;
    gap: 2px;
    height: 60px;
    align-items: flex-end;
}

.hour-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.hour-fill {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px 2px 0 0;
    transition: background 0.2s;
}

.hour-bar.active .hour-fill {
    background: linear-gradient(to top, #4dabf7, #00d26a);
}

.hour-label {
    font-size: 0.6rem;
    color: var(--text-muted, #8ba3c7);
    margin-top: 4px;
}

/* Csak minden 3. óra címkéje látszik */
.hour-bar:not(:nth-child(3n+1)) .hour-label {
    visibility: hidden;
}

/* Loading */
.day-detail-body .loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted, #8ba3c7);
}

/* Responsive */
@media (max-width: 600px) {
    .day-detail-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .day-detail-sections {
        grid-template-columns: 1fr;
    }
    
    .day-stats-summary {
        flex-direction: column;
        text-align: center;
    }
    
    .day-word-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    
    .word-errors {
        justify-self: start;
    }
}
