/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;400;500;600;700&display=swap');

:root {
    /* 밝고 깔끔한 한국 전통 색상 */
    --primary: #faf8f5;
    --secondary: #f5f2ed;
    --accent: #8b6914;
    --accent-light: #c9a227;
    --text: #2d2a26;
    --text-muted: #6b6560;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --border: #e8e4de;
    --gold: #b8860b;
    --red: #c41e3a;
    --red-light: #e74c3c;

    /* 오행 색상 */
    --wood: #228b22;
    --fire: #dc143c;
    --earth: #daa520;
    --metal: #708090;
    --water: #4169e1;
}

body {
    font-family: 'Noto Serif KR', serif;
    background: var(--bg);
    background-image: linear-gradient(180deg, #fefefe 0%, #f8f6f3 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.8;
}

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

/* Header */
.header {
    text-align: center;
    padding: 50px 0 40px;
    position: relative;
}

.header::before {
    content: '☯';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: var(--gold);
    opacity: 0.4;
}

.header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin-bottom: 12px;
    color: var(--red);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.15em;
}

/* Form Section */
.input-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 35px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.form-row {
    display: flex;
    gap: 18px;
    margin-bottom: 22px;
}

.form-group {
    flex: 1;
}

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

select {
    width: 100%;
    padding: 12px 16px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Noto Serif KR', serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: all 0.2s ease;
}

select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

select:hover {
    border-color: var(--accent);
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--secondary);
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: var(--accent);
}

.radio-label input {
    accent-color: var(--red);
}

.radio-label span {
    font-size: 0.95rem;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--red);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Noto Serif KR', serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    letter-spacing: 0.15em;
}

.submit-btn:hover {
    background: var(--red-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 80px 0;
}

.loading.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Result Section */
.result-section {
    display: none;
}

.result-section.active {
    display: block;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    color: var(--red);
    letter-spacing: 0.1em;
}

/* Saju Pillars */
.pillars {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 22px;
}

.pillar {
    text-align: center;
    width: 85px;
}

.pillar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.pillar-chars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pillar-char {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 600;
    border-radius: 12px;
    margin: 0 auto;
    transition: all 0.2s ease;
}

.pillar-char:hover {
    transform: scale(1.05);
}

.pillar-char.gan {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 2px solid var(--red);
    color: var(--red);
}

.pillar-char.ji {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f0ff 100%);
    border: 2px solid var(--water);
    color: var(--water);
}

.birth-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 12px 15px;
    background: var(--secondary);
    border-radius: 8px;
}

/* Oheng Chart */
.oheng-chart {
    margin-bottom: 22px;
}

