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

:root {
    --primary-color: #c41e3a;
    --primary-dark: #a01830;
    --primary-light: #e8405d;
    --secondary-color: #f5a623;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #ff4d4f;
    --text-color: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-color: #f8f9fa;
    --white: #fff;
    --border-color: #e8e8e8;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 2px;
}

.logo .slogan {
    font-size: 12px;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.main {
    min-height: calc(100vh - 200px);
}

.section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-left: 16px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 2px;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.view-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.control-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.today-btn {
    width: auto;
    padding: 0 20px;
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.today-btn:hover {
    background: var(--primary-dark);
}

.current-date {
    display: flex;
    gap: 12px;
}

.date-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    background: var(--white);
    min-width: 100px;
}

.calendar-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.calendar-header span {
    padding: 16px 8px;
    text-align: center;
    font-weight: 500;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 80px;
    padding: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.calendar-day:hover {
    background: #fff5f5;
}

.calendar-day.weekend {
    background: #fffbf0;
}

.calendar-day.holiday {
    background: #fff0f0;
}

.calendar-day.today {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--white);
}

.calendar-day.today .lunar-day {
    color: rgba(255, 255, 255, 0.9);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.day-number {
    font-size: 18px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.lunar-day {
    font-size: 12px;
    color: var(--text-light);
}

.day-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--secondary-color);
    color: var(--white);
}

.day-tag.jieqi {
    background: #52c41a;
}

.day-tag.festival {
    background: #1890ff;
}

.day-tag.holiday {
    background: var(--primary-color);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.workday {
    background: var(--white);
    border: 1px solid var(--border-color);
}

.legend-dot.weekend {
    background: #fffbf0;
    border: 1px solid var(--secondary-color);
}

.legend-dot.holiday {
    background: #fff0f0;
    border: 1px solid var(--primary-color);
}

.legend-dot.festival {
    background: #e6f7ff;
    border: 1px solid #1890ff;
}

.legend-dot.jieqi {
    background: #f6ffed;
    border: 1px solid #52c41a;
}

.huangli-date-picker {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.date-input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    min-width: 200px;
}

.btn-primary {
    padding: 12px 32px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 10px 24px;
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

.huangli-result {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

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

.huangli-date-info .solar-date {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.huangli-date-info .lunar-date {
    color: var(--text-light);
    margin-bottom: 2px;
}

.huangli-date-info .ganzhi-date {
    color: var(--text-muted);
    font-size: 14px;
}

.huangli-day {
    text-align: center;
}

.huangli-day .day-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.huangli-day .day-text {
    font-size: 14px;
    color: var(--text-light);
}

.huangli-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.huangli-card {
    padding: 20px;
    border-radius: var(--radius);
}

.huangli-card.yi-card {
    background: linear-gradient(135deg, #f6ffed, #e6f7e0);
    border: 1px solid #b7eb8f;
}

.huangli-card.yi-card h3 {
    color: #52c41a;
}

.huangli-card.ji-card {
    background: linear-gradient(135deg, #fff2f0, #ffccc7);
    border: 1px solid #ffa39e;
}

.huangli-card.ji-card h3 {
    color: #ff4d4f;
}

.huangli-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    text-align: center;
}

.huangli-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.huangli-content span {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    font-size: 14px;
}

.huangli-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
    background: #fafafa;
    border-radius: var(--radius);
}

.detail-item {
    display: flex;
    gap: 8px;
}

.detail-label {
    color: var(--text-muted);
    white-space: nowrap;
}

.detail-value {
    color: var(--text-color);
    font-weight: 500;
}

.huangli-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.jiri-tabs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.jiri-tab {
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.jiri-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.jiri-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.jiri-filter {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: var(--text-light);
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    min-width: 120px;
}

.jiri-result {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.jiri-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.jiri-item {
    padding: 16px;
    background: linear-gradient(135deg, #fff5f5, #fff0f0);
    border-radius: var(--radius);
    border: 1px solid #ffd6d6;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.jiri-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.jiri-item .date {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.jiri-item .lunar {
    font-size: 14px;
    color: var(--text-light);
}

.jieqi-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.jieqi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.jieqi-item {
    padding: 20px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.jieqi-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.jieqi-item .name {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.jieqi-item .date {
    font-size: 13px;
    color: var(--text-light);
}

.jieqi-detail {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
}

.jieqi-detail h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.jieqi-detail .jieqi-time {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.jieqi-detail .jieqi-desc {
    color: var(--text-color);
    line-height: 1.8;
}

.holiday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.holiday-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.holiday-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.holiday-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 16px 20px;
}

.holiday-card-header h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.holiday-card-header .days {
    font-size: 14px;
    opacity: 0.9;
}

.holiday-card-body {
    padding: 16px 20px;
}

.holiday-card-body .date-range {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.holiday-card-body .workdays {
    font-size: 13px;
    color: var(--text-muted);
}

.holiday-tips {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 32px;
}

.holiday-tips h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.holiday-tips ul {
    list-style: none;
}

.holiday-tips li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-light);
}

.holiday-tips li:last-child {
    border-bottom: none;
}

.festival-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.festival-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color);
}

.festival-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.festival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: var(--radius);
    transition: var(--transition);
}

.festival-item:hover {
    background: #fff5f5;
}

.festival-item .name {
    font-weight: 500;
}

.festival-item .date {
    color: var(--text-light);
    font-size: 14px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tool-card h3 {
    font-size: 16px;
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.tool-content {
    padding: 20px;
}

.convert-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.convert-tab {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.convert-tab:hover {
    border-color: var(--primary-color);
}

.convert-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

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

.form-select,
.form-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
}

.form-input {
    width: 100%;
}

.tool-content .btn-primary {
    width: 100%;
    margin-top: 8px;
}

.convert-result,
.age-result,
.days-result,
.weekday-result,
.countdown-result {
    margin-top: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: var(--radius);
    text-align: center;
}

.convert-result .result-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.convert-result .result-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.age-result .age-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.age-result .age-detail {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

.birthday-list {
    margin-top: 16px;
}

.birthday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.birthday-item .name {
    font-weight: 500;
}

.birthday-item .countdown {
    font-size: 14px;
    color: var(--primary-color);
}

.birthday-item .delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.birthday-item .delete-btn:hover {
    color: var(--danger-color);
}

.countdown-result .countdown-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.countdown-result .countdown-days {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
}

.countdown-result .countdown-unit {
    font-size: 16px;
    color: var(--text-light);
}

.footer {
    background: #1a1a1a;
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

.footer-info p {
    color: #999;
    font-size: 14px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 1;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 24px;
    text-align: center;
}

.modal-date {
    font-size: 24px;
    font-weight: 600;
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px 24px 24px;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.year-view {
    display: none;
}

.year-view.show {
    display: block;
}

.year-month {
    margin-bottom: 24px;
}

.year-month h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-color);
}

.year-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.year-calendar span {
    padding: 8px 4px;
    text-align: center;
    font-size: 12px;
    background: var(--white);
}

.year-calendar span.weekend {
    color: var(--primary-color);
}

.year-calendar span.holiday {
    background: #fff0f0;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        margin-top: 12px;
    }

    .nav.show {
        display: flex;
    }

    .nav-link {
        text-align: center;
        padding: 10px;
    }

    .menu-toggle {
        display: flex;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section-header h2::before {
        display: none;
    }

    .calendar-controls {
        gap: 8px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .today-btn {
        padding: 0 16px;
    }

    .date-select {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 80px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .day-number {
        font-size: 14px;
    }

    .lunar-day {
        font-size: 10px;
    }

    .day-tag {
        font-size: 8px;
        padding: 1px 4px;
    }

    .calendar-legend {
        gap: 12px;
    }

    .legend-item {
        font-size: 12px;
    }

    .huangli-date-picker {
        flex-direction: column;
        align-items: stretch;
    }

    .date-input {
        min-width: auto;
    }

    .huangli-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

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

    .huangli-details {
        grid-template-columns: 1fr;
    }

    .jiri-tabs {
        gap: 4px;
    }

    .jiri-tab {
        padding: 10px 16px;
        font-size: 13px;
    }

    .jiri-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .jieqi-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .jieqi-item {
        padding: 12px 8px;
    }

    .jieqi-item .name {
        font-size: 16px;
    }

    .jieqi-item .date {
        font-size: 11px;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 18px;
    }

    .logo .slogan {
        font-size: 10px;
    }

    .section {
        padding: 24px 0;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .calendar-day {
        min-height: 50px;
    }

    .day-number {
        font-size: 12px;
    }

    .lunar-day {
        font-size: 9px;
    }

    .jieqi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jiri-list {
        grid-template-columns: 1fr;
    }

    .huangli-day .day-number {
        font-size: 36px;
    }
}

@media print {
    .header,
    .footer,
    .modal,
    .toast,
    .btn-primary,
    .btn-secondary,
    .control-btn,
    .view-toggle {
        display: none !important;
    }

    .main {
        padding: 20px;
    }

    .calendar-day {
        border: 1px solid #ccc;
    }
}
