/* ============================================
   Dashboard & New Components CSS
   ============================================ */

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

/* Heatmap */
.heatmap-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 3px;
    transition: transform 0.2s;
}

.heatmap-cell:hover {
    transform: scale(1.3);
}

/* Leaderboard */
.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.3s;
}

.leaderboard-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.leaderboard-row.top-three {
    background: rgba(46, 197, 244, 0.05);
}

.leaderboard-rank {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 40px;
}

.leaderboard-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.leaderboard-name {
    font-weight: 600;
}

.leaderboard-score {
    font-weight: 700;
    color: #2EC5F4;
}

/* Progress Card */
.progress-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s;
}

.progress-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(46, 197, 244, 0.2);
}

.progress-card-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(46, 197, 244, 0.1);
}

.progress-card-info {
    flex: 1;
}

.progress-card-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

/* Language Toggle Button */
#langToggle {
    font-weight: 700;
    font-size: 0.8rem;
    min-width: 40px;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 1px;
}

#langToggle:hover {
    background: rgba(46, 197, 244, 0.15);
    border-color: var(--primary, #2EC5F4);
}

/* Training Mode Selector */
.mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mode-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--text-secondary, #94A3B8);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-tab:hover {
    background: rgba(46, 197, 244, 0.1);
    border-color: rgba(46, 197, 244, 0.3);
}

.mode-tab.active {
    background: rgba(46, 197, 244, 0.15);
    border-color: #2EC5F4;
    color: #2EC5F4;
    box-shadow: 0 0 15px rgba(46, 197, 244, 0.2);
}

/* Training Stats Bar */
.training-stats {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 1rem;
}

.training-stat {
    text-align: center;
}

.training-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2EC5F4;
}

.training-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #94A3B8);
    margin-top: 0.25rem;
}

/* Session Progress Bar */
.session-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.session-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2EC5F4, #D64EDB);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Move History */
.move-history {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
}

.move-row {
    display: flex;
    gap: 1rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}

.move-number {
    color: var(--text-secondary, #94A3B8);
    min-width: 30px;
}

.move-white,
.move-black {
    flex: 1;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.move-white:hover,
.move-black:hover {
    background: rgba(46, 197, 244, 0.1);
}

.move-correct {
    color: #22C55E;
}

.move-wrong {
    color: #EF4444;
}

/* Feedback Message */
.feedback-box {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    margin: 1rem 0;
    animation: fadeInUp 0.3s ease-out;
}

.feedback-correct {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22C55E;
}

.feedback-wrong {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
}

.feedback-info {
    background: rgba(46, 197, 244, 0.1);
    border: 1px solid rgba(46, 197, 244, 0.3);
    color: #2EC5F4;
}

/* Responsive */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
    }

    .training-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .training-stat {
        min-width: 40%;
    }

    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(46, 197, 244, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(46, 197, 244, 0.4);
    }
}