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

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.description {
    font-size: 14px;
    opacity: 0.85;
}

/* 입력 섹션 */
.input-section {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 15px;
}

.input-select,
.input-number,
.input-text {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.input-select:focus,
.input-number:focus,
.input-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-number {
    display: inline-block;
    width: 120px;
}

.input-hint {
    margin-left: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* 자녀 입력 카드 */
.children-inputs {
    margin-bottom: 30px;
}

.child-card {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.child-card-header {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.child-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .child-input-row {
        grid-template-columns: 1fr;
    }
}

/* 옵션 섹션 */
.options-section {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.options-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.toggle-group {
    margin-bottom: 12px;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* 버튼 */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    margin-top: 20px;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

/* 결과 섹션 */
.result-section {
    padding: 30px;
}

.result-main {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 30px;
}

.result-main h2 {
    font-size: 20px;
    margin-bottom: 20px;
    opacity: 0.95;
}

.total-cost {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-description {
    font-size: 14px;
    opacity: 0.9;
}

/* 시나리오 박스 */
.scenario-box,
.checklist-box,
.advice-box {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.scenario-box h3,
.checklist-box h3,
.advice-box h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.scenario-list {
    display: grid;
    gap: 15px;
}

.scenario-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scenario-item-left {
    flex: 1;
}

.scenario-item-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.scenario-item-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.scenario-item-highlight {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 800;
}

/* 체크리스트 */
.checklist-content {
    display: grid;
    gap: 20px;
}

.checklist-item {
    background: var(--card-bg);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 8px;
}

.checklist-item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.checklist-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.checklist-note {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* 조언 박스 */
.advice-list {
    list-style: none;
}

.advice-list li {
    padding: 12px 0;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.advice-list li::before {
    content: "💡";
    position: absolute;
    left: 0;
}

.advice-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* 광고 슬롯 */
.ad-slot {
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.ad-label {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.ad-content {
    color: var(--text-secondary);
}

.ad-placeholder {
    display: grid;
    gap: 10px;
}

.ad-placeholder p {
    padding: 10px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 14px;
}

/* 카카오 애드핏 컨테이너 */
.kakao-ad-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
    min-height: 250px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
}

.kakao-ad-container .kakao_ad_area {
    display: block !important;
}

/* 푸터 */
.footer {
    background: var(--bg-color);
    padding: 20px 30px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 반응형 */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 16px;
    }

    .input-section,
    .result-section {
        padding: 20px;
    }

    .total-cost {
        font-size: 36px;
    }

    .scenario-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .scenario-item-highlight {
        align-self: flex-end;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-section {
    animation: fadeIn 0.5s ease;
}

.scenario-item,
.checklist-item {
    animation: fadeIn 0.3s ease;
}

