/* =============================================
   상식 OX 퀴즈 게임 스타일
   ============================================= */

html { background: #000; }

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

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

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

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

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

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

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

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

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

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

/* Question */
.ox-question-area {
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-bottom: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ox-question-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.ox-question-text {
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    line-height: 1.5;
    padding: 0 8px;
    word-break: keep-all;
}

/* OX Buttons */
.ox-buttons-area {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 24px;
}

.ox-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid;
    font-size: 56px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.ox-btn-o {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34D399;
}
.ox-btn-o:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34D399;
}
.ox-btn-o:active {
    transform: scale(0.93);
}

.ox-btn-x {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.5);
    color: #EF4444;
}
.ox-btn-x:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #EF4444;
}
.ox-btn-x:active {
    transform: scale(0.93);
}

.ox-btn.ox-selected-correct {
    background: rgba(16, 185, 129, 0.35);
    border-color: #10B981;
    animation: oxPulse 0.3s ease;
}
.ox-btn.ox-selected-wrong {
    background: rgba(239, 68, 68, 0.35);
    border-color: #EF4444;
    animation: oxShake 0.3s ease;
}
.ox-btn.ox-disabled {
    pointer-events: none;
    opacity: 0.4;
}
.ox-btn.ox-reveal-correct {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10B981;
    opacity: 1 !important;
}

@keyframes oxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

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

/* Explanation */
.ox-explanation {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 380px;
    width: 90%;
    background: rgba(30, 30, 60, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-align: center;
    z-index: 50;
    animation: oxExplFadeIn 0.3s ease;
    pointer-events: none;
    word-break: keep-all;
}
@keyframes oxExplFadeIn {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Feedback overlay */
.ox-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    z-index: 100;
    animation: oxFbPop 0.5s ease forwards;
    pointer-events: none;
}
@keyframes oxFbPop {
    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; }
}

.ox-score-popup {
    position: fixed;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 800;
    color: #fbbf24;
    z-index: 101;
    animation: oxScoreUp 0.8s ease forwards;
    pointer-events: none;
}
@keyframes oxScoreUp {
    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 .ox-content {
    justify-content: flex-start;
    padding-top: 32px;
}

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