/* ========================================
   配色方案（支持动态切换）
======================================== */
:root {
    /* 默认配色 - 米白温暖 */
    --bg-primary: #F5F1E8;
    --bg-secondary: #FFFFFF;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #DDDDDD;
    --hover-bg: #E8E4DC;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    /* 日历格子背景色 */
    --calendar-cell-bg: #EFEAE0; /* 比主背景稍深一点 */
    --calendar-empty-bg: #E5E0D5; /* 空白格子更深 */
}

/* 明亮方案 - 纯白简约 */
body[data-scheme="light"] {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9F9F9;
    --text-primary: #000000;
    --text-secondary: #555555;
    --text-tertiary: #888888;
    --border-color: #E0E0E0;
    --hover-bg: #F5F5F5;
    --calendar-cell-bg: #fafafa;
    --calendar-empty-bg: #e8e8e8;
}

/* 深色方案 - 暗夜优雅 */
body[data-scheme="dark"] {
    --bg-primary: #1A1A1A;
    --bg-secondary: #2A2A2A;
    --text-primary: #EEEEEE;
    --text-secondary: #AAAAAA;
    --text-tertiary: #777777;
    --border-color: #404040;
    --hover-bg: #333333;
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-medium: rgba(255, 255, 255, 0.1);
    --shadow-heavy: rgba(255, 255, 255, 0.15);
    --calendar-cell-bg: #252525;
    --calendar-empty-bg: #1f1f1f;
}

/* 暖色方案 - 复古怀旧 */
body[data-scheme="warm"] {
    --bg-primary: #FFF8E7;
    --bg-secondary: #FFFBF0;
    --text-primary: #3E2723;
    --text-secondary: #5D4037;
    --text-tertiary: #8D6E63;
    --border-color: #D7CCC8;
    --hover-bg: #FFE8CC;
    --calendar-cell-bg: #FFF3D9;
    --calendar-empty-bg: #FFECBF;
}

/* 青色方案 - 清新自然 */
body[data-scheme="cyan"] {
    --bg-primary: #E0F7FA;
    --bg-secondary: #F0FBFC;
    --text-primary: #00695C;
    --text-secondary: #00897B;
    --text-tertiary: #4DB6AC;
    --border-color: #B2DFDB;
    --hover-bg: #B2EBF2;
    --calendar-cell-bg: #D4F1F4;
    --calendar-empty-bg: #C0E9ED;
}

/* 薰衣草方案 - 优雅梦幻 */
body[data-scheme="lavender"] {
    --bg-primary: #F3E5F5;
    --bg-secondary: #FCF8FF;
    --text-primary: #4A148C;
    --text-secondary: #6A1B9A;
    --text-tertiary: #9C27B0;
    --border-color: #E1BEE7;
    --hover-bg: #E8D5F0;
    --calendar-cell-bg: #EDDDF2;
    --calendar-empty-bg: #E1CFE9;
}

/* 桃粉方案 - 温柔浪漫 */
body[data-scheme="pink"] {
    --bg-primary: #FCE4EC;
    --bg-secondary: #FFF5F8;
    --text-primary: #880E4F;
    --text-secondary: #C2185B;
    --text-tertiary: #E91E63;
    --border-color: #F8BBD0;
    --hover-bg: #F8BBD0;
    --calendar-cell-bg: #F9DCE5;
    --calendar-empty-bg: #F5CFD9;
}

/* 橙色方案 - 活力阳光 */
body[data-scheme="orange"] {
    --bg-primary: #FFF3E0;
    --bg-secondary: #FFF8F0;
    --text-primary: #E65100;
    --text-secondary: #F57C00;
    --text-tertiary: #FF9800;
    --border-color: #FFCCBC;
    --hover-bg: #FFE0B2;
    --calendar-cell-bg: #FFEED6;
    --calendar-empty-bg: #FFE5C2;
}

/* 薄荷绿方案 - 清爽活泼 */
body[data-scheme="mint"] {
    --bg-primary: #E8F5E9;
    --bg-secondary: #F1F8F2;
    --text-primary: #1B5E20;
    --text-secondary: #2E7D32;
    --text-tertiary: #4CAF50;
    --border-color: #C8E6C9;
    --hover-bg: #C8E6C9;
    --calendar-cell-bg: #DFEEE0;
    --calendar-empty-bg: #D0E8D2;
}

