@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 인트로 페이지 스타일 */
.intro {
    padding: 40px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 300;
}

.intro-content {
    margin-bottom: 40px;
}

.intro-section {
    text-align: center;
    margin-bottom: 40px;
}

.intro-section h2 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.intro-section p {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.research-section {
    background: #fff8e1;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #ffa726;
}

.research-section h2 {
    color: #ef6c00;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.research-section ul {
    color: #4a5568;
    line-height: 1.6;
}

.research-section li {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.feature {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: #667eea;
}

.feature .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature h3 {
    color: #2d3748;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.feature p {
    color: #718096;
    font-size: 0.9rem;
}

.test-info {
    background: #edf2f7;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.test-info h3 {
    color: #2d3748;
    margin-bottom: 15px;
}

.test-info ul {
    list-style: none;
    color: #4a5568;
}

.test-info li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.test-info li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.start-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.notice {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
}

/* 퀴즈 페이지 스타일 */
.quiz {
    padding: 0;
}

.quiz-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 40px;
    text-align: center;
}

.quiz-header h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.progress-container {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 1rem;
    font-weight: 500;
}

.section-indicator {
    background: #f8fafc;
    padding: 15px 40px;
    font-weight: 500;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.question-area {
    padding: 40px;
}

.question {
    margin-bottom: 30px;
}

.question h3 {
    color: #2d3748;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.scale-description {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #718096;
}

.options {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.option-item {
    flex: 1;
    text-align: center;
}

.option-item input[type="radio"] {
    display: none;
}

.option-label {
    display: block;
    padding: 12px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.option-label:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.option-item input[type="radio"]:checked + .option-label {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.navigation {
    padding: 30px 40px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navigation button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#prevBtn {
    background: #e2e8f0;
    color: #4a5568;
}

#prevBtn:hover:not(:disabled) {
    background: #cbd5e0;
}

#prevBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#nextBtn, #submitBtn {
    background: #667eea;
    color: white;
}

#nextBtn:hover, #submitBtn:hover {
    background: #5a67d8;
}

/* 결과 페이지 스타일 */
.result {
    padding: 0;
}

.result-header {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.result-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.result-date {
    opacity: 0.9;
    font-size: 0.9rem;
}

.result-content {
    padding: 40px;
}

.result-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.result-section h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.result-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.score-bar {
    background: #e2e8f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

.career-recommendations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.career-recommendations-section {
    background: #f0f9ff;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
    margin-bottom: 30px;
}

.career-item {
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.career-item:hover {
    transform: translateY(-3px);
    border-color: #667eea;
}

.career-item h4 {
    color: #2d3748;
    margin-bottom: 10px;
}

.career-item p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.result-actions {
    padding: 40px;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.action-btn {
    padding: 12px 24px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

.disclaimer {
    padding: 30px 40px;
    background: #fff5f5;
    border-top: 1px solid #fed7d7;
}

.disclaimer h4 {
    color: #c53030;
    margin-bottom: 15px;
}

.disclaimer ul {
    color: #4a5568;
    padding-left: 20px;
}

.disclaimer li {
    margin-bottom: 8px;
}

/* 차트 섹션 스타일 */
.chart-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.chart-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-description {
    font-size: 0.9rem;
    color: #718096;
    text-align: center;
    margin-top: 15px;
    font-style: italic;
}

.interpretation-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
}

.expert-analysis {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.expert-analysis p {
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .intro, .question-area, .result-content {
        padding: 20px;
    }
    
    .quiz-header, .result-header {
        padding: 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    /* 답변 버튼을 가로로 배치 (중요!) */
    .options {
        display: flex !important;
        justify-content: space-between !important;
        flex-direction: row !important;
        gap: 8px !important;
        margin-bottom: 20px;
    }
    
    .option-item {
        flex: 1 1 0;
        text-align: center;
    }
    
    .option-label {
        padding: 12px 4px;
        font-size: 0.9rem;
    }
    
    /* 네비게이션 버튼을 한 줄에 좌우 끝 배치 (중요!) */
    .navigation {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        padding: 20px;
        gap: 0;
    }
    
    .navigation button {
        padding: 10px 16px;
        font-size: 0.9rem;
        width: auto;
        min-width: 80px;
        max-width: 120px;
    }
    
    /* 이전 버튼은 왼쪽, 다음/제출 버튼은 오른쪽 */
    #prevBtn {
        order: 1;
        margin-right: auto;
    }
    
    #nextBtn, #submitBtn {
        order: 2;
        margin-left: auto;
    }
    
    .result-actions {
        padding: 20px;
        flex-direction: column;
    }
    
    .chart-container canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    .chart-section {
        padding: 20px;
    }
}
