:root {
    --primary-color: #8B4513;
    --secondary-color: #D4AF37;
    --accent-color: #CD853F;
    --bg-color: #FFF8DC;
    --card-bg: #FFFAF0;
    --text-primary: #2C1810;
    --text-secondary: #654321;
    --border-color: #DEB887;
    
    /* 오행 색상 */
    --wood-color: #228B22;
    --fire-color: #DC143C;
    --earth-color: #DAA520;
    --metal-color: #C0C0C0;
    --water-color: #4169E1;
}

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #FFF8DC 0%, #F5DEB3 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 헤더 */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(139, 69, 19, 0.3);
}

.title {
    font-family: 'Noto Serif KR', serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: #FFF8DC;
    font-weight: 300;
}

/* 카드 */
.card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.section-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
}

.subsection-title {
    font-family: 'Noto Serif KR', serif;
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.calendar-type {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    justify-content: center;
}

.calendar-type label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 500;
}

.calendar-type input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* 시간 입력 그룹 */
.time-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.time-input-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-input-item input {
    flex: 1;
}

.time-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 1rem;
    min-width: 20px;
}

.time-hint {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.8;
}

/* 버튼 */
.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-top: 30px;
}

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

/* 사주 테이블 */
.saju-table-container {
    margin: 30px 0;
    overflow-x: auto;
}

.saju-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.saju-table th,
.saju-table td {
    padding: 15px;
    text-align: center;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.saju-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.saju-table td {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Noto Serif KR', serif;
}

.label-cell {
    background: #F5DEB3;
    font-size: 1rem !important;
    font-weight: 600;
    color: var(--text-secondary);
}

.cheongan-row td:not(.label-cell) {
    background: #FFF8DC;
}

.jiji-row td:not(.label-cell) {
    background: #FFFAF0;
}

/* 오행 차트 */
.ohang-chart {
    display: flex;
    gap: 15px;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ohang-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.ohang-bar-container {
    height: 150px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 10px;
}

.ohang-bar {
    width: 60px;
    border-radius: 8px 8px 0 0;
    transition: all 0.5s ease;
    position: relative;
}

.ohang-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 1.1rem;
}

.ohang-label {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 5px;
}

.wood { background: var(--wood-color); }
.fire { background: var(--fire-color); }
.earth { background: var(--earth-color); }
.metal { background: var(--metal-color); }
.water { background: var(--water-color); }

/* 오행 설명 */
.ohang-description {
    background: #F5F5DC;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid var(--secondary-color);
}

/* 해석 섹션 */
.basic-info {
    background: #F5F5DC;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--secondary-color);
}

.basic-info p {
    margin: 8px 0;
    font-size: 1rem;
}

.ilgan-analysis,
.interpretation {
    background: #FFFEF0;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    line-height: 1.8;
}

.interpretation p {
    margin: 12px 0;
}

.interpretation strong {
    color: var(--primary-color);
}

/* 푸터 */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer p {
    margin: 5px 0;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .saju-table th,
    .saju-table td {
        padding: 10px 5px;
        font-size: 0.9rem;
    }
    
    .saju-table td {
        font-size: 1.2rem;
    }
    
    .ohang-item {
        min-width: 80px;
    }
    
    .ohang-bar {
        width: 40px;
    }
}