/**
 * 万年历系统 - 主样式表
 * 现代简约日历风格
 */

:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: rgba(102,126,234,0.08);
    --secondary: #764ba2;
    --success: #48bb78;
    --success-light: rgba(72,187,120,0.1);
    --warning: #ed8936;
    --warning-light: rgba(237,137,54,0.1);
    --danger: #f56565;
    --danger-light: rgba(245,101,101,0.08);
    --info: #4299e1;
    --info-light: rgba(66,153,225,0.08);
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --bg-odd: #fafbfc;
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    
    --border-color: #e8ecf0;
    --border-light: #f0f2f5;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.04), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-hover: 0 8px 24px rgba(102,126,234,0.12), 0 4px 12px rgba(0,0,0,0.06);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #eef1f5;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, #5b6ecf 50%, var(--secondary) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 36px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header h1 {
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.5px;
}

.header h1 .logo-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.header-info {
    display: flex;
    gap: 36px;
    align-items: center;
}

.header-info-item {
    text-align: center;
}

.header-info-item .label {
    font-size: 11px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.header-info-item .value {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 主布局 */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* 卡片 */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--shadow-md);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), transparent);
    opacity: 0.15;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.card-body {
    padding: 24px;
}

/* 日历控制栏 */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
    letter-spacing: -0.5px;
}

.calendar-title .subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-top: 3px;
    letter-spacing: 0;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    letter-spacing: 0.2px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #7581ef 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* ===== 日历卡片 ===== */
.calendar-card {
    overflow: hidden;
    border-radius: 12px;
}

.calendar-card .card-body {
    padding: 0;
    background: #faf8f5;
}

/* 红色顶部导航栏 */
.cal-nav-bar {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.cal-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cal-year-nav,
.cal-month-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-nav-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    line-height: 1;
}

.cal-nav-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.cal-year {
    font-size: 16px;
    font-weight: 700;
    color: white;
    min-width: 65px;
    text-align: center;
    letter-spacing: 1px;
}

.cal-month {
    font-size: 18px;
    font-weight: 800;
    color: white;
    min-width: 55px;
    text-align: center;
    letter-spacing: 1px;
}

.cal-today-btn {
    background: white;
    color: #b71c1c;
    border: none;
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    letter-spacing: 0.5px;
}

.cal-today-btn:hover {
    background: #fff5f5;
    transform: scale(1.02);
}

.cal-nav-right {
    display: flex;
    align-items: center;
}

.cal-nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.cal-lunar-info {
    color: white;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    padding: 5px 14px;
    border-radius: 18px;
    letter-spacing: 0.5px;
}

.bj-time {
    color: white;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

#bj-clock {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 操作栏 */
.cal-action-bar {
    display: none;
}

/* ===== 时辰吉凶卡片 ===== */
.shichen-card {
    margin-top: 28px;
    border-top: 3px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
                linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) border-box;
}

