/* ============================================================
 * 🏃‍♂️ 나의 끈기 지수 전용 스타일 (v4.3.0 Standard)
 * ============================================================ */

:root {
    --bg-color: #FFF9C4;
    --card-bg: #FFFFFF;
    --point-red: #F44336;
    --text-main: #3E2723;
    --text-sub: #5D4037;
    --gray-light: #F5F5F5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Physics World Overlay */
#physics-world {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    /* Matter-js Canvas will handle its own clicks if needed, but here we want to pass-through to buttons */
}

/* Header LOCK */
.test-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    /* 테토력 지수와 일치 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* 왼쪽 정렬 */
    padding: 0 16px;
    /* 왼쪽 여백 추가 */
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-logo {
    height: 32px;
    /* 로고 하드락 */
    width: auto;
}

/* Container LOCK */
.test-wrapper {
    max-width: 480px;
    /* 레이아웃 락 */
    margin: 0 auto;
    padding: 74px 20px 40px;
    /* 상단 여백 규격 */
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.test-intro-text {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.sub-title {
    font-size: 0.95rem;
    color: var(--text-sub);
    opacity: 0.8;
}

/* Progress System */
.progress-container {
    margin-bottom: 30px;
}

.progress-track {
    height: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    position: relative;
    margin-bottom: 12px;
    overflow: visible;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--point-red);
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Mascot Runner Sync */
.ps-runner {
    position: absolute;
    top: -24px;
    left: 0;
    font-size: 1.8rem;
    transform: translateX(-50%);
    transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.progress-counter {
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--point-red);
}

/* Premium Wrap & Q-Box */
.question-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.q-box {
    background: var(--card-bg);
    padding: 30px 24px;
    border-radius: 24px;
    min-height: 160px;
    /* 질문 박스 락 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.q-text {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    word-break: keep-all;
    line-height: 1.4;
}

/* Options LOCK */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* 버튼 간격 규격 */
}

.option-btn {
    min-height: 68px;
    /* 답변 버튼 락 */
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.option-btn:active {
    transform: scale(0.98);
}

.option-btn.selected {
    border-color: var(--point-red);
    background: #FFEBEE;
}

.btn-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.option-btn span:last-child {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

/* Nav Control */
.nav-control-btns {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.btn-ghost {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    padding: 10px 48px;
    /* 이전 버튼 규격 */
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
}

/* Loading */
.screen.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

.loading-box {
    text-align: center;
    padding-top: 100px;
}

.loading-mascot {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-20px);
    }
}

/* Result Card */
.result-container {
    padding-bottom: 40px;
}

.result-card {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.result-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--point-red);
    background: #FFEBEE;
    padding: 4px 16px;
    border-radius: 100px;
    display: inline-block;
    margin-bottom: 8px;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.result-img-box {
    width: 140px;
    height: 140px;
    background: var(--gray-light);
    border-radius: 40px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-emoji {
    font-size: 5rem;
}

.result-text {
    font-size: 1.05rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 30px;
    word-break: keep-all;
}

.bone-hitting-box {
    background: #FFFDE7;
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 32px;
    border: 1px dashed #FBC02D;
    text-align: left;
}

.bone-hitting-box h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #F57F17;
}

.bone-hitting-box p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5D4037;
    font-weight: 600;
}

/* Action Buttons - Sync with Tetor Power (Row style) */
.action-buttons-wrap {
    display: flex;
    gap: 10px;
}

.action-btn-primary,
.action-btn-secondary {
    flex: 1;
    /* 가로 가득 채우기 */
    border: none;
    padding: 16px 0;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 850;
    /* 폰트 무게 강화 */
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn-primary {
    background: var(--point-red) !important;
    color: white;
}

.action-btn-primary:active {
    transform: translateY(2px);
}

.action-btn-secondary {
    background: var(--gray-light) !important;
    color: var(--text-sub);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 🏃‍♂️ Endurance Item Layout */
.persistence-canvas-item {
    pointer-events: auto !important;
    cursor: pointer;
}