/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.8;
    color: #000000;
    background: #ffffff;
    min-height: 100vh;
}

/* 모바일에서 폰트 강제 적용 및 font-weight 매핑 */
@media (max-width: 767px) {
    * {
        font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }
    
    /* font-weight 매핑 개선 */
    [style*="font-weight: 600"], .font-semibold {
        font-weight: 600 !important;
        font-variation-settings: 'wght' 600;
    }
    
    [style*="font-weight: 800"], .font-extrabold {
        font-weight: 800 !important;
        font-variation-settings: 'wght' 800;
    }
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 모바일에서 좌우 패딩 20 적용 */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 640px;
        padding: 0 24px;
    }
}

/* 질문 페이지와 결과 페이지는 상단부터 시작 */

#result-screen {
    scroll-margin-top: 0;
    scroll-behavior: smooth;
}

#questions-screen .container,
#result-screen .container {
    justify-content: flex-start;
}

/* 화면 전환 */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 메인 화면 */
.main-content {
    text-align: center;
    padding: 100px 0 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 100vh;
    justify-content: space-between;
}

/* 모바일에서 메인 화면 간격 조정 */
@media (max-width: 767px) {
    .main-content {
        padding: 60px 0 40px 0;
        gap: 10px;
        justify-content: center;
    }
}


.top-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.main-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0;
    letter-spacing: -0.01em;
}

/* 모바일에서 메인 타이틀 강제 줄바꿈 */
@media (max-width: 767px) {
    .main-title {
        white-space: pre-line;
    }
}

.main-subtitle {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* 히어로 영역 */
.hero-section {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.orbit-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-image {
    width: 120px;
    height: 120px;
    z-index: 10;
}

.orbit-image {
    position: absolute;
    width: 120px;
    height: 120px;
    animation: orbit 20s linear infinite;
}

.orbit-1 { 
    transform: rotate(0deg) translateX(120px) rotate(0deg);
    animation-delay: 0s;
}
.orbit-2 { 
    transform: rotate(51.4deg) translateX(120px) rotate(-51.4deg);
    animation-delay: -2.86s;
}
.orbit-3 { 
    transform: rotate(102.9deg) translateX(120px) rotate(-102.9deg);
    animation-delay: -5.71s;
}
.orbit-4 { 
    transform: rotate(154.3deg) translateX(120px) rotate(-154.3deg);
    animation-delay: -8.57s;
}
.orbit-5 { 
    transform: rotate(205.7deg) translateX(120px) rotate(-205.7deg);
    animation-delay: -11.43s;
}
.orbit-6 { 
    transform: rotate(257.1deg) translateX(120px) rotate(-257.1deg);
    animation-delay: -14.29s;
}
.orbit-7 { 
    transform: rotate(308.6deg) translateX(120px) rotate(-308.6deg);
    animation-delay: -17.14s;
}

@keyframes orbit {
    from { 
        transform: rotate(0deg) translateX(120px) rotate(0deg); 
    }
    to { 
        transform: rotate(360deg) translateX(120px) rotate(-360deg); 
    }
}

/* 버튼 스타일 */
.btn-primary, .btn-secondary {
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: #19C7AE;
    color: white;
    padding: 16px 32px;
    font-size: 16px;
}


.btn-secondary {
    background: transparent;
    color: #19C7AE;
    border: 2px solid #19C7AE;
    padding: 14px 30px;
    font-size: 16px;
}


.btn-large {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    padding: 20px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.8;
    color: #ffffff;
    background: #000000;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    box-sizing: border-box;
}

/* 진행 바 */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #19C7AE;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* 질문 페이지 헤더 */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;
    margin-bottom: 60px;
}

/* 모바일에서 헤더 수정 - 상단 네비게이션 복원 및 강력한 고정 */
@media (max-width: 767px) {
    .question-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        justify-content: space-between;
        margin-bottom: 0;
        padding: 20px;
        background: #ffffff !important;
        z-index: 9999 !important;
        box-sizing: border-box;
        transform: translateZ(0); /* 하드웨어 가속 활성화 */
        will-change: transform; /* 성능 최적화 */
        -webkit-transform: translateZ(0); /* Safari 호환성 */
        backface-visibility: hidden; /* 깜빡임 방지 */
    }
    
    .btn-back, .btn-home {
        display: block;
        position: relative;
        z-index: 10000;
    }
    
    /* 고정 헤더로 인한 콘텐츠 상단 여백 추가 */
    #questions-screen .question-content,
    #result-screen .result-content {
        padding-top: 80px;
        min-height: 100vh;
        box-sizing: border-box;
    }
    
    /* 스크롤 시에도 헤더가 보이도록 강제 */
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* 모바일 하단 고정 버튼 - 제거됨 */
.mobile-bottom-buttons {
    display: none;
}

