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

html { background: #000; }

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

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

/* Content */
.at-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: #0f1729; }
.state-intro .at-content {
    justify-content: flex-start;
    padding-top: 40px;
}

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

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

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

/* Playing */
.state-playing { background: #0f1729; }
.state-playing .at-content {
    justify-content: flex-start;
    padding: 0;
    position: relative;
}

.at-play-hud {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 8px 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}
.at-play-hud strong {
    color: #fff;
    font-weight: 700;
}

.at-play-field {
    flex: 1;
    width: 100%;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.at-target {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    transition: none;
    z-index: 5;
}
.at-target-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff8a8a, #EF4444 40%, #B91C1C 80%);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5), inset 0 -2px 4px rgba(0,0,0,0.3);
    position: relative;
}
.at-target-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
}
.at-target-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 20%;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(255,255,255,0.8);
}

.at-hit-effect {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(52, 211, 153, 0.7);
    pointer-events: none;
    animation: atHitRipple 0.4s ease-out forwards;
}

@keyframes atHitRipple {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.at-miss-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.5);
    pointer-events: none;
    animation: atMissFade 0.6s ease-out forwards;
}

@keyframes atMissFade {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.3); opacity: 0; }
}

/* Countdown */
.state-countdown { background: #0f1729; }
.at-countdown {
    font-size: 96px;
    font-weight: 900;
    color: #EF4444;
    animation: atCountPop 0.5s ease;
}

@keyframes atCountPop {
    0% { transform: scale(2); opacity: 0; }
    60% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

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

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