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

/* 站酷小薇行楷字体 - 通过Google Fonts加载，免费可商用 */

:root {
    --primary: #e74c3c;
    --primary-light: #ff6b6b;
    --primary-dark: #c0392b;
    --success: #27ae60;
    --warning: #e67e22;
}

:root {
    --app-font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --app-font-weight: normal;
}

body {
    font-family: var(--app-font-family, 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif) !important;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease, font-family 0.3s ease;
}

/* 确保所有文本元素继承字体 */
* {
    font-family: inherit;
}

.day-number,
.month-year,
.weekday,
.todo-header h2,
.quick-btn,
button,
input,
textarea {
    font-family: var(--app-font-family, inherit) !important;
}

/* ==================== 晴空蓝主题 ==================== */
.theme-sky {
    --accent: #3498db;
    --accent-light: #5dade2;
    --accent-dark: #2980b9;
    --today-bg: linear-gradient(135deg, #f4d03f, #f9e79f);
    --today-border: #d4ac0d;
    --today-text: #7d6608;
    --today-shadow: rgba(244, 208, 63, 0.5);
    --card-bg: rgba(93, 173, 226, 0.25);
    --card-border: rgba(93, 173, 226, 0.4);
    --cell-bg: rgba(174, 214, 241, 0.4);
    --cell-hover: rgba(93, 173, 226, 0.3);
    --input-bg: rgba(174, 214, 241, 0.5);
    --text-primary: #1a5276;
    --text-secondary: #2874a6;
    --text-muted: #5499c7;
    --border: rgba(93, 173, 226, 0.3);
    --shadow: 0 8px 32px rgba(93, 173, 226, 0.25);
    
    background: linear-gradient(180deg, #87ceeb 0%, #aed6f1 30%, #d4e6f1 60%, #e8f4fc 100%);
    color: var(--text-primary);
}

.theme-sky::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 300px 100px at 10% 15%, rgba(255, 255, 255, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 250px 80px at 85% 10%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 200px 60px at 60% 25%, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 暗夜红主题 ==================== */
.theme-night {
    --accent: #ff8c00;
    --accent-light: #ffb347;
    --accent-dark: #ff6b00;
    --today-bg: linear-gradient(135deg, #ffd700, #ff8c00);
    --today-border: #ffb347;
    --today-text: #ffffff;
    --today-shadow: rgba(255, 215, 0, 0.6);
    --card-bg: rgba(22, 33, 62, 0.9);
    --card-border: rgba(212, 175, 55, 0.3);
    --cell-bg: rgba(255, 255, 255, 0.05);
    --cell-hover: rgba(255, 215, 0, 0.2);
    --input-bg: rgba(255, 255, 255, 0.08);
    --text-primary: #eeeeee;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: rgba(212, 175, 55, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--text-primary);
}

.theme-night::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.theme-night .weekday.sunday,
.theme-night .weekday.saturday,
.theme-night .day-cell.weekend .day-number {
    color: #ffb347;
}

.theme-night .holiday-name {
    color: #d4af37;
}

.theme-night .month-year {
    color: #d4af37;
}

.theme-night .todo-header h2 {
    color: #d4af37;
}

/* ==================== 春日绿主题 ==================== */
.theme-spring {
    --accent: #27ae60;
    --accent-light: #2ecc71;
    --accent-dark: #1e8449;
    --today-bg: linear-gradient(135deg, #f9e79f, #fcf3cf);
    --today-border: #f1c40f;
    --today-text: #7d6608;
    --today-shadow: rgba(241, 196, 15, 0.5);
    --card-bg: rgba(171, 235, 198, 0.35);
    --card-border: rgba(39, 174, 96, 0.4);
    --cell-bg: rgba(171, 235, 198, 0.4);
    --cell-hover: rgba(39, 174, 96, 0.25);
    --input-bg: rgba(171, 235, 198, 0.5);
    --text-primary: #145a32;
    --text-secondary: #1e8449;
    --text-muted: #52be80;
    --border: rgba(39, 174, 96, 0.3);
    --shadow: 0 8px 32px rgba(39, 174, 96, 0.2);
    
    background: linear-gradient(180deg, #a9dfbf 0%, #abebc6 30%, #d5f5e3 60%, #eafaf1 100%);
    color: var(--text-primary);
}

.theme-spring::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 250px 80px at 15% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 200px 60px at 80% 15%, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 暖阳橙主题 ==================== */
.theme-sunset {
    --accent: #e67e22;
    --accent-light: #f39c12;
    --accent-dark: #d35400;
    --today-bg: linear-gradient(135deg, #f9e79f, #fdebd0);
    --today-border: #f39c12;
    --today-text: #7e5109;
    --today-shadow: rgba(243, 156, 18, 0.5);
    --card-bg: rgba(250, 215, 160, 0.4);
    --card-border: rgba(230, 126, 34, 0.4);
    --cell-bg: rgba(253, 235, 208, 0.5);
    --cell-hover: rgba(230, 126, 34, 0.25);
    --input-bg: rgba(253, 235, 208, 0.6);
    --text-primary: #784212;
    --text-secondary: #a04000;
    --text-muted: #dc7633;
    --border: rgba(230, 126, 34, 0.3);
    --shadow: 0 8px 32px rgba(230, 126, 34, 0.2);
    
    background: linear-gradient(180deg, #f5b041 0%, #f8c471 30%, #fdebd0 60%, #fef9e7 100%);
    color: var(--text-primary);
}

.theme-sunset::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 300px 100px at 20% 15%, rgba(255, 255, 255, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 200px 80px at 75% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 修仙主题（水墨风格） ==================== */
.theme-cultivation {
    --accent: #2c2c2c;
    --accent-light: #4a4a4a;
    --accent-dark: #1a1a1a;
    --today-bg: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    --today-border: #2c2c2c;
    --today-text: #1a1a1a;
    --today-shadow: rgba(44, 44, 44, 0.3);
    --card-bg: rgba(245, 245, 245, 0.6);
    --card-border: rgba(200, 200, 200, 0.5);
    --cell-bg: rgba(250, 250, 250, 0.5);
    --cell-hover: rgba(200, 200, 200, 0.3);
    --input-bg: rgba(255, 255, 255, 0.7);
    --text-primary: #2c2c2c;
    --text-secondary: #4a4a4a;
    --text-muted: #6a6a6a;
    --border: rgba(180, 180, 180, 0.4);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    --cultivation-bg: rgba(250, 250, 250, 0.95);
    
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 30%, #e8e8e8 60%, #f5f5f5 100%);
    color: var(--text-primary);
    /* 使用免费开源的行楷毛笔风格字体：霞鹜文楷（LXGW WenKai），OFL授权，可免费商用 */
    font-family: 'LXGW WenKai', '霞鹜文楷', 'ZCOOL XiaoWei', 'STKaiti', 'KaiTi', '楷体', serif;
    letter-spacing: 0.1em; /* 增加字间距，使行楷字体不那么紧凑 */
}

.theme-cultivation::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 400px 200px at 10% 20%, rgba(200, 200, 200, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 350px 180px at 90% 15%, rgba(180, 180, 180, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 300px 150px at 50% 80%, rgba(160, 160, 160, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.theme-cultivation .weekday.sunday,
.theme-cultivation .weekday.saturday,
.theme-cultivation .day-cell.weekend .day-number {
    color: #4a4a4a;
}

.theme-cultivation .holiday-name {
    color: #2c2c2c;
}

.theme-cultivation .month-year {
    color: #2c2c2c;
    font-size: 2rem;
    letter-spacing: 0.1em;
}

.theme-cultivation .todo-header h2 {
    color: #2c2c2c;
    letter-spacing: 0.1em;
}

/* 修仙主题下所有文字增加字间距，使行楷字体不那么紧凑 */
.theme-cultivation * {
    letter-spacing: 0.05em;
}

.theme-cultivation .day-cell {
    letter-spacing: 0;
}

.theme-cultivation .day-number {
    letter-spacing: 0.15em;
}

/* ==================== 设置按钮 ==================== */
.settings-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.settings-btn:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--accent);
    color: white;
}

/* ==================== 设置面板 ==================== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.settings-overlay.active .settings-modal {
    transform: scale(1) translateY(0);
}

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

.settings-header h3 {
    font-size: 1.3rem;
    color: var(--accent);
}

.settings-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 10px;
    margin-right: -10px;
    max-height: calc(85vh - 120px);
}

.settings-body::-webkit-scrollbar {
    width: 8px;
}

.settings-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.settings-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.settings-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Firefox滚动条样式 */
.settings-body {
    scrollbar-width: thin;
    scrollbar-color: var(--border) rgba(0, 0, 0, 0.05);
}

.settings-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.theme-option {
    padding: 15px;
    border-radius: 16px;
    background: var(--cell-bg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.theme-option:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.theme-option.active {
    border-color: var(--accent);
    background: var(--cell-hover);
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.sky-preview {
    background: linear-gradient(180deg, #87ceeb 0%, #aed6f1 50%, #d4e6f1 100%);
}

.night-preview {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.spring-preview {
    background: linear-gradient(180deg, #a9dfbf 0%, #abebc6 50%, #d5f5e3 100%);
}

.sunset-preview {
    background: linear-gradient(180deg, #f5b041 0%, #f8c471 50%, #fdebd0 100%);
}

.cultivation-preview {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 30%, #e8e8e8 60%, #f5f5f5 100%);
}

/* 字体设置 */
.settings-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.font-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.font-option {
    padding: 12px;
    border-radius: 12px;
    background: var(--cell-bg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.font-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.font-option.active {
    border-color: var(--accent);
    background: var(--cell-hover);
}

.font-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.data-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.export-data-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.import-data-btn {
    background: var(--cell-bg);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.data-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.theme-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.theme-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== 通用样式 ==================== */
.app-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 30px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* 日历区域 */
.calendar-section {
    flex: 1;
    max-width: 700px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.nav-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.month-year {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    gap: 10px;
    color: var(--accent);
}

.today-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.today-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* 星期头部 */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.weekday {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 10px 0;
}

.weekday.sunday,
.weekday.saturday {
    color: var(--primary);
}

/* 日历网格 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: var(--cell-bg);
    border: 1px solid transparent;
    min-height: 70px;
}

.day-cell:hover {
    background: var(--cell-hover);
    border-color: var(--accent);
    transform: scale(1.02);
}

.day-cell.other-month {
    opacity: 0.35;
}

.day-cell.today {
    background: var(--today-bg);
    border: 2px solid var(--today-border);
    box-shadow: 0 4px 20px var(--today-shadow), 0 0 30px var(--today-shadow);
}

/* 暗夜主题当天增强发光效果 */
.theme-night .day-cell.today {
    box-shadow: 0 4px 25px rgba(255, 215, 0, 0.8), 
                0 0 40px rgba(255, 215, 0, 0.6), 
                0 0 60px rgba(255, 140, 0, 0.4),
                inset 0 0 20px rgba(255, 215, 0, 0.2);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 4px 25px rgba(255, 215, 0, 0.8), 
                    0 0 40px rgba(255, 215, 0, 0.6), 
                    0 0 60px rgba(255, 140, 0, 0.4),
                    inset 0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 215, 0, 1), 
                    0 0 50px rgba(255, 215, 0, 0.8), 
                    0 0 70px rgba(255, 140, 0, 0.6),
                    inset 0 0 25px rgba(255, 215, 0, 0.3);
    }
}

.day-cell.today .day-number {
    color: var(--today-text);
    font-weight: 700;
}

.day-cell.selected {
    background: var(--cell-hover);
    border-color: var(--accent);
}

.day-cell.weekend .day-number {
    color: var(--primary);
}

.day-cell.holiday {
    background: rgba(231, 76, 60, 0.15);
}

.day-cell.holiday::before {
    content: '休';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
    background: var(--primary);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.day-cell.workday {
    background: rgba(230, 126, 34, 0.15);
}

.day-cell.workday::before {
    content: '班';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
    background: var(--warning);
    color: white;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.day-number {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    font-family: var(--app-font-family, inherit);
}

/* 修仙主题下日历数字更大，字间距更宽 */
.theme-cultivation .day-number {
    font-size: 1.3rem;
    letter-spacing: 0.15em;
    line-height: 1.4;
}

/* 行楷、楷体、宋体、剑豪体字体下，日历数字加粗 */
body[data-font="xingkai"] .day-number,
body[data-font="kaiti"] .day-number,
body[data-font="songti"] .day-number,
body[data-font="jianhao"] .day-number {
    font-weight: 700;
}

.holiday-name {
    font-size: 0.65rem;
    color: var(--primary);
    margin-top: 2px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.todo-indicator {
    position: absolute;
    bottom: 6px;
    display: flex;
    gap: 3px;
}

.todo-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.todo-dot.more {
    background: var(--text-secondary);
}

/* 重要日期云彩图标 */
.important-date-cloud {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    z-index: 10;
    animation: cloudFloat 3s ease-in-out infinite;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(74, 144, 226, 0.35));
}

.important-date-cloud svg {
    width: 100%;
    height: 100%;
}

.day-cell.has-important-date {
    position: relative;
}

@keyframes cloudFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-4px) translateX(1px);
    }
    50% {
        transform: translateY(-6px) translateX(0);
    }
    75% {
        transform: translateY(-4px) translateX(-1px);
    }
}

/* 云雾效果层 */
.mist-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;
}

.mist-overlay.fade-out {
    animation: mistFadeOut 1s ease-out forwards;
}

@keyframes mistFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.mist-cloud {
    position: absolute;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.1) 70%, transparent 100%);
    border-radius: 50%;
    filter: blur(50px);
    animation: mistFloat 15s infinite ease-in-out;
    opacity: 0.8;
}

.mist-cloud-1 {
    width: 300px;
    height: 200px;
    top: 10%;
    left: 5%;
    animation-duration: 18s;
    animation-delay: 0s;
}

.mist-cloud-2 {
    width: 400px;
    height: 250px;
    top: 40%;
    right: 10%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.mist-cloud-3 {
    width: 350px;
    height: 220px;
    bottom: 20%;
    left: 20%;
    animation-duration: 16s;
    animation-delay: 4s;
}

.mist-cloud-4 {
    width: 280px;
    height: 180px;
    top: 60%;
    left: 50%;
    animation-duration: 22s;
    animation-delay: 1s;
}

.mist-cloud-5 {
    width: 320px;
    height: 200px;
    bottom: 30%;
    right: 20%;
    animation-duration: 19s;
    animation-delay: 3s;
}

@keyframes mistFloat {
    0%, 100% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translateX(30px) translateY(-20px) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translateX(-25px) translateY(15px) scale(0.9);
        opacity: 0.85;
    }
    75% {
        transform: translateX(15px) translateY(-15px) scale(1.05);
        opacity: 0.88;
    }
}

/* 图例 */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

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

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

.legend-dot.holiday {
    background: var(--primary);
}

.legend-dot.workday {
    background: var(--warning);
}

.legend-dot.has-todo {
    background: var(--success);
}

/* 待办事项区域 */
.todo-section {
    flex: 1;
    max-width: 450px;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.5s ease-out 0.1s both;
}

.daily-record {
    margin-top: 20px;
}

.record-card,
.record-empty {
    background: var(--cell-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 20px;
}

.record-empty h3,
.record-card h3 {
    color: var(--text-primary);
    margin-bottom: 6px;
}

.record-empty p,
.record-card-header p,
.record-footer-tip {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.record-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.record-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.record-progress {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
}

.record-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mood-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.mood-option {
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.45);
    color: var(--text-primary);
    border-radius: 14px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.mood-option:hover,
.mood-option.active {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.record-textarea {
    width: 100%;
    resize: vertical;
    min-height: 90px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    color: var(--text-primary);
    padding: 14px 16px;
    outline: none;
}

.summary-textarea {
    min-height: 72px;
}

div[contenteditable]:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    cursor: text;
}

div[contenteditable] img {
    max-width: 100%;
    margin: 8px 0;
    border-radius: 8px;
    align-self: center;
}

.habit-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.habit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.42);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s ease;
}

.habit-item.checked {
    border-color: var(--success);
    background: rgba(39, 174, 96, 0.12);
}

.habit-item input {
    width: 18px;
    height: 18px;
}

.record-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-save-btn {
    align-self: flex-start;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.record-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.todo-header {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.todo-header-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.todo-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
    flex: 1;
    min-width: 200px;
}

.quick-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    font-family: var(--app-font-family, inherit);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.quick-btn svg {
    flex-shrink: 0;
}

.quick-add-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.quick-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-export-btn {
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: white;
}

.quick-journal-btn {
    background: linear-gradient(135deg, #6c5ce7, #8e7dff);
    color: white;
}

.quick-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.quick-btn:active {
    transform: translateY(0);
}

/* 导出下拉菜单 */
.export-dropdown {
    position: relative;
}

.export-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.export-dropdown.active .export-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.export-menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.export-menu-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.export-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

.export-menu-item:hover {
    background: var(--accent);
    color: white;
}

.export-menu-item:active {
    background: var(--accent-dark);
}

/* 自定义时间段选择弹窗 */
.custom-date-modal {
    max-width: 500px;
}

.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

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

.date-input-group label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.date-input {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.date-range-tips {
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-height: 40px;
    display: flex;
    align-items: center;
}

.date-range-tips.error {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    color: #e74c3c;
}

.date-range-tips.success {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
    color: #27ae60;
}

.holiday-info {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

/* 待办输入区域 */
.todo-input-area {
    margin-bottom: 20px;
}

.todo-input-main {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

#todoInput {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#todoInput:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#todoInput::placeholder {
    color: var(--text-muted);
}

.time-input {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 120px;
    flex-shrink: 0;
}

.time-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.subtask-input-area {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    padding-left: 20px;
    border-left: 3px solid var(--accent);
}

#subtaskInput {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#subtaskInput:focus {
    outline: none;
    border-color: var(--accent);
}

.subtask-add-btn {
    background: var(--accent);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.subtask-add-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

.todo-input-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.toggle-subtask-btn {
    background: transparent;
    border: 1px solid var(--border);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.toggle-subtask-btn:hover {
    background: var(--cell-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.toggle-subtask-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.add-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 待办列表 */
.todo-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: var(--cell-bg);
    border-radius: 3px;
}

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

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 15px;
}

.empty-state svg {
    opacity: 0.4;
    stroke: var(--text-muted);
}

.empty-state p {
    font-size: 0.95rem;
}

/* 待办项 */
.todo-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--cell-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.todo-item:hover {
    background: var(--cell-hover);
    border-color: var(--border);
}

.todo-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.todo-checkbox:hover {
    border-color: var(--success);
}

.todo-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.todo-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
}

.todo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.todo-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-word;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.todo-time {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.todo-time svg {
    width: 14px;
    height: 14px;
}

.todo-subtasks {
    margin-top: 8px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.todo-subtask {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 0;
}

.todo-subtask.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-subtask-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.todo-subtask-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.todo-subtask-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.todo-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.todo-item:hover .todo-actions {
    opacity: 1;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: var(--cell-hover);
}

.action-btn.edit:hover {
    color: var(--accent);
}

.action-btn.delete:hover {
    color: var(--primary);
}

/* 弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--accent);
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

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

.modal-body {
    margin-bottom: 25px;
}

.edit-modal {
    max-width: 500px;
}

.edit-input-group {
    margin-bottom: 20px;
}

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

#editInput {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

#editInput:focus {
    outline: none;
    border-color: var(--accent);
}

#editTime {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

#editTime:focus {
    outline: none;
    border-color: var(--accent);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.important-date-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.cloud-icon-small {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0.7;
}

.important-date-checkbox:checked ~ .cloud-icon-small {
    opacity: 1;
    animation: cloudFloat 2s ease-in-out infinite;
}

@keyframes cloudFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.edit-subtasks-section {
    margin-top: 20px;
}

.edit-subtasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.edit-subtasks-header label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.add-subtask-in-edit {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.add-subtask-in-edit svg {
    flex-shrink: 0;
}

.add-subtask-in-edit:hover {
    background: var(--cell-hover);
    border-color: var(--accent);
}

.edit-subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-subtask-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: var(--cell-bg);
    border-radius: 8px;
}

.edit-subtask-item input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 4px 8px;
}

.edit-subtask-item input:focus {
    outline: 1px solid var(--accent);
    border-radius: 4px;
}

.edit-subtask-item .remove-subtask {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-subtask-item .remove-subtask:hover {
    background: rgba(231, 76, 60, 0.1);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cancel-btn,
.save-btn {
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background: var(--cell-hover);
    color: var(--text-primary);
}

.save-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 1000px) {
    .app-container {
        flex-direction: column;
        padding: 20px;
        padding-top: 80px;
    }
    
    .calendar-section,
    .todo-section {
        max-width: 100%;
    }
    
    .todo-section {
        min-height: 400px;
    }

    .mood-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 500px) {
    .calendar-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .today-btn {
        margin-left: 0;
    }
    
    .month-year {
        font-size: 1.4rem;
    }
    
    .day-cell {
        min-height: 55px;
    }
    
    .day-number {
        font-size: 0.95rem;
    }
    
    .holiday-name {
        font-size: 0.55rem;
    }
    
    .legend {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .quick-btn,
    .data-btn,
    .record-save-btn {
        width: 100%;
        justify-content: center;
    }

    .record-card-header {
        flex-direction: column;
    }

    .mood-options,
    .habit-list,
    .font-grid {
        grid-template-columns: 1fr 1fr;
    }

    .share-link-area {
        flex-direction: column;
    }
}

/* ==================== 顺延待办样式 ==================== */

/* 待办内容容器 */
.todo-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* 顺延标签 */
.carried-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--warning);
    background: rgba(230, 126, 34, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
    font-weight: 500;
}

/* 顺延的待办项 */
.todo-item.carried-over {
    border-left: 3px solid var(--warning);
}

.todo-item.carried-over .todo-text {
    color: var(--text-primary);
}

/* 顺延通知 */
.export-success-tip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--success), #2ecc71);
    color: white;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.export-success-tip.show {
    opacity: 1;
    transform: translateY(0);
}

.carry-over-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.carry-over-notification svg {
    color: var(--warning);
    flex-shrink: 0;
}

.carry-over-notification span {
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==================== 分享功能样式 ==================== */

/* 分享按钮 */
.share-btn {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.share-btn:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: white;
}

/* 分享面板 */
.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.share-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.share-overlay.active .share-modal {
    transform: scale(1) translateY(0);
}

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

.share-header h3 {
    font-size: 1.3rem;
    color: var(--accent);
}

.share-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--cell-bg);
    border-radius: 12px;
}

.circle-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.circle-fields input {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-primary);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-primary);
}

.share-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.share-link-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#shareLink {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: monospace;
    word-break: break-all;
}

.copy-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.copy-btn.copied {
    background: var(--success);
}

.share-actions {
    margin-bottom: 20px;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.share-tips {
    background: var(--cell-bg);
    border-radius: 12px;
    padding: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.share-tips p {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.share-tips ul {
    margin-left: 20px;
    line-height: 1.8;
}

.share-tips li {
    margin-bottom: 4px;
}

/* 复制成功提示 */
.copy-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px 30px;
    box-shadow: var(--shadow);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.copy-success.show {
    opacity: 1;
    pointer-events: auto;
}

.copy-success span {
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-success svg {
    color: var(--success);
}

/* ==================== 境界系统 ==================== */
.cultivation-btn {
    position: fixed;
    top: 140px;
    right: 20px;
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.cultivation-btn:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: white;
}

/* 境界面板 */
.cultivation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cultivation-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cultivation-panel {
    border: 1px solid var(--card-border);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    backdrop-filter: none;
    opacity: 1;
    /* 确保完全不透明 - 使用纯色背景，不使用rgba */
    background-color: #E6F2FF;
}

/* 根据主题设置完全不透明背景 */
.theme-sky .cultivation-panel {
    background: #E6F2FF;
    background-color: #E6F2FF;
}

.theme-night .cultivation-panel {
    background: #2C3E50;
    background-color: #2C3E50;
}

.theme-spring .cultivation-panel {
    background: #E8F5E9;
    background-color: #E8F5E9;
}

.theme-sunset .cultivation-panel {
    background: #FFF3E0;
    background-color: #FFF3E0;
}

.cultivation-overlay.active .cultivation-panel {
    transform: scale(1);
}

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

.cultivation-header h2 {
    color: var(--text-primary);
    font-size: 24px;
}

.cultivation-body {
    padding: 20px;
}

.current-realm-section {
    text-align: center;
    margin-bottom: 30px;
}

.realm-display {
    margin-bottom: 20px;
}

.realm-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: bold;
}

.realm-progress {
    margin-top: 30px;
}

.progress-label {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.realm-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.realm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.realm-item.reached {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--accent);
}

.realm-item.current {
    background: rgba(52, 152, 219, 0.4);
    border-color: var(--accent);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.realm-name {
    color: var(--text-primary);
    font-size: 16px;
}

.realm-check {
    color: var(--success);
    font-size: 20px;
    font-weight: bold;
}

/* 勋章样式 */
.medal-container {
    display: inline-block;
    position: relative;
    margin: 20px;
}

.medal {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px var(--glow-color, #4A90E2);
    animation: medalGlow 2s ease-in-out infinite;
}

.medal-basic .medal {
    background: linear-gradient(135deg, #E6F2FF, #B8D4F0);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
}

.medal-advanced .medal {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.medal-epic .medal {
    background: linear-gradient(135deg, #FF6B9D, #FF1493);
    box-shadow: 0 0 25px rgba(255, 107, 157, 0.7);
    animation: medalGlow 1.5s ease-in-out infinite;
}

.medal-legendary .medal {
    background: linear-gradient(135deg, #9D4EDD, #6A0DAD);
    box-shadow: 0 0 30px rgba(157, 78, 221, 0.8);
    animation: medalGlow 1s ease-in-out infinite;
}

.medal-mythic .medal {
    background: linear-gradient(135deg, #FF4500, #FF6347);
    box-shadow: 0 0 40px rgba(255, 69, 0, 0.9);
    animation: medalGlow 0.8s ease-in-out infinite;
}

.medal-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--glow-color, #4A90E2);
}

.medal-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
}

.medal-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.medal-particles::before,
.medal-particles::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--glow-color, #4A90E2);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

.medal-particles::before {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.medal-particles::after {
    top: 60%;
    right: 20%;
    animation-delay: 1.5s;
}

@keyframes medalGlow {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow-color, #4A90E2);
    }
    50% {
        box-shadow: 0 0 40px var(--glow-color, #4A90E2);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 0.3;
    }
}

/* 升级动画 */
.level-up-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.level-up-animation.show {
    opacity: 1;
    visibility: visible;
}

.level-up-content {
    text-align: center;
    animation: levelUpPulse 0.5s ease-out;
}

.level-up-text {
    font-size: 48px;
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #FFD700;
    animation: textShine 2s ease-in-out infinite;
}

.level-up-realm {
    font-size: 32px;
    color: white;
    margin-bottom: 30px;
}

@keyframes levelUpPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes textShine {
    0%, 100% {
        text-shadow: 0 0 20px #FFD700;
    }
    50% {
        text-shadow: 0 0 40px #FFD700, 0 0 60px #FFD700;
    }
}

/* 惩罚通知 */
.punishment-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1500;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.punishment-notification.important {
    background: rgba(192, 57, 43, 0.95);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    25% { transform: translateX(-52%) translateY(0); }
    75% { transform: translateX(-48%) translateY(0); }
}

/* 满级奖励模态框 */
.max-level-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.max-level-reward-modal.show {
    opacity: 1;
    visibility: visible;
}

.reward-content {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.max-level-reward-modal.show .reward-content {
    transform: scale(1);
}

.reward-title {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.reward-quote {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
    font-style: italic;
}

.reward-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.reward-close-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.reward-close-btn:hover {
    background: var(--accent-dark);
    transform: scale(1.05);
}

/* ================== 提醒提示样式 ================== */
.reminder-tip {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    min-width: 280px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.reminder-tip.show {
    opacity: 1;
    transform: translateX(0);
}

.reminder-tip-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.reminder-tip-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.reminder-tip-text {
    flex: 1;
}

.reminder-tip-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 4px;
}

.reminder-tip-desc {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.reminder-tip-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ================== 现代化布局（双视图） ================== */
.top-nav {
    position: sticky;
    top: 8px;
    z-index: 120;
    margin: 16px auto 0;
    width: min(1280px, calc(100% - 32px));
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 30px rgba(23, 45, 80, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

body.nav-hidden .top-nav {
    transform: translateY(-120%);
    opacity: 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-dot {
    display: none;
}

.brand-block h1 {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.brand-block p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.journal-back-link {
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
}

.view-switch {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--card-border);
}

.view-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
}

.view-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.14);
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

.app-container {
    margin-top: 6px;
}

.calendar-section,
.todo-section,
.journal-sidebar,
.journal-content {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 34px rgba(31, 56, 96, 0.14);
}

.journal-view {
    max-width: 1400px;
    margin: 14px auto 40px;
    padding: 0 20px;
}

.journal-view.standalone {
    display: block;
    margin-top: 22px;
}

.journal-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    width: 100%;
}

.journal-sidebar {
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.journal-sidebar h3 {
    color: var(--text-primary);
}

.journal-date-picker {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-primary);
    padding: 10px 12px;
}

.journal-hint {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.journal-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow: auto;
    padding-right: 2px;
}

.timeline-item {
    border: 1px solid var(--card-border);
    background: var(--cell-bg);
    border-radius: 12px;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-item:hover,
.timeline-item.active {
    border-color: var(--accent);
    background: rgba(52, 152, 219, 0.15);
}

.timeline-date {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.timeline-text {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.timeline-empty {
    padding: 12px;
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--cell-bg);
    font-size: 0.86rem;
}

.journal-content {
    border-radius: 20px;
    padding: 24px;
}

.journal-paper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.94));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 20px 40px rgba(20, 40, 80, 0.08);
}

.journal-entry-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.journal-entry-head h2 {
    color: var(--text-primary);
    font-size: 1.45rem;
}

.journal-entry-head p {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.diary-textarea {
    min-height: 260px;
    line-height: 1.85;
    background-image: none;
    background-color: rgba(255, 248, 232, 0.86);
    border-radius: 14px;
    border: 1px solid rgba(45, 69, 108, 0.16);
    padding: 16px;
}

.quick-media-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 12px;
}

.media-btn {
    border: 1px solid rgba(52, 152, 219, 0.35);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.16), rgba(52, 152, 219, 0.08));
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.86rem;
    cursor: pointer;
}

.media-tip {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.entry-gallery {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.entry-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.85);
    min-height: 132px;
}

.entry-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.remove-photo-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 999px;
    background: rgba(18, 22, 30, 0.66);
    color: #fff;
    cursor: pointer;
}

.gallery-empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.settings-btn {
    top: 92px;
}

.share-btn {
    top: 150px;
}

.cultivation-btn {
    top: 208px;
}

@media (max-width: 1100px) {
    .journal-shell {
        grid-template-columns: 1fr;
    }

    .journal-timeline {
        max-height: 260px;
    }
}

@media (max-width: 700px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-switch {
        width: 100%;
    }

    .view-btn {
        flex: 1;
    }

    .journal-content,
    .journal-paper {
        padding: 16px;
    }

    .journal-entry-head {
        flex-direction: column;
    }
}

/* ================== 二次改版：更现代的主界面风格 ================== */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 16%, rgba(116, 185, 255, 0.16), transparent 35%),
        radial-gradient(circle at 10% 78%, rgba(129, 236, 236, 0.14), transparent 36%);
    z-index: 0;
}

.dashboard-strip {
    width: min(1280px, calc(100% - 32px));
    margin: 14px auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    position: relative;
    z-index: 2;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

body.nav-hidden .dashboard-strip {
    transform: translateY(-120%);
    opacity: 0.15;
}

.stat-card {
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(240, 248, 255, 0.78));
    box-shadow: 0 10px 28px rgba(31, 56, 96, 0.12);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.app-container.view-panel.active {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: start;
}

.calendar-section,
.todo-section,
.journal-sidebar,
.journal-content,
.top-nav {
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 48px rgba(17, 35, 68, 0.16);
}

.calendar-section {
    min-height: 760px;
}

.todo-section {
    min-height: 760px;
}

.todo-header {
    position: sticky;
    top: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.55));
    backdrop-filter: blur(8px);
    z-index: 4;
    border-radius: 14px;
    padding: 14px;
    margin: -8px -8px 14px;
}

.privacy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.journal-view {
    margin-top: 12px;
}

.journal-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 128px);
}

.journal-content {
    min-height: 760px;
}

@media (max-width: 1200px) {
    .app-container.view-panel.active {
        grid-template-columns: 1fr;
    }

    .calendar-section,
    .todo-section,
    .journal-content {
        min-height: auto;
    }
}

@media (max-width: 700px) {
    .settings-btn,
    .share-btn,
    .cultivation-btn {
        right: 12px;
    }

    .settings-btn {
        top: auto;
        bottom: 18px;
    }

    .share-btn {
        top: auto;
        bottom: 74px;
    }

    .cultivation-btn {
        top: auto;
        bottom: 130px;
    }

    .dashboard-strip {
        grid-template-columns: 1fr;
    }

    .circle-fields {
        grid-template-columns: 1fr;
    }

    .quick-media-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}

/* ================== 纸张 / 台历质感增强（覆盖） ================== */
body {
    padding-top: 108px;
}

body.journal-page {
    padding-top: 96px;
}

.top-nav {
    position: fixed;
    top: 10px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 140;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.9));
}

body.nav-hidden .top-nav {
    transform: translate(-50%, -140%);
    opacity: 0;
    pointer-events: none;
}

.dashboard-strip {
    margin-top: 0;
}

.app-container {
    margin-top: 16px;
}

.stat-card {
    position: relative;
    border-radius: 12px;
    border: 1px solid rgba(206, 214, 228, 0.9);
    box-shadow: 0 8px 20px rgba(30, 45, 77, 0.12);
}

.stat-card:nth-child(1) { transform: rotate(-1.2deg); }
.stat-card:nth-child(2) { transform: rotate(0.6deg); }
.stat-card:nth-child(3) { transform: rotate(-0.7deg); }

.stat-card::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 16px;
    width: 38px;
    height: 14px;
    border-radius: 4px;
    background: rgba(255, 228, 150, 0.82);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

.calendar-section {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.92));
    border: 1px solid rgba(214, 222, 236, 0.9);
}

.calendar-section::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    width: 180px;
    height: 20px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(238, 243, 252, 0.95);
    border: 1px solid rgba(211, 220, 235, 0.9);
}

.calendar-section::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 18px;
    pointer-events: none;
    border: 1px dashed rgba(181, 196, 223, 0.4);
}

.todo-section,
.journal-content,
.journal-sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 255, 0.9));
    border: 1px solid rgba(214, 222, 236, 0.92);
}

.journal-paper {
    position: relative;
    background:
        radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.65) 0 18%, transparent 44%),
        radial-gradient(circle at 86% 72%, rgba(210, 174, 112, 0.12) 0 20%, transparent 48%),
        linear-gradient(180deg, rgba(251, 241, 212, 0.94), rgba(242, 224, 178, 0.9));
    padding-left: 22px;
}

.journal-paper::before {
    content: "";
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 14px;
    width: 2px;
    background: rgba(164, 125, 65, 0.24);
}

@media (max-width: 700px) {
    body {
        padding-top: 96px;
    }
}

/* ================== 进一步纸张化：功能模块统一纸质卡片 ================== */
.top-nav,
.stat-card,
.calendar-section,
.todo-section,
.todo-header,
.journal-sidebar,
.journal-content,
.journal-paper,
.settings-modal,
.share-modal,
.cultivation-panel,
.modal {
    background:
        radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.88) 0 26%, transparent 55%),
        radial-gradient(circle at 82% 24%, rgba(230, 214, 184, 0.18) 0 24%, transparent 58%),
        radial-gradient(circle at 30% 72%, rgba(220, 200, 165, 0.14) 0 22%, transparent 56%),
        linear-gradient(180deg, rgba(255, 251, 241, 0.96), rgba(250, 243, 227, 0.95));
    border: 1px solid rgba(191, 168, 132, 0.45) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 24px rgba(105, 82, 52, 0.16) !important;
}

.top-nav::after,
.calendar-section::before,
.todo-section::before,
.journal-content::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 18px;
    width: 42px;
    height: 14px;
    border-radius: 3px;
    background: rgba(233, 207, 150, 0.85);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.top-nav {
    position: fixed;
}

.calendar-section,
.todo-section,
.journal-content {
    position: relative;
}

.dashboard-strip {
    gap: 18px;
}

.calendar-header,
.weekdays,
.legend,
.todo-header {
    background: rgba(255, 252, 246, 0.7);
    border-radius: 14px;
}

.day-cell {
    background: linear-gradient(180deg, rgba(255, 249, 236, 0.92), rgba(248, 240, 220, 0.92)) !important;
    border: 1px solid rgba(196, 173, 136, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.day-cell:hover {
    background: linear-gradient(180deg, rgba(255, 246, 224, 0.98), rgba(248, 232, 197, 0.96)) !important;
}

.record-section,
.todo-item,
.timeline-item,
.habit-item {
    background: rgba(255, 252, 245, 0.7);
    border: 1px solid rgba(196, 173, 136, 0.24);
    border-radius: 12px;
}

/* ==================== 交付级产品质感优化 (Product Delivery Polish) ==================== */

/* 1. 按钮悬浮弹性缩放微动画 */
button, .nav-btn, .quick-btn, .data-btn, .today-btn, .copy-btn, .generate-btn, .save-btn, .cancel-btn {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s ease, box-shadow 0.3s ease !important;
}
button:active, .nav-btn:active, .quick-btn:active, .data-btn:active, .today-btn:active, .copy-btn:active, .generate-btn:active, .save-btn:active, .cancel-btn:active {
    transform: scale(0.92) !important;
}

/* 2. 增强玻璃拟物化质感 (Glassmorphism) */
.modal, .settings-modal, .share-modal, .custom-date-modal, .cultivation-panel {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    transform-origin: center center;
}

/* 暗色主题毛玻璃适配 */
.theme-night .modal, .theme-night .settings-modal, .theme-night .share-modal, .theme-night .custom-date-modal, .theme-night .cultivation-panel {
    background: rgba(22, 33, 62, 0.65) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* 水墨主题毛玻璃适配 */
.theme-cultivation .modal, .theme-cultivation .settings-modal, .theme-cultivation .share-modal, .theme-cultivation .custom-date-modal, .theme-cultivation .cultivation-panel {
    background: rgba(245, 245, 245, 0.8) !important;
    border: 1px solid rgba(180, 180, 180, 0.3) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* 3. 丝滑弹性弹出动效 */
@keyframes bouncyModalPop {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay.active .modal,
.settings-overlay.active .settings-modal,
.share-overlay.active .share-modal,
.custom-date-modal-overlay.active .custom-date-modal,
.cultivation-overlay.active .cultivation-panel {
    animation: bouncyModalPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

/* 渐隐模糊遮罩层 */
.modal-overlay, .settings-overlay, .share-overlay, .cultivation-overlay {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

/* ==================== 产品架构与视觉重塑 V2 ==================== */

/* 1. 布局平衡：日历和待办并排等宽 */
.app-container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 24px;
    gap: 24px;
}
.calendar-section {
    flex: 1 !important;
    max-width: 700px !important;
    min-width: 0;
    padding: 28px !important;
}
.todo-section {
    flex: 1 !important;
    max-width: 700px !important;
    min-width: 0;
}

/* 2. 视觉降噪：柔和渐变背景 */
body {
    background: linear-gradient(160deg, #eef2f7 0%, #e8edf5 40%, #f0f4fa 100%) !important;
}
body::before {
    opacity: 0.15 !important;
}

/* 3. 3D图钉优化：移到左上角 */
.stat-card::before, .calendar-section::before, .todo-section::before, .journal-sidebar::before, .journal-content::before {
    content: '' !important;
    position: absolute !important;
    top: 12px !important;
    left: 50% !important;
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d4d4d4 45%, #9a9a9a 100%) !important;
    box-shadow:
        inset -1px -1px 3px rgba(0,0,0,0.2),
        inset 1px 1px 2px rgba(255,255,255,0.9),
        1px 3px 5px rgba(0,0,0,0.2),
        0 6px 10px rgba(0,0,0,0.08) !important;
    transform: translateX(-50%) !important;
    border: 1px solid rgba(255,255,255,0.85) !important;
    z-index: 10;
}
.stat-card, .calendar-section, .todo-section, .journal-sidebar, .journal-content {
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.7) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
    position: relative;
}

/* 隐藏 brand-dot */
.brand-dot { display: none !important; }

/* 4. Empty State */
.empty-state.action-oriented { padding: 40px 20px; }
.empty-icon-wrapper {
    background: var(--card-bg); width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.primary-action-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark)) !important;
    color: white !important; font-size: 1.1rem; font-weight: bold;
    padding: 14px 32px; border-radius: 30px; border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); margin: 10px 0 30px 0; cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.primary-action-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.2); }
.template-actions { text-align: center; border-top: 1px dashed var(--border); padding-top: 20px; width: 100%; }
.template-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.template-btn {
    background: var(--cell-bg); border: 1px solid var(--border); color: var(--text-primary);
    padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; cursor: pointer;
    transition: all 0.2s ease;
}
.template-btn:hover { background: var(--cell-hover); border-color: var(--accent); transform: translateY(-2px); }

/* 5. 设置开关样式 */
.toggle-option { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; cursor: pointer; }
.toggle-option span { font-size: 0.95rem; color: var(--text-primary); }
.toggle-switch {
    position: relative; width: 44px; height: 24px; background: #ccc; border-radius: 12px;
    transition: background 0.3s ease; cursor: pointer; flex-shrink: 0;
}
.toggle-switch::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
    border-radius: 50%; background: white; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.toggle-switch.active { background: var(--accent); }
.toggle-switch.active::after { transform: translateX(20px); }

/* 6. 农历文字 */
.day-lunar { font-size: 0.6rem; color: var(--text-secondary); opacity: 0.65; line-height: 1; margin-top: 1px; white-space: nowrap; }

/* 7. 成长奖励徽章 */
.reward-badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
    border-radius: 12px; background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.1));
    border: 1px solid rgba(255,215,0,0.3); font-size: 0.8rem; color: #b8860b; margin-top: 4px;
}
.realm-item .reward-badge { font-size: 0.7rem; padding: 2px 8px; }


