/* =============================================
   가사 퀴즈 게임 스타일
   ============================================= */

html { background: #000; }

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

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

/* Content */
.sq-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 .sq-content {
    justify-content: flex-start;
    padding-top: 40px;
}

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

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

.sq-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;
}
.sq-challenge strong { font-size: 22px; }

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

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

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

/* Lyrics display */
.sq-lyrics-area {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sq-lyrics-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.sq-lyrics-box {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 8px;
    width: 100%;
}

.sq-lyrics-text {
    font-size: 19px;
    font-weight: 600;
    color: #e0d4ff;
    line-height: 1.7;
    white-space: pre-line;
    word-break: keep-all;
}

.sq-lyrics-note {
    display: inline-block;
    font-size: 32px;
    margin-bottom: 8px;
}

/* Options grid */
.sq-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 400px;
    flex-shrink: 0;
    margin-bottom: 16px;
}

.sq-option-btn {
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    word-break: keep-all;
    line-height: 1.3;
}
.sq-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}
.sq-option-btn:active {
    transform: scale(0.97);
}

.sq-option-btn.sq-correct {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10B981;
    color: #6ee7b7;
    animation: sqPulse 0.3s ease;
}
.sq-option-btn.sq-wrong {
    background: rgba(239, 68, 68, 0.25);
    border-color: #EF4444;
    color: #fca5a5;
    animation: sqShake 0.3s ease;
}
.sq-option-btn.sq-disabled {
    pointer-events: none;
    opacity: 0.5;
}
.sq-option-btn.sq-reveal {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
}

@keyframes sqPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes sqShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Artist info after answer */
.sq-artist-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Feedback overlay */
.sq-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 900;
    z-index: 100;
    animation: sqFbPop 0.5s ease forwards;
    pointer-events: none;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.sq-feedback-answer {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
    text-align: center;
    text-shadow: none;
}
@keyframes sqFbPop {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.sq-score-popup {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 800;
    color: #fbbf24;
    z-index: 101;
    animation: sqScoreUp 0.8s ease forwards;
    pointer-events: none;
}
@keyframes sqScoreUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -60%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -80%); opacity: 0; }
}

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

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