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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fef08a 100%);
    min-height: 100vh;
}

/* 화면 전환 */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.screen.active {
    display: flex;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* 인트로 화면 */
.content-box {
    position: relative;
    display: inline-block;
}

.main-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    display: block;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* 버튼 스타일 */
.btn-primary {
    position: absolute;
    left: 50%;
    top: 85%;
    transform: translateX(-50%);
    z-index: 10;
    
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap; /* 줄바꿈 방지 */
    width: auto;
}

.btn-primary:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 15px 40px rgba(217, 119, 6, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    transform: scale(1.05);
}

.arrow {
    font-size: 1.5rem;
}

/* 퀴즈 화면 */
.quiz-content-box {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
}

.progress-section {
    margin-bottom: 30px;
}

.progress-text {
    color: #d97706;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #d97706;
    transition: width 0.3s ease;
}

.question-text {
    font-size: 1.8rem;
    color: #78350f;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 2px solid #fbbf24;
    padding: 25px;
    border-radius: 20px;
    font-size: 1.1rem;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
}

.option-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

/* 결과 화면 */
.result-content-box {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 50px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.result-title {
    font-size: 2rem;
    color: #78350f;
    margin-bottom: 30px;
}

.result-character {
    margin-bottom: 40px;
}

.character-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 20px;
    display: block;
}

.character-name {
    font-size: 2rem;
    color: #92400e;
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: bold;
}

.character-desc {
    font-size: 1.1rem;
    color: #374151;
    line-height: 1.8;
    background: #fffbeb;
    padding: 25px;
    border-radius: 20px;
}

.programs-section {
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.programs-title {
    font-size: 1.3rem;
    color: #78350f;
    margin-bottom: 20px;
}

.programs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.program-tag {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    color: #92400e;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 축제 정보 섹션 */
.festival-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #fbbf24;
}

.festival-title {
    font-size: 1.4rem;
    color: #78350f;
    margin-bottom: 15px;
    font-weight: bold;
}

.festival-desc {
    font-size: 1rem;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn-festival {
    display: inline-block;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    text-decoration: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(5, 150, 105, 0.3);
}

.btn-festival:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.4);
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-share {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-share:hover {
    transform: scale(1.05);
}

/* 공유 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #374151;
}

.modal-title {
    font-size: 1.5rem;
    color: #78350f;
    margin-bottom: 30px;
    text-align: center;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.share-option {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 2px solid #fbbf24;
    padding: 18px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-option:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
}

.copy-message {
    display: none;
    background: #10b981;
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
}

.copy-message.show {
    display: block;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .quiz-content-box,
    .result-content-box {
        padding: 30px 20px;
    }
    
    .btn-primary {
        font-size: 1rem;
        padding: 12px 28px;
        top: 82%;
        white-space: nowrap; /* 줄바꿈 방지 */
        max-width: 85%; /* 화면에서 너무 넓어지지 않도록 */
        gap: 8px;
    }

    .question-text {
        font-size: 1.4rem;
    }

    .option-btn {
        font-size: 1rem;
        padding: 20px;
    }

    .character-image {
        max-width: 100%;
        height: auto;
    }

    .character-name {
        font-size: 1.5rem;
    }
    
    .festival-title {
        font-size: 1.2rem;
    }
    
    .festival-desc {
        font-size: 0.95rem;
    }
    
    .btn-festival {
        font-size: 1rem;
        padding: 12px 28px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}

/* 아주 작은 화면 (갤럭시 폴드 등) */
@media (max-width: 400px) {
    .btn-primary {
        font-size: 0.9rem;
        padding: 10px 22px;
        gap: 6px;
        top: 80%;
    }
    
    .arrow {
        font-size: 1.2rem;
    }
}
