/* =============================================
   초성퀴즈 게임 스타일
   ============================================= */

html { background: #000; }

.cq-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 */
.cq-game {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.15s;
}

/* Top Bar */
.cq-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.cq-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);
}
.cq-back:hover { color: #fff; }
.cq-round-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 */
.cq-timer-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
.cq-timer-bar {
    height: 100%;
    width: 100%;
    border-radius: 0 3px 3px 0;
    transition: width 0.1s linear, background 0.3s;
}

/* Content */
.cq-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: #0f0f23; }
.state-intro .cq-content {
    justify-content: flex-start;
    padding-top: 40px;
}

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

.cq-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);
}

.cq-challenge {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #ffd700;
    text-align: center;
}
.cq-challenge strong { font-size: 22px; }

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

/* Playing */
.state-playing { background: #0f0f23; }
.state-playing .cq-content {
    justify-content: flex-start;
    padding-top: 24px;
}

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

.cq-category-badge {
    display: inline-block;
    background: rgba(108, 92, 231, 0.2);
    color: #a78bfa;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cq-chosung-display {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.cq-chosung-char {
    width: 56px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    background: rgba(108, 92, 231, 0.25);
    border: 2px solid rgba(108, 92, 231, 0.5);
    border-radius: 12px;
}
.cq-chosung-space {
    width: 20px;
}

.cq-hint-area {
    min-height: 32px;
    margin-bottom: 16px;
    text-align: center;
}
.cq-hint-text {
    font-size: 14px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    padding: 6px 16px;
    border-radius: 8px;
    display: inline-block;
}

.cq-input-area {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 12px;
}
.cq-answer-input {
    flex: 1;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    text-align: center;
    letter-spacing: 2px;
}
.cq-answer-input::placeholder { color: rgba(255, 255, 255, 0.25); font-weight: 400; letter-spacing: 0; }
.cq-answer-input:focus { border-color: rgba(108, 92, 231, 0.6); }

.cq-btn-submit-answer {
    padding: 14px 24px;
    background: #6C5CE7;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
    flex-shrink: 0;
}
.cq-btn-submit-answer:active { transform: scale(0.95); }

.cq-action-btns {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.cq-btn-hint, .cq-btn-skip {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.cq-btn-hint:hover, .cq-btn-skip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.cq-btn-hint:disabled {
    opacity: 0.3;
    cursor: default;
}

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

@keyframes cqPop {
    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 — 공통 game-result.css 사용 */
.state-result { background: #0f0f23; }
.state-result .cq-content {
    justify-content: flex-start;
    padding-top: 32px;
}

/* Toast */
.cq-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;
}
.cq-toast-show {
    opacity: 1;
    pointer-events: auto;
}

/* Streak */
.cq-streak {
    font-size: 13px;
    color: #fb923c;
    font-weight: 700;
    margin-bottom: 8px;
}