/* 海蓝方案 - 深邃宁静 */
body[data-scheme="ocean"] {
    --bg-primary: #E1F5FE;
    --bg-secondary: #F0F9FF;
    --text-primary: #01579B;
    --text-secondary: #0277BD;
    --text-tertiary: #0288D1;
    --border-color: #B3E5FC;
    --hover-bg: #B3E5FC;
    --calendar-cell-bg: #D4EEFB;
    --calendar-empty-bg: #C1E7F9;
}

/* ========================================
   配色测试器
======================================== */
.color-scheme-tester {
    position: relative;
    z-index: 2000;
}

.scheme-toggle-btn {
    width: 50px;
    height: 50px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scheme-toggle-btn:hover {
    background: #555;
    transform: scale(1.1);
}

.scheme-menu {
    position: absolute;
    top: 0;
    right: 60px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    overflow-y: auto;
    max-height: 400px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.scheme-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.scheme-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}

.scheme-option:last-child {
    border-bottom: none;
}

.scheme-option:hover {
    background: #f5f5f5;
}

.scheme-option.active {
    background: #f5f5f5;
    font-weight: 600;
}

/* ========================================
   基础样式重置
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue',
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ========================================
   容器布局
======================================== */
.container {
    max-width: 960px; /* 从1200px缩小到960px，让整体更紧凑 */
    margin: 0 auto;
    padding: 0 40px;
}

/* Header 容器特殊处理：标题和导航贴边 */
.site-header .container {
    max-width: 100%; /* 全宽显示 */
    padding: 0 30px; /* 左右30px边距 */
}

/* ========================================
   Header 头部
======================================== */
.site-header {
    background-color: var(--bg-secondary); /* 使用次要背景色，与主背景区分 */
    border-bottom: 1px solid var(--border-color); /* 添加底部边框 */
    padding: 16px 0; /* 从10px增加到16px，更舒适 */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px var(--shadow-light); /* 添加轻微阴影 */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /* 确保标题和导航之间有足够间距 */
}

.site-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex-shrink: 0; /* 标题不缩小 */
}

.site-title a:hover {
    opacity: 0.7;
}

.main-nav {
    flex-shrink: 0; /* 导航不缩小 */
}

