/* =============================================
   연예인 퀴즈 스타일
   prefix: cq (celeb-quiz)
   ============================================= */

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-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 */
.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: #0f0a1e; }
.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: #f59e0b; }

.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(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 16px;
    color: #f59e0b;
    text-align: center;
}
.cq-challenge strong { font-size: 22px; }

.cq-btn-start {
    display: inline-block;
    padding: 16px 48px;
    background: #f59e0b;
    color: #000;
    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: #0f0a1e; }
.state-playing .cq-content {
    justify-content: flex-start;
    padding-top: 16px;
}

.cq-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);
}
.cq-status-bar strong { color: #fff; font-weight: 700; }

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

/* Hint Cards */
.cq-hint-section {
    width: 100%;
    max-width: 380px;
    margin-bottom: 20px;
}

.cq-hint-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.cq-hint-card {
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 10px;
    font-size: 15px;
    color: #fbbf24;
    font-weight: 600;
    animation: cqHintIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cq-hint-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #f59e0b;
    flex-shrink: 0;
}

.cq-hint-locked {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes cqHintIn {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.cq-hint-btn-wrap {
    text-align: center;
}

.cq-btn-hint {
    padding: 8px 20px;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    color: #f59e0b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.cq-btn-hint:hover {
    background: rgba(245, 158, 11, 0.2);
}
.cq-btn-hint:disabled {
    opacity: 0.3;
    cursor: default;
}

/* Score Indicator */
.cq-score-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 16px;
    text-align: center;
}

/* Options */
.cq-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 380px;
}
.cq-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;
}
.cq-option-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
}
.cq-option-btn:active { transform: scale(0.96); }
.cq-option-btn.cq-correct {
    background: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #34d399;
}
.cq-option-btn.cq-wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}
.cq-option-btn.cq-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* 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);
    text-align: center;
}
.cq-feedback-correct { color: #34D399; }
.cq-feedback-wrong { color: #EF4444; }
.cq-feedback-answer {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-top: 6px;
    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 */
.state-result { background: #0f0a1e; }
.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;
}