.shichen-card .card-header {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shichen-card .card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.shichen-card .card-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.shichen-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.shichen-card-body {
    padding: 20px 24px 24px;
    background: linear-gradient(180deg, #fffdf7 0%, var(--bg-primary) 100%);
}

.shichen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* 独立时辰卡片 */
.sc-card {
    background: white;
    border: 1.5px solid #e8ecf0;
    border-radius: 12px;
    padding: 16px;
    position: relative;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

[class*=sc-吉] { border-color: rgba(72,187,120,0.4); background: rgba(72,187,120,0.03); }
.sc-card.sc-凶 { border-color: rgba(229,62,62,0.35); background: rgba(229,62,62,0.03); }
.sc-card.sc-平 { border-color: rgba(237,137,54,0.35); background: rgba(237,137,54,0.03); }

/* 卡片顶部 */
.sc-card-top { display: flex; flex-direction: column; gap: 5px; padding-right: 42px; }
.sc-name-row { display: flex; justify-content: space-between; align-items: baseline; }
.sc-name { font-size: 17px; font-weight: 700; color: #1a202c; letter-spacing: 0.3px; }
.sc-time { font-size: 12px; color: #718096; font-weight: 500; }
.sc-conflict { font-size: 13px; color: #4a5568; font-weight: 500; }
.sc-jian { color: #a0aec0; }

/* 神位方向 */
.sc-gods { display: flex; gap: 8px; flex-wrap: wrap; }
.god-item { font-size: 12px; padding: 4px 10px; border-radius: 8px; font-weight: 600; }
.god-xishen, .god-caishen { background: rgba(237,137,54,0.1); color: #c05621; }
.god-fushen { background: rgba(102,126,234,0.1); color: #5a67d8; }

/* 宜忌区 */
.sc-actions { display: flex; flex-direction: column; gap: 6px; }
.sc-yi-row, .sc-ji-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.6; align-items: flex-start; }
.sc-yi-label { color: #276749; font-weight: 700; flex-shrink: 0; min-width: 18px; font-size: 13px; }
.sc-yi-text { color: #276749; font-weight: 500; word-break: break-all; }
.sc-ji-label { color: #c53030; font-weight: 700; flex-shrink: 0; min-width: 18px; font-size: 13px; }
.sc-ji-text { color: #c53030; font-weight: 500; word-break: break-all; }

/* 吉凶徽章 */
.sc-luck-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}
.sc-luck-badge.sc-luck-吉 { background: #48bb78; }
.sc-luck-badge.sc-luck-凶 { background: #e53e3e; }
.sc-luck-badge.sc-luck-平 { background: #ed8936; }

/* 详情弹窗时辰 */
.detail-shichen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.detail-sc-card {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-sc-card.sc-吉 { border-left: 3px solid #48bb78; }
.detail-sc-card.sc-凶 { border-left: 3px solid #e53e3e; }
.detail-sc-card.sc-平 { border-left: 3px solid #ed8936; }

.d-sc-header { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.d-sc-name { font-weight: 800; font-size: 14px; color: #1a202c; }
.d-sc-time { font-size: 10px; color: #a0aec0; }
.d-sc-conflict { font-size: 10px; color: #718096; margin-left: auto; }
.d-sc-gods { display: flex; gap: 4px; flex-wrap: wrap; }
.d-god { font-size: 10px; padding: 1px 5px; border-radius: 5px; background: rgba(237,137,54,0.08); color: #c05621; font-weight: 600; }
.d-sc-yi { font-size: 11px; color: #276749; font-weight: 500; }
.d-sc-ji { font-size: 11px; color: #c53030; font-weight: 500; }
.d-sc-luck {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    color: white;
}
.d-sc-luck.sc-luck-吉 { background: #48bb78; }
.d-sc-luck.sc-luck-凶 { background: #e53e3e; }
.d-sc-luck.sc-luck-平 { background: #ed8936; }

/* ===== 日历网格 ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #faf8f5;
    border: 1px solid #e8e0d5;
    border-radius: 8px;
    overflow: hidden;
}

/* 星期标题行 */
.calendar-weekday {
    background: #faf8f5;
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e8e0d5;
    border-right: 1px solid #e8e0d5;
}

.calendar-weekday:last-child {
    border-right: none;
}

.calendar-weekday.weekend {
    color: #d32f2f;
}

/* 日期单元格 */
.cal-day {
    background: #faf8f5;
    min-height: 70px;
    padding: 6px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-right: 1px solid #e8e0d5;
    border-bottom: 1px solid #e8e0d5;
    overflow: hidden;
}

.cal-day:nth-child(7n) {
    border-right: none;
}

.cal-day:hover {
    background: #f5f0e8;
}

/* 非本月日期 */
.cal-day.other-month {
    background: #faf8f5;
}

.cal-day.other-month .day-num {
    color: #ccc;
}

.cal-day.other-month .day-lunar {
    color: #ddd;
}

/* 今日 - 使用方框边框 */
.cal-day.today {
    background: #faf8f5;
    border: 2px solid #d32f2f;
    padding: 8px 6px; /* 补偿边框 */
}

.cal-day.today .day-num {
    color: #d32f2f;
    font-weight: 800;
    background: none;
    box-shadow: none;
}

/* 周末-周日 */
.cal-day.sunday {
    background: #faf8f5;
}

.cal-day.sunday .day-num {
    color: #d32f2f;
}

/* 周末-周六 */
.cal-day.saturday {
    background: #faf8f5;
}

.cal-day.saturday .day-num {
    color: #d32f2f;
}

/* 休息日 - 淡红色背景 */
.cal-day.rest-day {
    background: #fff0f0;
}

.cal-day.rest-day .day-num {
    color: #d32f2f;
    background: none;
    box-shadow: none;
}

/* 今日标签 */
.today-tag {
    display: none;
    position: absolute;
    top: 3px;
    left: 3px;
    background: #d32f2f;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* 日期数字容器 */
.day-num-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 0 2px;
    width: 100%;
}

/* 日期数字 - 大号字体 */
.day-num {
    font-size: 20px;
    font-weight: 700;
    color: #b8860b;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cal-day:hover .day-num {
    transform: scale(1.05);
}

.cal-day.today .day-num {
    color: #d32f2f;
}

.cal-day.sunday .day-num,
.cal-day.saturday .day-num {
    color: #d32f2f;
}

.cal-day.rest-day .day-num {
    color: #d32f2f;
}

/* 休息/工作标记 */
.rest-badge, .work-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    min-width: 18px;
    text-align: center;
}

.rest-badge {
    background: #ff6b6b;
    color: white;
}

.work-badge {
    background: #51cf66;
    color: white;
}

/* 信息区域 */
.day-info {
    padding: 2px 2px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* 节日/节气文字 */
.day-holiday {
    font-size: 11px;
    font-weight: 600;
    color: #d32f2f;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1px 0;
    width: 100%;
}

.day-term {
    font-size: 11px;
    font-weight: 600;
    color: #51cf66;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 农历日期 - 灰色小字 */
.day-lunar {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* 日程小圆点 */
.day-events {
    padding: 2px 0 1px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: auto;
    justify-content: center;
    width: 100%;
}

.event-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 选中态 */
.cal-day.selected {
    background: #f5f0e8;
    box-shadow: inset 0 0 0 2px #b8860b;
}

/* 农历信息栏 */
.cal-lunar-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 16px;
    background: #fffaf0;
    border: 1px solid #feebc8;
    border-top: none;
}

.lunar-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lunar-date {
    font-size: 13px;
    font-weight: 700;
    color: #c05621;
}

.lunar-year {
    font-size: 11px;
    color: #744210;
    font-weight: 500;
}

.lunar-activities {
    font-size: 10px;
    color: #276749;
    font-weight: 500;
}

/* 底部图例 */
.cal-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px;
    background: #faf8f5;
    border: 1px solid #e8e0d5;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-dot.lunar { background: #d32f2f; }
.legend-dot.solar { background: #d32f2f; }
.legend-dot.term { background: #51cf66; }

/* ===== 今日卡片 - 新设计 ===== */
.today-card {
    padding: 0;
    overflow: hidden;
}

/* 顶部橙色横幅 */
.today-banner {
    background: linear-gradient(135deg, #f6a623 0%, #f79e00 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.today-banner-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.today-banner-weekday {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    letter-spacing: 1px;
}

/* 日期和农历区域 */
.today-body {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px 16px;
    background: #fffaf0;
    border-bottom: 1px solid #f0e8d8;
}

/* 绿色大日期方块 */
.today-day-block {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(76,175,80,0.35);
}

.today-day-num {
    font-size: 40px;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -2px;
}

/* 农历信息 */
.today-lunar-info {
    flex: 1;
    min-width: 0;
}

.today-lunar-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.today-lunar-label {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
    flex-shrink: 0;
}

.today-lunar-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.today-ganzhi-info {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}

.today-animal {
    color: #f6a623;
    font-weight: 600;
}

/* 宜忌区域 */
.today-yiji {
    padding: 14px 20px 18px;
    background: #fffdf7;
}

/* 宜 */
.today-yi {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.today-yi-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(72,187,120,0.3);
}

.today-yi-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}

.today-yi-item {
    font-size: 13px;
    color: #2d3748;
    font-weight: 500;
    line-height: 1.6;
}

/* 忌 */
.today-ji {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.today-ji-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245,101,101,0.3);
}

.today-ji-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
}

.today-ji-item {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.6;
}

/* ===== 侧边栏 ===== */
.sidebar-card {
    margin-bottom: 20px;
}

.sidebar-card .card-body {
    padding: 20px;
}

/* 今日信息 - 大日期展示 */
.today-info {
    text-align: center;
}

.today-info .date-big {
    font-size: 72px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #7581ef 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -3px;
    margin-bottom: 4px;
}

.today-info .weekday {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 8px 0 16px;
    letter-spacing: 2px;
}

.today-info .lunar-date {
    font-size: 15px;
    color: var(--text-muted);
    padding: 16px;
    background: var(--bg-odd);
    border-radius: var(--radius-md);
    margin-top: 12px;
    border: 1px solid var(--border-light);
}

.today-info .ganzhi {
    font-size: 13px;
    color: var(--primary);
    margin-top: 10px;
    font-weight: 500;
    padding: 6px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    display: inline-block;
}

/* 宜忌 - 优化 */
.yiji-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.yiji-box {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.yiji-box.yi {
    background: var(--success-light);
    border-color: rgba(72,187,120,0.2);
}

.yiji-box.ji {
    background: var(--danger-light);
    border-color: rgba(245,101,101,0.2);
}

.yiji-box h4 {
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.yiji-box.yi h4 {
    color: #276749;
}

.yiji-box.ji h4 {
    color: #c53030;
}

.yiji-box h4::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.yiji-box.yi h4::before {
    background: var(--success);
    color: white;
}

.yiji-box.ji h4::before {
    background: var(--danger);
    color: white;
}

.yiji-list {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.9;
}

/* ===== 事件列表 ===== */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: var(--bg-odd);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.event-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

.event-color {
    width: 4px;
    height: 38px;
    border-radius: 2px;
    flex-shrink: 0;
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.event-type {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== 节假日列表 ===== */
.holiday-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-odd);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.holiday-item:hover {
    border-color: var(--border-color);
}

.holiday-name {
    font-weight: 600;
    font-size: 14px;
}

.holiday-date {
    font-size: 12px;
    color: var(--text-muted);
}

.holiday-badge {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 12px;
    font-weight: 500;
}

.holiday-badge.legal {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(245,101,101,0.2);
}

.holiday-badge.traditional {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid rgba(237,137,54,0.2);
}

.holiday-badge.international {
    background: var(--info-light);
    color: var(--info);
    border: 1px solid rgba(66,153,225,0.2);
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border-radius: var(--radius-xl);
    padding: 12px 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(183, 28, 28, 0.3);
}

.nav-tabs {
    display: flex;
    gap: 0;
}

.nav-tab {
    padding: 10px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-tab:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.nav-tab.active {
    color: white;
    background: rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-today {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    font-weight: 600;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: var(--radius-md);
}

.btn-today:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.header {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-top: -1px;
}

/* ===== 黄历信息面板 ===== */
.huangli-card .card-body {
    padding: 16px 20px;
    background: #f0f8f4;
}

.huangli-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.huangli-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.huangli-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #e8f0eb;
}

.huangli-item:last-child {
    border-bottom: none;
}

.huangli-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    flex-shrink: 0;
}

.huangli-value {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.huangli-highlight {
    color: #f6a623;
}

.huangli-warn {
    color: #e53e3e;
}

.huangli-primary {
    color: #3182ce;
}

/* ===== 详情弹窗黄历区 ===== */
.detail-huangli {
    padding: 14px 20px 20px;
    background: #f0f8f4;
    border-top: 1px solid #e8f0eb;
}

.detail-huangli-title {
    font-size: 13px;
    font-weight: 700;
    color: #276749;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.detail-huangli-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
}

.detail-hl-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px dashed #d0e8db;
    font-size: 12px;
}

.hl-label {
    color: #718096;
    font-weight: 500;
}

.hl-val {
    font-weight: 600;
    color: #2d3748;
}

.hl-hl { color: #f6a623; }
.hl-warn { color: #e53e3e; }
.hl-primary { color: #3182ce; }

/* 详情弹窗时辰样式 */
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-name {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
}

.sc-time {
    font-size: 10px;
    color: #a0aec0;
    font-weight: 500;
}

.sc-ganzhi {
    font-size: 11px;
    color: #718096;
    font-weight: 500;
}

.sc-luck {
    margin: 2px 0;
}

.sc-luck-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
}

.sc-luck-tag.sc-luck-吉 {
    background: #48bb78;
    color: white;
}

.sc-luck-tag.sc-luck-凶 {
    background: #e53e3e;
    color: white;
}

.sc-luck-tag.sc-luck-平 {
    background: #ed8936;
    color: white;
}

.sc-detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 10px;
}

.sc-yi {
    color: #276749;
    font-weight: 500;
}

.sc-ji {
    color: #c53030;
    font-weight: 500;
}

/* 详情弹窗时辰网格 */
.detail-shichen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.detail-sc-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    flex-wrap: wrap;
}

.detail-sc-item.sc-吉 { border-left: 3px solid #48bb78; }
.detail-sc-item.sc-凶 { border-left: 3px solid #e53e3e; }
.detail-sc-item.sc-平 { border-left: 3px solid #ed8936; }

.d-sc-name {
    font-weight: 700;
    color: #2d3748;
    min-width: 28px;
}

.d-sc-time {
    color: #a0aec0;
    font-size: 10px;
}

.d-sc-ganzhi {
    color: #718096;
    font-size: 10px;
}

.d-sc-luck {
    font-weight: 700;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 6px;
    color: white;
    margin-left: auto;
}

.d-sc-luck-吉 { background: #48bb78; }
.d-sc-luck-凶 { background: #e53e3e; }
.d-sc-luck-平 { background: #ed8936; }

/* ===== 日期详情弹窗卡片 ===== */
.detail-card {
    padding: 0;
    overflow: hidden;
}

/* 顶部橙色横幅 */
.detail-banner {
    background: linear-gradient(135deg, #f6a623 0%, #f79e00 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.detail-banner-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.detail-banner-weekday {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    letter-spacing: 1px;
}

/* 日期 + 农历区 */
.detail-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fffaf0;
    border-bottom: 1px solid #f0e8d8;
}

.detail-day-block {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}

.detail-day-num {
    font-size: 34px;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -2px;
}

.detail-lunar-info {
    flex: 1;
    min-width: 0;
}

.detail-lunar-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 5px;
}

.detail-lunar-label {
    font-size: 12px;
    color: #a0aec0;
    font-weight: 500;
    flex-shrink: 0;
}

.detail-lunar-val {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
}

.detail-ganzhi {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    margin-bottom: 5px;
}

.detail-animal {
    color: #f6a623;
    font-weight: 600;
}

.detail-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.detail-tag-holiday {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(245,101,101,0.1);
    color: #f56565;
    border-radius: 10px;
    font-weight: 500;
}

.detail-tag-term {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(72,187,120,0.1);
    color: #48bb78;
    border-radius: 10px;
    font-weight: 500;
}

/* 宜忌区 */
.detail-yiji {
    padding: 14px 20px;
    background: #fffdf7;
    border-bottom: 1px solid #f0e8d8;
}

.detail-yi,
.detail-ji {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.detail-yi:last-child,
.detail-ji:last-child {
    margin-bottom: 0;
}

.detail-yi-icon,
.detail-ji-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-yi-icon {
    background: linear-gradient(135deg, #48bb78 0%, #2f855a 100%);
    box-shadow: 0 2px 6px rgba(72,187,120,0.3);
}

.detail-ji-icon {
    background: linear-gradient(135deg, #f56565 0%, #c53030 100%);
    box-shadow: 0 2px 6px rgba(245,101,101,0.3);
}

.detail-yi-list,
.detail-ji-list {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
    line-height: 1.8;
    flex: 1;
}

/* 日程区 */
.detail-events {
    padding: 16px 20px 20px;
    background: #fff;
}

.detail-events-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.detail-events-empty {
    text-align: center;
    padding: 16px;
    color: #a0aec0;
    font-size: 13px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px dashed #e2e8f0;
}

.detail-event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
    margin-bottom: 8px;
}

.detail-event-bar {
    width: 3px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.detail-event-body {
    flex: 1;
    min-width: 0;
}

.detail-event-title {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-event-desc {
    font-size: 12px;
    color: #718096;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26,32,44,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.92) translateY(20px);
    transition: var(--transition);
    box-shadow: 0 25px 60px rgba(0,0,0,0.2), 0 10px 25px rgba(0,0,0,0.1);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    color: var(--text-muted);
    font-size: 18px;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition-fast);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-select {
    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='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* 颜色选择器 */
.color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 3px solid transparent;
}

.color-option:hover {
    transform: scale(1.12);
}

.color-option.selected {
    border-color: var(--text-primary);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 复选框 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 19px;
    height: 19px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== 视图切换 ===== */
.view-switcher {
    display: flex;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.view-switcher button {
    padding: 7px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.view-switcher button:hover {
    color: var(--text-secondary);
}

.view-switcher button.active {
    background: var(--bg-primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* 年视图 */
.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .year-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .year-grid {
        grid-template-columns: 1fr;
    }
}

.year-month-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 15px;
}

.year-month-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.year-month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    font-size: 11px;
}

.year-month-days .day-label {
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px;
}

.year-month-days .day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.year-month-days .day-cell:hover {
    background: var(--border-color);
}

.year-month-days .day-cell.today {
    background: var(--primary);
    color: white;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.5;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text-primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    max-width: 90%;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ===== 加载动画 ===== */
.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        padding: 20px 24px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .header-info {
        gap: 20px;
    }
    
    .header-info-item .value {
        font-size: 15px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 8px 6px;
    }
    
    .day-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    
    .day-lunar {
        font-size: 12px;
    }
    
    .day-holiday, .day-term {
        font-size: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }

    /* 导航栏响应式 */
    .top-nav {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
        border-radius: var(--radius-lg);
    }

    .nav-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0;
    }

    .nav-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .btn-today {
        font-size: 12px;
        padding: 5px 12px;
        white-space: nowrap;
    }

    /* 日历卡片响应式 */
    .cal-nav-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
        justify-content: space-between;
    }

    .cal-nav-center {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }

    .cal-lunar-info {
        font-size: 13px;
        padding: 4px 12px;
    }

    .cal-year,
    .cal-month {
        font-size: 16px;
    }

    .cal-today-btn {
        font-size: 12px;
        padding: 5px 14px;
    }

    .cal-action-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    /* 黄历面板响应式 */
    .huangli-body {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* 时辰吉凶卡片响应式 */
    .shichen-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .shichen-card-body {
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .shichen-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .shichen-card .card-header {
        padding: 14px 16px;
    }

    .shichen-card .card-title {
        font-size: 15px;
    }

    .sc-card {
        padding: 10px;
    }

    .sc-name {
        font-size: 14px;
    }

    .sc-time {
        font-size: 9px;
    }

    .sc-gods {
        gap: 4px;
    }

    .god-item {
        font-size: 9px;
        padding: 2px 5px;
    }

    .sc-yi-row, .sc-ji-row {
        font-size: 9px;
    }

    .sc-luck-badge {
        width: 24px;
        height: 24px;
        font-size: 11px;
        top: 8px;
        right: 8px;
    }
}
