:root {
    --primary-color: #1e40af;
    --secondary-color: #3b82f6;
    --accent-color: #60a5fa;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --gold-color: #f59e0b;
    --neutral-color: #64748b;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-government: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    --gradient-money: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #047857 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

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

body {
    font-family: 'Segoe UI', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 컨테이너 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 25%, rgba(30, 64, 175, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 85% 75%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* 광고 컨테이너 */
.ad-container {
    width: 100%;
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 10;
}

.ad-container.top {
    margin: 0 0 20px 0;
    padding: 10px 0;
}

.ad-container.bottom {
    margin: 40px 0 0 0;
    padding: 20px 0;
}

.ad-container.popup {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* 시작 페이지 */
.header-section {
    text-align: center;
    margin-bottom: 50px;
}

.government-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 30px;
    background: var(--gradient-government);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-heavy);
    position: relative;
    animation: pulse-government 3s infinite;
}

.government-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(30, 64, 175, 0.3);
    animation: ripple-government 3s infinite;
}

.building-symbol {
    font-size: 40px;
    position: absolute;
    top: 35px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.money-symbol {
    font-size: 35px;
    position: absolute;
    bottom: 35px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

@keyframes ripple-government {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.main-title {
    font-size: 3.2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.info-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.badge {
    background: var(--gradient-success);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: var(--shadow-light);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: float 3s ease-in-out infinite;
}

.badge:nth-child(even) {
    background: var(--gradient-money);
    animation-delay: -1.5s;
}

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

/* 대출 쇼케이스 */
.loan-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.showcase-item {
    background: var(--surface-color);
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.showcase-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
    transition: left 0.5s ease;
}

.showcase-item:hover::before {
    left: 100%;
}

.showcase-item.featured {
    border-color: var(--gold-color);
    transform: scale(1.05);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.showcase-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.showcase-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.showcase-item h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.showcase-item p {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.badge-small {
    background: var(--gradient-money);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    position: absolute;
    top: 10px;
    right: 10px;
}

/* 기능 그리드 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.feature-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--gold-color);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 시작 버튼 */
.start-button {
    background: var(--gradient-government);
    color: white;
    border: none;
    padding: 25px 60px;
    font-size: 1.4rem;
    font-weight: 800;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-heavy);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    display: block;
    min-width: 350px;
}

.start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.start-button:hover::before {
    left: 100%;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(30, 64, 175, 0.4);
}

.start-button:active {
    transform: translateY(-1px);
}

.button-text {
    position: relative;
    z-index: 1;
}

/* 경고 섹션 */
.warning-section {
    margin-top: 50px;
}

.warning-box {
    background: var(--surface-color);
    border: 2px solid var(--warning-color);
    border-radius: 15px;
    padding: 25px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-light);
}

.warning-box h4 {
    color: var(--warning-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.warning-box ul {
    list-style: none;
    padding-left: 0;
}

.warning-box li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 1rem;
}

/* 질문 페이지 */
.progress-section {
    text-align: center;
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-government);
    width: 0%;
    transition: width 0.8s ease;
    border-radius: 5px;
}

.progress-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

.question-header {
    margin-bottom: 40px;
}

.question-header h2 {
    font-size: 2.4rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.question-header p {
    font-size: 1.3rem;
    color: var(--text-secondary);
}

.answers-grid {
    display: grid;
    gap: 15px;
    max-width: 650px;
    margin: 0 auto;
}

.answer-option {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
    transition: left 0.3s ease;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.answer-option.selected {
    background: var(--gradient-government);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.02);
}

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

.modal-content {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 40px;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    position: relative;
}

.modal-content.large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-primary);
    font-size: 1.9rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* 분석 모달 */
.analysis-header {
    text-align: center;
    margin-bottom: 40px;
}

.analysis-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.analysis-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
}

.analysis-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

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

.step-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.step-item:last-child {
    border-bottom: none;
}

.step-item.active {
    background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
}

.step-check {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.timer-section {
    text-align: center;
}

.timer-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gradient-government);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-medium);
}

.timer-display {
    font-size: 2.2rem;
    color: white;
    font-weight: bold;
}

/* 결과 페이지 */
.result-header {
    text-align: center;
    margin-bottom: 50px;
}

.result-icon {
    font-size: 5.5rem;
    margin-bottom: 20px;
    display: block;
}

.result-header h1 {
    font-size: 2.8rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 800;
}

.result-header p {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.result-content {
    max-width: 900px;
    margin: 0 auto;
}

.result-section {
    background: var(--surface-color);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.result-section h3 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 액션 버튼들 */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 40px auto 0;
}

.action-btn {
    padding: 18px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn.primary {
    background: var(--gradient-government);
    color: white;
    box-shadow: var(--shadow-light);
}

.action-btn.secondary {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-light);
}

.action-btn.tertiary {
    background: var(--gradient-money);
    color: white;
    box-shadow: var(--shadow-light);
}

.action-btn.quaternary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* 가이드 모달 */
.guide-content {
    max-height: 75vh;
    overflow-y: auto;
    padding-right: 15px;
}

.guide-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-weight: 700;
}

.loan-products {
    display: grid;
    gap: 20px;
}

.product-card {
    background: var(--background-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
}

.product-card h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.product-details p {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.product-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

.checklist {
    display: grid;
    gap: 12px;
}

.checklist label {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    background: var(--background-color);
}

.checklist label:hover {
    background: var(--border-color);
}

.checklist input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.3);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tip-item {
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.tip-item.success {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-left: 4px solid var(--success-color);
}

.tip-item.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--warning-color);
}

.tip-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.tip-item ul {
    list-style: none;
    padding-left: 0;
}

.tip-item li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    padding-left: 15px;
    position: relative;
}

.tip-item li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-item {
    padding: 25px;
    background: var(--background-color);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
}

.contact-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .government-icon {
        width: 120px;
        height: 120px;
    }
    
    .building-symbol {
        font-size: 35px;
    }
    
    .money-symbol {
        font-size: 30px;
    }
    
    .loan-showcase {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 25px;
    }
    
    .start-button {
        padding: 20px 45px;
        font-size: 1.2rem;
        min-width: 300px;
    }
    
    .question-header h2 {
        font-size: 2rem;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .government-icon {
        width: 100px;
        height: 100px;
    }
    
    .building-symbol {
        font-size: 30px;
    }
    
    .money-symbol {
        font-size: 25px;
    }
    
    .loan-showcase {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .showcase-item {
        padding: 20px 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .start-button {
        padding: 18px 35px;
        font-size: 1.1rem;
        min-width: 250px;
    }
    
    .result-icon {
        font-size: 4.5rem;
    }
    
    .result-header h1 {
        font-size: 2.2rem;
    }
}

/* 광고 컨테이너 스타일 (새로 추가) */
.ad-container {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.ad-container.top {
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.ad-container.mid {
    margin: 30px 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(217, 119, 6, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.ad-container.result {
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(4, 120, 87, 0.05));
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.ad-container ins {
    display: block !important;
    min-height: 100px;
}

.ad-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 모바일 광고 최적화 (새로 추가) */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
        padding: 8px;
        border-radius: 6px;
    }
    
    .ad-container ins {
        min-height: 80px;
    }
}
