/* ===== 다이어트 동물 유형 테스트 CSS ===== */
/* 모든 값 하드코딩 - 독립 실행 가능 */

/* ===== FONTS ===== */
@font-face {
    font-family: 'Jalnan 2';
    src: url('/static/fonts/Jalnan2TTF.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'TmoneyRoundWind';
    src: url('/static/fonts/TmoneyRoundWind-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'TmoneyRoundWind';
    src: url('/static/fonts/TmoneyRoundWind-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'TmoneyRoundWind', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
    background: #FFF8F3;
    color: #4C3A32;
    line-height: 1.5;
}

/* ===== SCREEN SYSTEM ===== */
.screen {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* ===== 시작 화면 ===== */
.start-screen {
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
    text-align: center;
}

.start-content {
    max-width: 400px;
    width: 100%;
}

.start-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-logo::before {
    content: '';
    position: absolute;
    width: 130%;
    height: 130%;
    background: radial-gradient(
        circle,
        rgba(255, 215, 181, 0.9) 0%,
        rgba(255, 215, 181, 0.5) 40%,
        rgba(255, 215, 181, 0.15) 70%,
        rgba(255, 215, 181, 0) 85%
    );
    border-radius: 50%;
    filter: blur(18px);
    z-index: 0;
}

.start-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.start-title {
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 32px;
    color: #4C3A32;
    margin-bottom: 12px;
    line-height: 1.3;
}

.start-title .highlight-orange {
    color: #FF8A42;
}

.start-subtitle {
    font-size: 16px;
    color: #8C7A6B;
    margin-bottom: 20px;
    line-height: 1.5;
}

.participant-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4C3A32;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(76, 58, 50, 0.08);
}

.participant-count svg {
    color: #FF8A42;
}

.participant-count span {
    color: #FF8A42;
    font-weight: 800;
}

/* 동물 미리보기 */
.animal-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.animal-circle {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 2px 12px rgba(76, 58, 50, 0.1);
    animation: float 3s ease-in-out infinite;
}

.animal-circle:nth-child(2) { animation-delay: 0.3s; }
.animal-circle:nth-child(3) { animation-delay: 0.6s; }
.animal-circle:nth-child(4) { animation-delay: 0.9s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* 시작 버튼 */
.start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FF8A42 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(255, 138, 66, 0.35);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 66, 0.45);
}

.start-btn:active {
    transform: translateY(0);
}

.start-note {
    margin-top: 12px;
    font-size: 13px;
    color: #8C7A6B;
}

/* ===== 질문 화면 ===== */
.question-screen {
    padding: 20px;
    position: relative;
}

/* 진행 바 */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-top: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #FFD7B5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF8A42, #FF6B35);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 800;
    color: #4C3A32;
    white-space: nowrap;
}

/* 질문 영역 */
.question-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.question-number {
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 16px;
    color: #FF8A42;
    margin-bottom: 12px;
}

.question-text {
    font-family: 'TmoneyRoundWind', 'Malgun Gothic', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #4C3A32;
    margin-bottom: 32px;
    line-height: 1.4;
    word-break: keep-all;
}

/* 선택지 */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 18px 20px;
    background: white;
    border: 2px solid #FFD7B5;
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #FF8A42;
    background: #FFF8F3;
}