.main-nav ul {
    display: flex;
    gap: 24px; /* 从20px增加到24px */
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    white-space: nowrap; /* 导航项不换行 */
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* ========================================
   主要内容区
======================================== */
.site-main {
    padding: 30px 0 40px;
    min-height: auto;
}

/* ========================================
   月度主题区 - 三格布局
======================================== */
.layout-centered .month-theme {
    /* 居中版：月度主题占据整个 calendar-wrapper 宽度 */
    width: 100%;
    margin-bottom: 0;
    order: -1; /* 确保在最前面 */
    height: 80px;
}

/* 前月 / 后月导航框 - 与日历单元格统一的样式 */
.month-nav-box {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.month-nav-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(1) brightness(1);
}

.month-nav-box:hover {
    box-shadow: 0 12px 32px var(--shadow-heavy), 0 6px 16px var(--shadow-medium);
    transform: scale(1.05);
    z-index: 10;
}

.month-nav-box:hover::before {
    filter: saturate(1.2) brightness(1.1);
}

.nav-label {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

/* 当月主题区 - 悬浮+均匀变大+图片增强效果 */
.current-month-theme {
    position: relative;
    background-size: cover;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px var(--shadow-light);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 80px;
    padding: 8px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* 背景图片层 - 用于实现饱和度和亮度变化 */
.current-month-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(1) brightness(1);
    z-index: 0;
}

.current-month-theme:hover {
    box-shadow: 0 8px 20px var(--shadow-heavy), 0 4px 12px var(--shadow-medium);
    transform: scale(1.02);
    z-index: 10;
}

.current-month-theme:hover::before {
    filter: saturate(1.2) brightness(1.1);
}

.current-theme-title {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.current-theme-desc {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

/* 主题历史下拉菜单 */
.theme-dropdown {
    position: absolute;
    top: 100px;
    left: 0;
    width: calc(80px + 30px + (100% - 80px - 30px));
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 8px 24px var(--shadow-heavy);
    max-height: 0;
    padding: 0 15px;
    overflow: hidden;
    opacity: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.theme-dropdown.open {
    max-height: 800px;
    opacity: 1;
    padding: 15px;
    overflow-y: auto;
}

.theme-dropdown-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-light);
    padding: 8px 10px;
    height: 80px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.theme-dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: saturate(1) brightness(1);
    z-index: 0;
}

.theme-dropdown-item:hover {
    box-shadow: 0 6px 16px var(--shadow-heavy);
    transform: scale(1.02);
}

.theme-dropdown-item:hover::before {
    filter: saturate(1.2) brightness(1.1);
}

.theme-dropdown-title {
    position: relative;
    z-index: 1;
    color: white;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 4px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.theme-dropdown-desc {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

.theme-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.theme-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   左侧日期方块 + 分类
======================================== */
.date-box {
    width: 80px;
    aspect-ratio: 1; /* 正方形 */
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background-color: var(--bg-secondary);
    transition: all 0.3s ease;
}

.date-box:hover {
    border-color: var(--text-primary);
    box-shadow: 0 2px 8px var(--shadow-light);
}

.date-box .year {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1;
}

.date-box .month {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-top: 4px;
}

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

.category-link {
    font-size: 12px;
    padding: 6px 8px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-link:hover {
    background-color: var(--hover-bg);
    border-color: var(--border-color);
}

.category-link.active {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

/* ========================================
   日历区域（与标题并排）
======================================== */
.calendar-wrapper {
    position: relative;
    display: flex;
    flex-wrap: wrap; /* 允许换行，使 month-theme 独占一行 */
    gap: 30px; /* 标题和日历之间的间距 */
    margin-bottom: 40px;
}

.calendar-sidebar {
    flex-shrink: 0;
    width: 80px; /* 左侧方块宽度 */
}

.calendar-content {
    flex: 1;
}

.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    font-size: 14px;
    padding: 0 8px;
    gap: 20px;
}

.month-nav a {
    color: var(--text-secondary);
    padding: 8px 0;
    flex-shrink: 0;
}

.month-nav a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.month-nav .nav-prev {
    text-align: left;
}

.month-nav .nav-next {
    text-align: right;
}

/* 主题图片 */
.month-theme-image {
    flex: 1;
    max-width: 500px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.month-theme-image:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.month-theme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 主题文字浮层 */
.theme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.month-theme-image:hover .theme-overlay {
    opacity: 1;
}

.theme-text {
    color: white;
    font-size: 13px;
    font-weight: 500;
    padding: 0 20px;
    text-align: center;
}

/* 日历网格 */
.calendar-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px; /* 从2px改为8px，增加间距但无边框 */
    background-color: transparent; /* 移除背景色 */
}

.calendar-grid thead th {
    background-color: transparent;
    padding: 8px 6px; /* 左右padding改小 */
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-align: left; /* 改为左对齐 */
    color: var(--text-secondary);
}

.calendar-grid tbody td {
    background-color: var(--calendar-cell-bg); /* 跟随配色主题 */
    position: relative;
    width: 14.28%;
    height: 0;
    padding-bottom: 14.28%; /* 保持正方形比例 */
    border: none; /* 确保无边框 */
}

/* 占位符单元格 - 完全透明，不显示任何内容 */
.placeholder {
    background: transparent !important;
    border: none !important;
}

/* 日期格子 - 空白 */
.empty-day {
    background: var(--calendar-empty-bg); /* 跟随配色主题，比有内容格子更深 */
    position: relative;
    opacity: 1;
}

.empty-day .day-number {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 12px; /* 从14px减到12px */
    color: var(--text-tertiary);
    z-index: 1;
}

/* 日期格子 - 有内容 */
.day-cell.has-post {
    cursor: pointer;
    overflow: hidden;
}

.day-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.day-number {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 12px; /* 从14px减到12px */
    font-weight: 600; /* 从500改为600，更清晰 */
    color: #FFFFFF; /* 改为白色，在图片上更清晰 */
    z-index: 2;
    background-color: transparent; /* 移除背景色 */
    padding: 0; /* 移除padding */
    border-radius: 0; /* 移除圆角 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* 添加文字阴影增强可读性 */
    transition: all 0.3s ease;
}

.day-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.day-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    visibility: visible;
    transition: transform 0.4s ease;
}

/* 标题默认隐藏 */
.day-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 8px;
    font-size: 12px;
    color: #FFFFFF;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 2;
    line-height: 1.4;
}

/* 悬停效果 - 增强视觉反馈 */
.day-cell.has-post {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day-cell.has-post:hover {
    box-shadow: 0 8px 24px var(--shadow-heavy), 0 4px 12px var(--shadow-medium);
    transform: translateY(-4px) scale(1.02);
    z-index: 10;
}

.day-cell.has-post:hover .day-thumbnail img {
    transform: scale(1.1); /* 从1.05增加到1.1，更明显 */
    filter: brightness(1.05);
}

.day-cell.has-post:hover .day-title {
    opacity: 1;
    transform: translateY(0);
}

.day-cell.has-post:hover .day-number {
    background-color: transparent; /* 保持透明 */
    color: #FFFFFF;
    transform: scale(1.15); /* 从1.1增加到1.15 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9); /* 加强阴影 */
}

/* ========================================
   归档侧边栏
======================================== */
.archive-sidebar {
    margin-top: 30px; /* 从40px减到30px */
    padding: 20px 0; /* 减少padding，移除左右padding */
    background-color: transparent; /* 移除背景色 */
    border-radius: 0; /* 移除圆角 */
    border: none; /* 移除边框 */
}

.archive-sidebar h3 {
    font-size: 16px; /* 从18px减到16px */
    font-weight: 500; /* 从400改为500 */
    margin-bottom: 15px; /* 从20px减到15px */
    color: var(--text-primary);
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.archive-year {
    display: flex;
    align-items: center;
    gap: 15px;
}

.year-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 50px;
}

/* 12个月方格布局 */
.month-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    flex: 1;
}

.month-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    background-color: #f8f8f8;
}

.month-cell .month-num {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.month-cell .month-name {
    font-size: 8px;
    color: #999;
    margin-top: 2px;
    line-height: 1;
}

.month-cell:hover {
    background-color: #f0f0f0;
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.month-cell.active {
    background-color: #333;
    border-color: #333;
}

.month-cell.active .month-num,
.month-cell.active .month-name {
    color: white;
}

/* 无内容的月份淡化显示 */
.month-cell.empty {
    opacity: 0.4;
    cursor: default;
}

.month-cell.empty:hover {
    background-color: #f8f8f8;
    transform: none;
}

/* ========================================
   Footer 底部
======================================== */
.site-footer {
    background-color: #F5F1E8;
    border-top: 1px solid #DDDDDD;
    padding: 40px 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    font-size: 14px;
    color: #666666;
}

.social-links a:hover {
    color: #333333;
    text-decoration: underline;
}

.copyright {
    font-size: 12px;
    color: #999999;
}

/* ========================================
   响应式设计
======================================== */

/* 平板 */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .month-title {
        font-size: 36px;
    }

    .calendar-grid thead th {
        font-size: 12px;
        padding: 12px 8px;
    }

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

    .day-title {
        font-size: 11px;
        padding: 8px 6px;
    }

    .archive-year ul {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 手机 */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .site-title {
        font-size: 18px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .month-title {
        font-size: 28px;
    }

    .category-filter {
        font-size: 12px;
    }

    .calendar-grid thead th {
        font-size: 10px;
        padding: 8px 4px;
    }

    .day-number {
        font-size: 10px;
        padding: 2px 4px;
    }

    .day-title {
        font-size: 10px;
        padding: 6px 4px;
    }

    .archive-sidebar {
        padding: 20px;
    }

    .archive-year ul {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .archive-year li a {
        font-size: 12px;
        padding: 4px;
    }

    .site-footer {
        padding: 30px 0;
    }

    .social-links {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* 极小屏幕 */
@media (max-width: 480px) {
    .month-nav {
        font-size: 12px;
    }

    .calendar-grid tbody td {
        padding-bottom: 20%; /* 手机上略微减小高度 */
    }

    /* 手机上隐藏悬停标题，点击后才显示 */
    .day-title {
        display: none;
    }
}

/* ========================================
   页面加载动画
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-main {
    animation: fadeIn 0.5s ease;
}

/* ========================================
   主题历史下拉菜单（绝对定位）
======================================== */
.calendar-wrapper {
    position: relative; /* 为下拉菜单提供定位上下文 */
}

.theme-history-dropdown {
    position: absolute;
    top: 75px; /* 主题区高度60px + 间隔15px */
    left: 0;
    right: 0;
    z-index: 100;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 0;
}

.theme-history-dropdown.open {
    max-height: 600px;
    opacity: 1;
}

.theme-history-list {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 历史主题行 - 和顶部主题区一样的三格布局 */
.theme-history-row {
    display: grid;
    grid-template-columns: 150px 1fr 150px; /* 前月 | 主题 | 后月 */
    gap: 15px;
    height: 60px;
}

/* 历史主题的前月/后月按钮 - 有图片背景的平面设计 */
.theme-history-nav {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.theme-history-nav:hover {
    border-color: var(--text-primary);
    opacity: 0.9;
}

.theme-history-nav-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 历史主题的主体 - 有图片背景的平面设计 */
.theme-history-main {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.theme-history-main:hover {
    border-color: var(--text-primary);
    opacity: 0.95;
}

.theme-history-main-title {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.theme-history-main-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
