/* =============================================
   사투리 퀴즈 스타일
   prefix: dq (dialect-quiz)
   ============================================= */

html { background: #000; }

.dq-body {
    overflow: hidden;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #f0f0f0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* Game Area */
.dq-game {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.15s;
}

/* Top Bar */
.dq-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.dq-back {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}
.dq-back:hover { color: #fff; }
.dq-info-badge {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2);
}

/* Timer */
.dq-timer-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.dq-timer-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 3px 3px 0;
    transition: width 0.1s linear, background 0.3s;
}

/* Content */
.dq-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    overflow-y: auto;
}

/* ===== States ===== */

/* Intro */
.state-intro { background: #0d1520; }
.state-intro .dq-content {
    justify-content: flex-start;
    padding-top: 40px;
}

.dq-intro-emoji { font-size: 72px; margin-bottom: 16px; }
.dq-intro-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.dq-intro-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}
.dq-intro-desc strong { color: #34d399; }

.dq-region-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.dq-region-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.dq-best {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.dq-challenge {
    background: rgba(52, 211, 153, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #34d399;
    text-align: center;
}
.dq-challenge strong { font-size: 22px; }

.dq-btn-start {
    display: inline-block;
    padding: 16px 48px;
    background: #34d399;
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
}
.dq-btn-start:active { transform: scale(0.95); }

/* Playing */
.state-playing { background: #0d1520; }
.state-playing .dq-content {
    justify-content: flex-start;
    padding-top: 16px;
}

.dq-status-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    margin-bottom: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}
.dq-status-bar strong { color: #fff; font-weight: 700; }

.dq-streak {
    font-size: 13px;
    color: #fb923c;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Region Badge */
.dq-region-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.dq-region-gyeongsang { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.dq-region-jeolla { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.dq-region-chungcheong { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.dq-region-gangwon { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.dq-region-jeju { background: rgba(251, 146, 60, 0.2); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.3); }

/* Dialect Display */
.dq-dialect-display {
    margin-bottom: 8px;
    text-align: center;
}

.dq-dialect-word {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
    animation: dqBounce 0.4s ease;
}

.dq-dialect-question {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

@keyframes dqBounce {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

/* Options */
.dq-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 16px;
}
.dq-option-btn {
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}
.dq-option-btn:hover {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.4);
}
.dq-option-btn:active { transform: scale(0.96); }
.dq-option-btn.dq-correct {
    background: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #34d399;
}
.dq-option-btn.dq-wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}
.dq-option-btn.dq-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Explanation */
.dq-explanation {
    width: 100%;
    max-width: 380px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    text-align: center;
    animation: dqFadeIn 0.3s ease;
}

@keyframes dqFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Feedback */
.dq-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 900;
    z-index: 100;
    animation: dqPop 0.5s ease forwards;
    pointer-events: none;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    text-align: center;
}
.dq-feedback-correct { color: #34D399; }
.dq-feedback-wrong { color: #EF4444; }
.dq-feedback-answer {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
    text-shadow: none;
}

@keyframes dqPop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Result */
.state-result { background: #0d1520; }
.state-result .dq-content {
    justify-content: flex-start;
    padding-top: 32px;
}

/* Toast */
.dq-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}
.dq-toast-show {
    opacity: 1;
    pointer-events: auto;
}
