/* =============================================
   절대음감 테스트 게임 스타일
   ============================================= */

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

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

/* ===== States ===== */

/* Intro */
.state-intro { background: linear-gradient(180deg, #1a0a2e 0%, #0d1b2a 100%); }
.state-intro .pt-content {
    justify-content: flex-start;
    padding-top: 40px;
}

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

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

.pt-warning {
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.5;
}

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

/* Playing */
.state-playing { background: linear-gradient(180deg, #1a0a2e 0%, #0d1b2a 100%); }
.state-playing .pt-content { justify-content: center; }

.pt-progress {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.pt-level-label {
    font-size: 12px;
    color: rgba(167, 139, 250, 0.8);
    background: rgba(167, 139, 250, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.pt-ref-section {
    margin-bottom: 28px;
    text-align: center;
}
.pt-ref-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}
.pt-btn-ref {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: rgba(167, 139, 250, 0.2);
    border: 2px solid #a78bfa;
    border-radius: 14px;
    color: #a78bfa;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background 0.2s;
}
.pt-btn-ref:active { transform: scale(0.95); background: rgba(167, 139, 250, 0.35); }
.pt-btn-ref.pt-playing {
    animation: ptPulse 0.8s ease-in-out infinite;
}

@keyframes ptPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(167, 139, 250, 0); }
}

.pt-choices-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.pt-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
    max-width: 360px;
}

.pt-btn-choice {
    flex: 1 1 calc(50% - 6px);
    min-width: 120px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.2s, background 0.2s;
    text-align: center;
}
.pt-btn-choice:active { transform: scale(0.95); }
.pt-btn-choice.pt-choice-playing {
    border-color: #a78bfa;
    background: rgba(167, 139, 250, 0.15);
}

/* Feedback */
.pt-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    z-index: 100;
    animation: ptFeedback 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes ptFeedback {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

.pt-btn-choice.pt-correct {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.2) !important;
}
.pt-btn-choice.pt-wrong {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.2) !important;
}

/* Result */
.state-result { background: linear-gradient(180deg, #1a0a2e 0%, #0d1b2a 100%); }
.state-result .pt-content {
    justify-content: flex-start;
    padding-top: 32px;
}

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