.oheng-bar {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.oheng-label {
    width: 65px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

.oheng-progress {
    flex: 1;
    height: 24px;
    background: var(--secondary);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 12px;
    border: 1px solid var(--border);
}

.oheng-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.6s ease;
}

.oheng-percent {
    width: 45px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.oheng-balance {
    background: var(--secondary);
    padding: 15px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text);
}

/* Personality */
.personality-content {
    line-height: 1.9;
}

.personality-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.ilgan-badge {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.personality-title {
    flex: 1;
}

.personality-title h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.personality-title p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.personality-traits {
    margin-bottom: 18px;
}

.trait-row {
    display: flex;
    gap: 15px;
    margin-top: 18px;
}

.trait-item {
    flex: 1;
    background: var(--secondary);
    padding: 18px;
    border-radius: 10px;
}

.trait-item h4 {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.trait-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Yongsin */
.yongsin-content .yongsin-item {
    background: var(--secondary);
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.yongsin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.yongsin-badge {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 10px;
    color: white;
}

.yongsin-header h4 {
    font-size: 1rem;
    color: var(--text);
    font-weight: 600;
}

.yongsin-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.yongsin-advice {
    font-size: 0.9rem;
    color: var(--text);
    padding: 12px 14px;
    background: rgba(184, 134, 11, 0.08);
    border-radius: 8px;
    margin-top: 10px;
    border-left: 3px solid var(--gold);
}

/* Daeun Timeline */
.daeun-timeline {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
}

.daeun-item {
    flex-shrink: 0;
    width: 105px;
    text-align: center;
    padding: 18px 12px;
    background: var(--secondary);
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.2s ease;
}

.daeun-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.daeun-age {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.daeun-chars {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.daeun-relation {
    font-size: 0.72rem;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    margin-bottom: 8px;
    display: inline-block;
    color: var(--text-muted);
}

.daeun-score {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 600;
}

/* Overall */
.overall-content {
    text-align: center;
}

.overall-score {
    width: 130px;
    height: 130px;
    margin: 0 auto 22px;
    position: relative;
}

.score-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--red) calc(var(--score) * 1%), var(--secondary) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.15);
}

.score-inner {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
}

.overall-description {
    font-size: 1rem;
    margin-bottom: 25px;
    padding: 0 15px;
    color: var(--text-muted);
    line-height: 1.8;
}

.lucky-items {
    display: flex;
    justify-content: center;
    gap: 35px;
}

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

.lucky-item span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.lucky-badge {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 auto;
    border: 2px solid var(--border);
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Noto Serif KR', serif;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.1em;
}

.reset-btn:hover {
    border-color: var(--red);
    color: var(--red);
    background: #fff5f5;
}

/* Fortune Cards Common */
.fortune-content {
    line-height: 1.8;
}

.fortune-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.fortune-score {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

.fortune-title h3 {
    font-size: 1.15rem;
    margin: 0;
    color: var(--text);
}

.fortune-body p {
    margin-bottom: 12px;
    color: var(--text-muted);
}

.fortune-advice {
    background: var(--secondary);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 3px solid var(--gold);
}

/* Yearly Fortune */
.yearly-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.yearly-score .score-badge {
    padding: 10px 22px;
    border-radius: 22px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.yearly-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.yearly-keyword {
    color: var(--red);
    font-weight: 600;
    font-size: 0.95rem;
}

.yearly-desc {
    margin-bottom: 22px;
}

.yearly-desc p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.yearly-general {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.monthly-chart h4 {
    font-size: 0.92rem;
    margin-bottom: 15px;
    color: var(--text);
    font-weight: 600;
}

.monthly-bars {
    display: flex;
    gap: 6px;
    height: 90px;
    align-items: flex-end;
    padding: 12px;
    background: var(--secondary);
    border-radius: 10px;
}

.month-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.month-fill {
    width: 100%;
    border-radius: 4px 4px 0 0;
    transition: height 0.4s ease;
}

.month-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Jobs List */
.suitable-jobs {
    margin-top: 15px;
}

.jobs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.job-tag {
    background: var(--secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.job-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Love Fortune */
.love-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.love-item {
    background: var(--secondary);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
}

.love-item h4 {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.love-level {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.love-level.대길 { background: #d4edda; color: #155724; }
.love-level.길 { background: #d4edda; color: #155724; }
.love-level.보통 { background: #fff3cd; color: #856404; }
.love-level.흉 { background: #f8d7da; color: #721c24; }
.love-level.대흉 { background: #f8d7da; color: #721c24; }

.love-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.ideal-partner {
    background: var(--secondary);
    padding: 18px;
    border-radius: 12px;
}

.ideal-partner h4 {
    font-size: 0.92rem;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 600;
}

.ideal-partner p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Health Fortune */
.health-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 18px;
}

.health-weak, .health-advice {
    background: var(--secondary);
    padding: 18px;
    border-radius: 12px;
}

.health-weak h4, .health-advice h4 {
    font-size: 0.92rem;
    margin-bottom: 10px;
    color: var(--accent);
    font-weight: 600;
}

.symptoms {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.health-warnings {
    background: #fff5f5;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid #ffe0e0;
}

.health-warnings h4 {
    font-size: 0.92rem;
    color: var(--red);
    margin-bottom: 10px;
    font-weight: 600;
}

.health-warnings ul {
    list-style: none;
    padding: 0;
}

.health-warnings li {
    font-size: 0.88rem;
    padding: 6px 0;
    color: var(--text-muted);
    border-bottom: 1px solid #ffe0e0;
}

.health-warnings li:last-child {
    border-bottom: none;
}

.health-overall {
    background: var(--secondary);
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Age Fortune */
.age-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.age-badge {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

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

.age-body h4 {
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 600;
}

.age-body p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.age-advice {
    background: var(--secondary);
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 3px solid var(--gold);
}

/* ===== 토정비결 섹션 ===== */
.tojeong-card {
    background: linear-gradient(135deg, #fffaf5 0%, #fff8f0 100%);
}

.tojeong-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.tojeong-gwa {
    display: flex;
    gap: 12px;
}

.gwa-item {
    text-align: center;
    padding: 14px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border);
    min-width: 75px;
}

.gwa-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.gwa-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--red);
}

.tojeong-info {
    flex: 1;
}

.tojeong-info h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
    color: var(--text);
}

.tojeong-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.tojeong-fortune {
    background: white;
    padding: 22px;
    border-radius: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
}

.tojeong-fortune h4 {
    font-size: 1rem;
    color: var(--red);
    margin-bottom: 12px;
    font-weight: 600;
}

.tojeong-fortune p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 8px;
}

.tojeong-years {
    margin-top: 22px;
}

.tojeong-years h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 14px;
    font-weight: 600;
}

.tojeong-year-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
}

.tojeong-year-item {
    flex-shrink: 0;
    width: 130px;
    padding: 16px 12px;
    background: white;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.tojeong-year-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.tojeong-year-item .year {
    font-size: 1rem;
    font-weight: 600;
    color: var(--red);
    margin-bottom: 6px;
}

.tojeong-year-item .gwa {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.tojeong-year-item .fortune-preview {
    font-size: 0.78rem;
    color: var(--accent);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 나이대별 운세 (10년 단위) ===== */
.decade-fortunes {
    margin-top: 15px;
}

.decade-fortune-item {
    background: var(--secondary);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.decade-fortune-item:hover {
    border-color: var(--accent);
}

.decade-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: white;
    cursor: pointer;
}

.decade-badge {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.decade-title {
    flex: 1;
}

.decade-title h4 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 3px;
    font-weight: 600;
}

.decade-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.decade-toggle {
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.decade-fortune-item.expanded .decade-toggle {
    transform: rotate(180deg);
}

.decade-body {
    display: none;
    padding: 0 18px 18px;
    background: white;
}

.decade-fortune-item.expanded .decade-body {
    display: block;
}

.decade-fortunes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.decade-fortune-box {
    background: var(--secondary);
    padding: 16px;
    border-radius: 10px;
}

.decade-fortune-box h5 {
    font-size: 0.88rem;
    color: var(--text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.fortune-icon {
    font-size: 1rem;
}

.decade-fortune-box .score {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.decade-fortune-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.decade-overall {
    margin-top: 14px;
    padding: 16px;
    background: var(--secondary);
    border-radius: 10px;
    border-left: 3px solid var(--gold);
}

.decade-overall h5 {
    font-size: 0.92rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.decade-overall p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .pillars {
        gap: 12px;
    }

    .pillar-char {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .trait-row {
        flex-direction: column;
    }

    .daeun-item {
        width: 90px;
    }

    .love-grid {
        grid-template-columns: 1fr;
    }

    .health-main {
        grid-template-columns: 1fr;
    }

    .monthly-bars {
        height: 70px;
    }

    .decade-fortunes-grid {
        grid-template-columns: 1fr;
    }

    .tojeong-gwa {
        flex-wrap: wrap;
    }

    .gwa-item {
        min-width: 65px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .input-section,
    .card {
        padding: 18px;
    }

    .pillar {
        width: 65px;
    }

    .pillar-char {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* Hidden */
.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* SEO Content Section */
.seo-content {
    margin-top: 50px;
    padding: 40px 30px;
    background: var(--primary);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.seo-article {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.seo-article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.seo-article h2 {
    font-size: 1.3rem;
    color: var(--red);
    margin-bottom: 12px;
    font-weight: 600;
}

.seo-article p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.9;
    text-align: justify;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #2d2a26 0%, #1a1817 100%);
    color: #ccc;
    padding: 50px 20px 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    color: var(--accent-light);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #aaa;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #999;
}

.footer-bottom {
    max-width: 900px;
    margin: 40px auto 0;
    padding-top: 25px;
    border-top: 1px solid #444;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #777;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .seo-content {
        padding: 25px 20px;
    }

    .seo-article h2 {
        font-size: 1.15rem;
    }

    .seo-article p {
        font-size: 0.9rem;
    }
}
