/* Mode Banner */
.mode-banner {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fbbf24;
}

.mode-banner.visible {
    display: flex;
}

.mode-count {
    color: #a1a1aa;
    font-weight: 400;
}

.mode-exit {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    line-height: 1;
}

.mode-exit:hover {
    opacity: 1;
}

/* Header Stats */
.stats {
    display: flex;
    justify-content: space-around;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: #18181b;
    border-radius: 12px;
    border: 1px solid #27272a;
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #fafafa;
    font-variant-numeric: tabular-nums;
}

.stat-value.correct-val {
    color: #22c55e;
}

.stat-value.incorrect {
    color: #ef4444;
}

.stat-label {
    font-size: 11px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    font-weight: 500;
}

/* Flashcard */
.flashcard {
    background: #18181b;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin-bottom: 16px;
    border: 1px solid #27272a;
}

.pinyin-display {
    font-size: 15px;
    color: #71717a;
    margin-bottom: 24px;
    min-height: 32px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.pinyin-display.revealed {
    color: #fafafa;
    font-size: 32px;
    font-weight: 600;
}

.pinyin-display.empty-message {
    font-size: 18px;
    color: #52525b;
    line-height: 1.4;
}

/* Speaker Button */
.speaker-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    background: #27272a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: background 0.15s ease;
}

.speaker-btn:hover {
    background: #3f3f46;
}

.speaker-btn:active {
    background: #27272a;
}

.speaker-btn svg {
    width: 32px;
    height: 32px;
    fill: #a1a1aa;
}

.hint-text {
    font-size: 13px;
    color: #52525b;
}

/* Next Button */
.next-btn {
    width: 100%;
    padding: 16px;
    margin-top: 12px;
    border-radius: 12px;
    border: none;
    background: #fafafa;
    color: #09090b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    display: none;
}

.next-btn.visible {
    display: block;
}

.next-btn:hover {
    opacity: 0.9;
}

/* Struggling count */
.struggling-indicator {
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    background: transparent;
    border-radius: 8px;
    color: #71717a;
    font-size: 13px;
    display: none;
}

.struggling-indicator.visible {
    display: block;
}

/* Streak Toast */
.streak-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 16px 24px;
    text-align: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
}

.streak-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.streak-toast .streak-count {
    font-size: 32px;
    font-weight: 700;
    color: #fafafa;
    line-height: 1;
}

.streak-toast .streak-fire {
    font-size: 24px;
    margin-left: 4px;
}

.streak-toast .streak-message {
    font-size: 14px;
    color: #a1a1aa;
    margin-top: 6px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #27272a;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #71717a;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fafafa;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Settings Modal */
.danger-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.danger-hint {
    font-size: 12px;
    color: #52525b;
    text-align: center;
    margin-top: 10px;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px 0 4px;
    margin-top: 16px;
    color: #52525b;
    font-size: 13px;
}

.site-footer a {
    color: #a1a1aa;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: #fafafa;
}

/* Mobile */
@media (max-width: 768px) {
    .flashcard {
        padding: 24px 20px;
    }

    .speaker-btn {
        width: 80px;
        height: 80px;
    }

    .speaker-btn svg {
        width: 28px;
        height: 28px;
    }
}