.option-btn.selected {
    border-color: #FF8A42;
    background: linear-gradient(135deg, #FFF0E6 0%, #FFE8D9 100%);
}

.option-label {
    width: 32px;
    height: 32px;
    background: #FFD7B5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 14px;
    color: #4C3A32;
    flex-shrink: 0;
    transition: all 0.2s;
}

.option-btn.selected .option-label {
    background: #FF8A42;
    color: white;
}

.option-text {
    font-size: 15px;
    font-weight: 600;
    color: #4C3A32;
    line-height: 1.4;
}

/* 이전 버튼 */
.back-btn {
    position: absolute;
    bottom: 30px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    border: 1.5px solid #FFD7B5;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #8C7A6B;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #FFF8F3;
    color: #4C3A32;
}

/* ===== 로딩 화면 ===== */
.loading-screen {
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
}

.loading-content {
    text-align: center;
}

.loading-character {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.loading-text h2 {
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 24px;
    color: #4C3A32;
    margin-bottom: 8px;
}

.loading-text p {
    font-size: 15px;
    color: #8C7A6B;
    line-height: 1.5;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #FF8A42;
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes loadingDot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ===== 결과 화면 ===== */
.result-screen {
    background: #FFF8F3;
}

.result-content {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 30px 20px 20px;
    width: 100%;
}

/* 결과 헤더 */
.result-header {
    text-align: center;
    margin-bottom: 28px;
}

.result-label {
    font-size: 14px;
    color: #8C7A6B;
    margin-bottom: 8px;
}

.result-type-name {
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 32px;
    color: #4C3A32;
    margin-bottom: 20px;
}


.result-emoji {
    font-size: 52px;
}

/* 성공률 뱃지 */
.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    font-size: 13px;
    color: #4C3A32;
    box-shadow: 0 2px 8px rgba(76, 58, 50, 0.08);
}

.success-badge svg {
    color: #FF8A42;
}

.success-badge strong {
    color: #FF8A42;
    font-weight: 800;
}

.success-badge.high strong { color: #34C759; }
.success-badge.mid strong { color: #FF8A42; }
.success-badge.low strong { color: #8C7A6B; }

/* 결과 섹션 */
.result-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.result-section {
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(76, 58, 50, 0.06);
}

.result-section.highlight {
    background: linear-gradient(135deg, #FFF0E6 0%, #FFE8D9 100%);
    border: 1.5px solid #FF8A42;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.section-header svg {
    color: #FF8A42;
    flex-shrink: 0;
}

.section-header h3 {
    font-family: 'TmoneyRoundWind', 'Malgun Gothic', sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: #4C3A32;
}

.section-content {
    font-size: 14px;
    color: #4C3A32;
    line-height: 1.6;
    white-space: pre-line;
}

/* 액션 버튼 */
.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    font-family: 'TmoneyRoundWind', 'Malgun Gothic', sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.share-btn {
    background: #FF8A42;
    color: white;
}

.share-btn:hover {
    background: #E67A35;
}

.retry-btn {
    background: white;
    color: #4C3A32;
    border: 1.5px solid #FFD7B5;
}

.retry-btn:hover {
    background: #FFF8F3;
}

/* CTA 배너 */
.cta-banner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: linear-gradient(135deg, #4C3A32 0%, #5D4A42 100%);
    border-radius: 16px;
    padding: 24px 16px;
    margin-bottom: 20px;
    text-align: left;
}

.cta-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-event {
    font-size: 12px;
    color: #FF8A42;
    margin-top: 8px;
    font-weight: 800;
}

.cta-text {
    text-align: left;
    margin-bottom: 16px;
}

.cta-main {
    font-family: 'Jalnan 2', 'Malgun Gothic', sans-serif;
    font-size: 18px;
    color: white;
    margin-bottom: 6px;
    text-align: left;
}

.cta-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-align: left;
}

.cta-sub strong {
    color: #FF8A42;
    font-weight: 800;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: #FF8A42;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-family: 'TmoneyRoundWind', 'Malgun Gothic', sans-serif;
    font-weight: 800;
    font-size: 14px;
    transition: all 0.2s;
}

.cta-btn:hover {
    background: #E67A35;
    transform: translateY(-1px);
}

.cta-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-right img {
    width: 112px;
    height: auto;
    object-fit: contain;
}

/* 푸터 */
.result-footer {
    text-align: center;
    padding: 16px 20px 24px;
    border-top: 1px solid #FFD7B5;
}

.result-footer p {
    font-size: 12px;
    color: #8C7A6B;
    margin-bottom: 6px;
}

.result-footer a {
    font-size: 12px;
    color: #8C7A6B;
    text-decoration: none;
}

.result-footer a:hover {
    color: #FF8A42;
}

/* ===== 반응형 ===== */
@media (max-width: 400px) {
    .start-title {
        font-size: 28px;
    }
    
    .question-text {
        font-size: 20px;
    }
    
    .result-type-name {
        font-size: 28px;
    }
    
    .animal-circle {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

/* 키보드 높이 대응 */
@media (max-height: 600px) {
    .question-content {
        justify-content: flex-start;
        padding-top: 20px;
    }
    
    .question-text {
        margin-bottom: 24px;
    }
}

/* 질문 텍스트 */
.question-text {
    white-space: pre-line;  /* 이거 추가 */
}

/* 옵션 텍스트 */
.option-text {
    white-space: pre-line;  /* 이거 추가 */
}

.result-character {
    width: 180px;      /* 120 → 150 */
    height: 180;     /* 120 → 150 */
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* cover → contain */
}

.result-emoji {
    font-size: 52px;
}

.animal-name {
    color: #FF8A42;
}