/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gold: #d4af37;
    --secondary-gold: #b8860b;
    --accent-blue: #1e3a8a;
    --light-blue: #3b82f6;
    --cream: #faf8f3;
    --warm-white: #fffef9;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --border-light: #e5e7eb;
    --shadow-soft: 0 4px 20px rgba(212, 175, 55, 0.15);
    --gradient-main: linear-gradient(135deg, #d4af37 0%, #1e3a8a 100%);
    --gradient-secondary: linear-gradient(135deg, #faf8f3 0%, #fffef9 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* 페이지 공통 */
.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.page.hidden {
    display: none;
}

.container {
    max-width: 800px;
    width: 100%;
    background: var(--warm-white);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--border-light);
    overflow: hidden;
}

/* 광고 섹션 */
.ad-section {
    padding: 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--border-light);
}

/* 시작 페이지 */
.content {
    padding: 40px;
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.pension-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-main);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.badge-icon {
    font-size: 1.2em;
}

.badge-text {
    font-weight: 600;
    font-size: 0.95em;
}

.main-title {
    font-size: 2.8em;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.highlight-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2em;
    color: var(--text-medium);
    margin-bottom: 20px;
}

/* 연금 미리보기 카드 */
.pension-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.pension-card {
    background: var(--cream);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.pension-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-gold);
}

.card-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.pension-card h3 {
    font-size: 1.3em;
    color: var(--accent-blue);
    margin-bottom: 8px;
    font-weight: 700;
}

.pension-card p {
    color: var(--text-medium);
    font-size: 0.9em;
    margin-bottom: 12px;
}

.amount {
    background: var(--gradient-main);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

/* 통계 섹션 */
.info-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 30px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--primary-gold);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-medium);
    font-weight: 500;
}

/* 기능 목록 */
.features-list {
    margin-bottom: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--warm-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.feature-item:hover {
    background: var(--cream);
    border-color: var(--primary-gold);
}

.feature-icon {
    font-size: 1.2em;
    color: var(--primary-gold);
}

/* 시작 버튼 */
.start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-size: 1.3em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.btn-icon {
    font-size: 1.2em;
}

/* 질문 페이지 */
.progress-section {
    background: var(--gradient-main);
    padding: 30px;
    text-align: center;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    background: white;
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

.question-content {
    padding: 40px;
}

.question-title {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-weight: 700;
}

.question-desc {
    color: var(--text-medium);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.answers-grid {
    display: grid;
    gap: 16px;
}

.answer-option {
    background: var(--warm-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1em;
    text-align: left;
}

.answer-option:hover {
    background: var(--cream);
    border-color: var(--primary-gold);
    transform: translateX(5px);
}

.answer-option.selected {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-gold);
    color: var(--accent-blue);
    font-weight: 600;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--warm-white);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
    font-size: 1.8em;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.modal-header p {
    color: var(--text-medium);
    margin-bottom: 30px;
}

.analysis-steps {
    margin-bottom: 30px;
}

.step-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.step-item.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary-gold);
}

.step-icon {
    font-size: 1.5em;
}

.step-text {
    flex: 1;
    margin-left: 16px;
    text-align: left;
    font-weight: 500;
}

.step-check {
    font-size: 1.2em;
    font-weight: bold;
}

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

.timer-circle {
    width: 80px;
    height: 80px;
    border: 4px solid var(--primary-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: var(--gradient-main);
}

.timer-display {
    font-size: 2em;
    font-weight: bold;
    color: white;
}

.popup-ad {
    margin-top: 20px;
    padding: 20px;
    background: var(--cream);
    border-radius: 12px;
}

/* 결과 페이지 */
.result-header {
    background: var(--gradient-main);
    padding: 40px;
    text-align: center;
    color: white;
}

.result-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
}

.result-title {
    font-size: 2.2em;
    margin-bottom: 12px;
    font-weight: 700;
}

.result-summary {
    font-size: 1.2em;
    opacity: 0.9;
}

.result-content {
    padding: 40px;
}

.result-content > div {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--cream);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.action-section {
    display: flex;
    gap: 16px;
    padding: 30px 40px;
    background: var(--cream);
    flex-wrap: wrap;
}

.action-section button {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.detail-btn {
    background: var(--gradient-main);
    color: white;
}

.share-btn {
    background: #fee500;
    color: #3c1e1e;
}

.restart-btn {
    background: var(--light-blue);
    color: white;
}

.action-section button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.2em;
    }
    
    .pension-preview {
        grid-template-columns: 1fr;
    }
    
    .info-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .action-section {
        flex-direction: column;
    }
    
    .action-section button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 20px;
    }
    
    .question-content {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .main-title {
        font-size: 1.8em;
    }
    
    .info-stats {
        padding: 20px;
    }
}
