/* bamyanggang.css - Mobile-First Premium Standard */
:root {
    --bg-main: #f9f5f0;
    --accent: #5d2e2e;
    --text-main: #3e2723;
    --text-sub: #8d6e63;
    --white: #ffffff;
}

/* 기본 레이아웃 */
body.bamyanggang-theme {
    background-color: var(--bg-main);
    background-image: linear-gradient(135deg, #f9f5f0 0%, #e8d5c4 100%);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    font-family: "Pretendard Variable", sans-serif;
    color: var(--text-main);
}

/* 고정 헤더 */
.test-header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(93, 46, 46, 0.05);
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo {
    width: 32px;
    height: 32px;
    filter: grayscale(100%);
    opacity: 0.7;
}

.header-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-sub);
}

/* 전체 래퍼: 좌우 공백 문제 해결 (모바일 최적화) */
.test-wrapper {
    width: 100%;
    max-width: 480px;
    /* 표준 모바일 너비 제한 */
    margin: 0 auto;
    padding: 90px 20px 40px;
    /* 헤더 + 상단여백 + 하단여백 */
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.test-screen {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

/* 텍스트 영역 */
.test-intro-text {
    text-align: center;
    margin-bottom: 24px;
}

.main-title {
    font-family: 'Gowun Batang', serif;
    font-size: 1.8rem;
    color: var(--accent);
    margin: 0 0 6px;
    font-weight: 800;
}

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

/* 진행바: 밤알 기차 정밀 교정 */
.progress-box {
    margin-bottom: 30px;
}

.progress-info {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
}

.num-highlight {
    font-size: 1.5rem;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: rgba(93, 46, 46, 0.1);
    border-radius: 5px;
    position: relative;
}

.progress-active-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-runner-icon {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    transition: left 0.3s ease;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
}

/* 질문 카드: 꽉 차는 모바일 디자인 */
.question-container {
    background: var(--white);
    border-radius: 30px;
    padding: 50px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(93, 46, 46, 0.08);
    margin-bottom: 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.q-box {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.5;
    word-break: keep-all;
}

/* 선택지 버튼: 프리미엄 터치 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn-list {
    background: var(--white);
    border: 1px solid rgba(93, 46, 46, 0.08);
    border-radius: 20px;
    padding: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.option-btn-list:hover,
.option-btn-list:active {
    background: #fdfbf9;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(93, 46, 46, 0.1);
}

.option-btn-list .num {
    color: var(--accent);
    font-family: 'Gowun Batang', serif;
    font-size: 1.2rem;
    font-weight: 800;
    opacity: 0.6;
}

/* 하단 버튼 */
.nav-control-btns {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(93, 46, 46, 0.15);
    padding: 12px 28px;
    border-radius: 999px;
    color: var(--text-sub);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

/* 결과 화면: 귀여움 극대화 */
.result-container {
    background: var(--white);
    border-radius: 32px;
    border: 2px dashed rgba(93, 46, 46, 0.1);
    padding: 40px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(93, 46, 46, 0.12);
    margin-bottom: 24px;
}

.result-tag-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.result-main-title {
    font-family: 'Gowun Batang', serif;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.result-visual-area {
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle, #fff0e7 0%, #ffffff 80%);
}

.main-emoji-circle {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.emoji-text {
    font-size: 4.5rem;
}

.physics-stage {
    position: absolute;
    inset: -20px;
    z-index: 2;
    pointer-events: none;
}

.result-summary-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
    word-break: keep-all;
}

/* 결과 분석 막대 */
.result-stat-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-label {
    width: 80px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-sub);
}

.stat-track {
    flex: 1;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    width: 0;
    transition: width 1s ease-out;
}

.stat-fill.sweet {
    background: #ffab91;
}

.stat-fill.bitter {
    background: var(--accent);
}

/* 결과 하단 버튼 */
.result-action-btns {
    display: flex;
    gap: 12px;
}

.result-action-btns button {
    flex: 1;
    height: 56px;
    border-radius: 28px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.action-btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(93, 46, 46, 0.2);
}

.action-btn-secondary {
    background: #eee;
    color: var(--text-main);
}

/* 모바일 엣지 처리 */
@media (max-width: 480px) {
    .test-wrapper {
        padding: 80px 15px 30px;
    }

    .question-container {
        border-radius: 24px;
        padding: 40px 20px;
    }

    .main-title {
        font-size: 1.6rem;
    }
}