/* =============================================
   스트룹 테스트 게임 스타일
   ============================================= */

html { background: #000; }

* { box-sizing: border-box; margin: 0; padding: 0; }

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

/* Top Bar */
.st-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    flex-shrink: 0;
}
.st-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);
}
.st-back:hover { color: #fff; }
.st-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);
}

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

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

.st-intro-example {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    max-width: 320px;
}
.st-intro-example-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.st-intro-example-word {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 10px;
    line-height: 1.2;
}
.st-intro-example-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}
.st-intro-example-hint strong {
    color: #60A5FA;
}

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

.st-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;
}
.st-btn-start:active { transform: scale(0.95); }

/* Playing */
.state-playing { background: #0f0f23; }
.state-playing .st-content {
    justify-content: center;
    padding-top: 0;
}

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

/* Progress bar */
.st-progress-wrap {
    width: 100%;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.st-progress-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    min-width: 52px;
}
.st-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.st-progress-fill {
    height: 100%;
    background: #8B5CF6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

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

/* Question area */
.st-question-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 24px 0 32px;
}
.st-question-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.st-question-word {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    transition: opacity 0.15s;
}

/* Choices */
.st-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 320px;
}
.st-choice-btn {
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.08s, background 0.15s, border-color 0.15s;
    text-align: center;
}
.st-choice-btn:active {
    transform: scale(0.95);
}
.st-choice-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Feedback */
.st-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 72px;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    animation: stFeedback 0.5s ease forwards;
}
@keyframes stFeedback {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.st-choice-correct {
    background: rgba(34, 197, 94, 0.3) !important;
    border-color: #22C55E !important;
}
.st-choice-wrong {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #EF4444 !important;
}

/* Result — 공통 game-result.css 사용 */
.state-result { background: #0f0f23; }
.state-result .st-content {
    justify-content: flex-start;
    padding-top: 32px;
}

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