/* =============================================
   반응속도 테스트 게임 스타일
   ============================================= */

.reaction-body {
    overflow: hidden;
    height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
}

html {
    background: #000;
}

/* Game Area - 모바일 프레임 */
.game-area {
    width: 100%;
    height: 100dvh;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s;
    position: relative;
}

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

/* Game Content */
.game-content {
    text-align: center;
    padding: 24px;
    max-width: 500px;
    width: 100%;
}

/* States */
.state-intro {
    background: #1a1a2e;
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 80px;
}
.state-waiting {
    background: #dc2626;
}
.state-go {
    background: #16a34a;
}
.state-tooearly {
    background: #ea580c;
}
.state-result {
    background: #1a1a2e;
}
.state-final {
    background: #1a1a2e;
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 60px;
}

/* Intro */
.intro-emoji {
    font-size: 72px;
    margin-bottom: 16px;
}
.intro-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.intro-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 24px;
}
.intro-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;
}
.intro-challenge strong {
    font-size: 24px;
    display: block;
    margin-top: 4px;
}
.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;
    pointer-events: auto;
}
.btn-start:active { transform: scale(0.95); }

/* Waiting & Go */
.state-text {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.state-sub {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
}
.state-emoji-big {
    font-size: 80px;
    margin-bottom: 8px;
    animation: pulse 0.3s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Round Result */
.result-time {
    font-size: 64px;
    font-weight: 800;
    color: #fff;
}
.result-time small {
    font-size: 24px;
    font-weight: 400;
    opacity: 0.7;
}
.result-msg {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
}

/* Final Results — 공통 game-result.css 사용 */

/* Toast */
.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;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 1.7s forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