.btn-back, .btn-home {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    cursor: pointer;
    font-family: inherit;
}

.question-header-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0;
}

/* 질문 콘텐츠 */
.question-content {
    text-align: center;
    padding: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - 140px);
    max-width: 100%;
}

/* 모바일에서 질문 콘텐츠 간격 조정 */
@media (max-width: 767px) {
    .question-content {
        padding: 10px 0 20px 0;
        min-height: calc(100vh - 100px);
        justify-content: center;
    }
    
    .question-title {
        margin: 0 0 10px 0;
        font-size: 28px;
    }
    
    .question-number {
        margin: 0 0 5px 0;
    }
}

.question-number {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    margin: 0 0 2px 0;
}

.question-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0 0 40px 0;
}

/* 질문 옵션 */
.question-options {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

@media (min-width: 768px) {
    .question-options {
        gap: 16px;
        margin: 0 auto;
    }
    
    .option-text {
        /* 데스크탑에서 텍스트 영역 높이 더 크게 */
        min-height: 120px;
        font-size: 16px;
    }
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.option-image {
    width: 100%;
    height: auto;
    aspect-ratio: 169/240;
    object-fit: cover;
    margin-top: 12px;
    transition: all 0.1s ease;
    
    /* 이미지 기본 동작 완전 비활성화 (카카오톡 호환성) */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* 모바일에서 텍스트-이미지 간격 조정 */
@media (max-width: 767px) {
    .option-image {
        margin-top: 5px;
        
        /* 모바일에서 이미지 기본 동작 추가 비활성화 */
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -khtml-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
        -webkit-touch-callout: none !important;
        -webkit-user-drag: none !important;
        -khtml-user-drag: none !important;
        -moz-user-drag: none !important;
        -o-user-drag: none !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
}

.option-card:hover .option-image {
    transform: scale(1.05);
}

.option-card:active .option-image {
    transform: scale(1.05);
}

/* 모바일에서 호버 효과 제거 */
@media (max-width: 767px) {
    .option-card:hover .option-image {
        transform: none;
    }
    
    .option-card:active .option-image {
        transform: none;
    }
}

.option-bullet {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0 0 8px 0;
    text-align: center;
}

/* 모바일에서 옵션 요소 간격 조정 */
@media (max-width: 767px) {
    .option-bullet {
        margin: 0 0 4px 0;
    }
}

.option-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    margin: 0 0 12px 0;
    width: 100%;
    text-align: center;
    padding: 0 10px;
    /* 텍스트 영역 높이 고정 - 모바일 기준 최대 4줄 */
    min-height: 100px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}


/* 로딩 화면 */
.loading-content {
    text-align: center;
    padding: 60px 0;
}

/* 모바일에서 로딩 화면 수직 가운데 정렬 */
@media (max-width: 767px) {
    #loading-screen .container {
        justify-content: center;
    }
    
    .loading-content {
        padding: 0;
    }
}

.loading-animation {
    margin-bottom: 40px;
}

.loading-image {
    width: 120px;
    height: 120px;
    animation: imageScale 0.4s ease-in-out;
}

@keyframes imageScale {
    0% { 
        transform: scale(0.8);
        opacity: 0;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes imageScaleOut {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    100% { 
        transform: scale(0.8);
        opacity: 0;
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.loading-content h2 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin-bottom: 16px;
}

.loading-content h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* 결과 화면 */
.result-content {
    text-align: center;
    padding: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100vh - 140px);
    max-width: 100%;
}

.result-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0 0 40px 0;
    letter-spacing: -0.01em;
}

/* 모바일에서 결과 타이틀 행간 140% */
@media (max-width: 767px) {
    .result-title {
        line-height: 1.4;
    }
}

.result-character {
    margin-bottom: 24px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.character-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    animation: floating 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.5s ease;
    user-select: none;
}

.character-image:hover {
    transform: scale(1.05);
}

.character-image:active {
    transform: scale(0.95);
}


/* 모바일 결과 페이지 버튼 박스 - 제거됨 */
.mobile-result-button-box {
    display: none;
}

/* 모바일 액션 버튼 */
.mobile-action-buttons {
    display: none;
}

@media (max-width: 767px) {
    .mobile-action-buttons {
        display: flex;
        width: 100%;
        gap: 6px;
        margin-bottom: 24px;
    }
    
    .mobile-action-btn {
        flex: 1;
        padding: 16px 20px;
        background: #000000;
        color: #ffffff;
        border: none;
        border-radius: 50px;
        font-size: 16px;
        font-weight: 600;
        font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .mobile-action-btn:active {
        transform: scale(0.95);
        background: #333333;
    }
}

/* 데스크탑 액션 버튼 */
@media (min-width: 768px) {
    .mobile-action-buttons {
        display: flex;
        width: 100%;
        max-width: 500px;
        gap: 12px;
        margin: 0 auto 24px auto;
    }
    
    .mobile-action-btn {
        flex: 1;
        padding: 14px 24px;
        background: #000000;
        color: #ffffff;
        border: none;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 600;
        font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .mobile-action-btn:hover {
        background: #333333;
        transform: translateY(-2px);
    }
    
    .mobile-action-btn:active {
        transform: translateY(0);
        background: #555555;
    }
}

.result-info-box {
    background: #FBFBFB;
    padding: 30px 20px;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
    text-align: left;
}

@media (min-width: 768px) {
    .result-info-box {
        max-width: 500px;
    }
}

.result-info-box:last-of-type {
    margin-bottom: 32px;
}

.result-score {
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-label {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0;
}

.score-value {
    font-size: 24px;
    font-weight: 800;
    color: #19C7AE;
    display: flex;
    align-items: center;
}

.score-digit {
    height: 40px;
    width: auto;
    margin-right: -2px;
}

.score-digit:last-child {
    margin-right: 0;
}

.result-description {
    margin-bottom: 0;
}

.result-description h4,
.result-broccoli h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.6);
    margin: 0 0 12px 0;
}

.result-description p {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* 단락 사이의 간격 조정 */
.result-description p br + br {
    display: block;
    content: "";
    margin-top: 16px;
}

.result-broccoli ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-broccoli li {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.result-broccoli li:last-child {
    border-bottom: none;
}

/* 브로콜리 섹션 */
.broccoli-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* margin-top은 result-info-box의 margin-bottom으로 대체 */
}

.broccoli-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 10px;
}

.broccoli-description {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(0, 0, 0, 0.6);
    margin: 0 0 4px 0;
}

.broccoli-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.6;
    color: #000000;
    margin: 0 0 10px 0;
}

.broccoli-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.store-button {
    cursor: pointer;
    height: 44px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.store-button[alt="App Store에서 다운로드"] {
    width: 132px;
    height: 44px;
}

.store-button[alt="Google Play에서 다운로드"] {
    width: 146px;
    height: 44px;
}

/* 하단 핑퐁 이미지 섹션 */
.bottom-pingpong-section {
    background: white;
    padding: 20px 0;
    margin: 20px 0;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pingpong-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.pingpong-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* 하단 여백 */
.bottom-margin {
    height: 60px;
}






