/* 重置样式和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS变量 - iOS设计系统 */
:root {
    /* 主题色 - 粉红色系 */
    --primary-color: #FC5C7C;
    --primary-light: #FF8FA3;
    --primary-dark: #E84A68;
    --secondary-color: #FF6B8A;
    --secondary-light: #FFB6C1;
    --secondary-dark: #FF1744;

    /* 中性色 */
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;
    --background-primary: #FFFFFF;
    --background-secondary: #F2F2F7;
    --background-tertiary: #E5E5EA;

    /* 功能色 */
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;

    /* 阴影 */
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* 圆角 */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 20px;
    --radius-extra-large: 28px;

    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* 动画 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础字体和背景 - 优化版 */
body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    line-height: 1.5;
    color: var(--text-primary);
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE5F1 50%, #FFF0F5 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition-slow);
}

/* 主题切换过渡效果 - 只对常规属性应用 */

/* 应用容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 顶部导航 - 紧凑版 */
.header {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg,
        rgba(255, 245, 247, 0.98) 0%,
        rgba(255, 229, 241, 0.95) 50%,
        rgba(255, 240, 245, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--background-tertiary);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

/* 心型装饰背景 */
.header::before {
    content: '♥';
    position: absolute;
    font-size: 120px;
    color: rgba(252, 92, 124, 0.15);
    top: -20px;
    right: 50%;
    transform: translateX(50%);
    animation: heartFloat 6s ease-in-out infinite;
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 0;
}

.header::after {
    content: '♥';
    position: absolute;
    font-size: 80px;
    color: rgba(255, 107, 138, 0.12);
    bottom: -15px;
    left: 15%;
    animation: heartFloat 8s ease-in-out infinite reverse;
    pointer-events: none;
    will-change: transform, opacity;
    z-index: 0;
}

@keyframes heartFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-15px) rotate(8deg);
        opacity: 1;
    }
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* 右侧爱心装饰 */
.header-content::before {
    content: '♥';
    position: absolute;
    font-size: 90px;
    color: rgba(255, 107, 138, 0.12);
    top: -25px;
    right: 10%;
    animation: heartFloat 7s ease-in-out infinite;
    animation-delay: 1s;
    pointer-events: none;
    will-change: transform, opacity;
    z-index: -1;
}

.header-left {
    text-align: center;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
}

/* 主题切换按钮 */
.theme-toggle {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(252, 92, 124, 0.2);
    border-radius: var(--radius-medium);
    padding: var(--spacing-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-width: 44px;
    min-height: 44px;
}

.theme-toggle:hover {
    background: rgba(252, 92, 124, 0.15);
    transform: scale(1.05);
    border-color: rgba(252, 92, 124, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-icon {
    font-size: 18px;
    transition: all var(--transition-medium);
    display: inline-block;
}

.theme-icon.rotate {
    transform: rotate(360deg);
}

.app-title {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.app-title::after {
    content: '✨';
    position: absolute;
    right: -30px;
    top: -5px;
    font-size: 18px;
    animation: sparkle 2s ease-in-out infinite;
    will-change: transform, opacity;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(15deg);
    }
}

.app-subtitle {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.85;
}

/* 加载状态 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-tertiary);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-md);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* 主要内容区域 - 紧凑版 */
.main-content {
    flex: 1;
    padding: 0 var(--spacing-md) var(--spacing-md);
}

/* 头图区域 - 精美渐变设计 + 动态效果 */
.app-hero {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 24px auto 32px;
    padding: 48px 32px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.92) 50%,
        rgba(255, 250, 252, 0.9) 100%);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(252, 92, 124, 0.12), 0 2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: heroFadeIn 0.8s ease-out;
}

/* 装饰性光晕 - 增强动画效果 */
.app-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(252, 92, 124, 0.25) 0%, rgba(255, 139, 163, 0.15) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 4s ease-in-out infinite, pulse 3s ease-in-out infinite;
}

.app-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.3) 0%, rgba(255, 139, 163, 0.18) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 5s ease-in-out infinite reverse, pulse 4s ease-in-out infinite 0.5s;
}

.app-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

/* 左右装饰元素 */
.app-hero-decor {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
    pointer-events: none;
}

.app-hero-decor-left {
    left: 16px;
}

.app-hero-decor-right {
    right: 16px;
}

.hero-emoji {
    font-size: 20px;
    display: inline-block;
    filter: drop-shadow(0 2px 8px rgba(252, 92, 124, 0.3));
    animation: emojiFloat 3s ease-in-out infinite, emojiRotate 4s ease-in-out infinite;
    opacity: 0;
    animation-fill-mode: forwards;
    line-height: 1;
}

/* Emoji动画 */
@keyframes emojiFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        opacity: 0.95;
    }
}

@keyframes emojiRotate {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.app-hero-title {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, #FC5C7C 0%, #FF8FA3 50%, #FFB6C1 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    letter-spacing: 2px;
    animation: titleSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), gradientShift 3s ease infinite, titleBounce 2s ease-in-out infinite 1s;
    transform-origin: center;
}

.app-hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: subtitleSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), subtitleFloat 3s ease-in-out infinite 1.5s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* 动画定义 */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, -40px) scale(1.1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes titleBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes subtitleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 移动端适配 - 降低高度 */
@media (max-width: 768px) {
    .app-hero {
        padding: 24px 20px;
        margin: 20px auto 20px;
        border-radius: 18px;
    }

    .app-hero-title {
        font-size: 28px;
        letter-spacing: 1.2px;
        margin-bottom: 6px;
    }

    .app-hero-subtitle {
        font-size: 12px;
    }

    .app-hero::before {
        width: 200px;
        height: 200px;
        top: -40%;
    }

    .app-hero::after {
        width: 180px;
        height: 180px;
        bottom: -25%;
    }

    .app-hero-decor-left {
        left: 12px;
    }

    .app-hero-decor-right {
        right: 12px;
    }

    .hero-emoji {
        font-size: 18px;
    }

    .app-hero-decor {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .app-hero {
        padding: 18px 16px;
        margin: 16px auto 16px;
        border-radius: 16px;
    }

    .app-hero-title {
        font-size: 24px;
        margin-bottom: 4px;
        letter-spacing: 1px;
    }

    .app-hero-subtitle {
        font-size: 11px;
        letter-spacing: 0.3px;
    }

    .app-hero::before,
    .app-hero::after {
        display: none;
    }

    .app-hero-decor-left {
        left: 8px;
    }

    .app-hero-decor-right {
        right: 8px;
    }

    .hero-emoji {
        font-size: 16px;
    }

    .app-hero-decor {
        gap: 4px;
    }
}

/* Tab 导航样式 - 紧凑版，支持换行 */
/* Tab导航 - 小红书风格 */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto 32px;
    padding: 8px 12px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.tab-button {
    flex: 1 1 calc(33.333% - 8px); /* 每行3个 */
    min-width: 100px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: #fafafa;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-button:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.tab-button.active {
    background: linear-gradient(135deg, #ff2442 0%, #ff6f61 100%);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
}

.tab-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s ease;
    line-height: 1;
}

.tab-button.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Tab导航移动端响应式 */
@media (max-width: 768px) {
    .tab-navigation {
        gap: 6px;
        padding: 6px 8px;
        margin-bottom: 20px;
    }

    .tab-button {
        flex: 1 1 calc(50% - 4px); /* 移动端每行2个 */
        min-width: 80px;
        padding: 8px 6px;
        gap: 5px;
    }

    .tab-label {
        font-size: 12px;
    }

    .tab-count {
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .tab-navigation {
        gap: 5px;
        padding: 5px 6px;
        margin-bottom: 16px;
    }

    .tab-button {
        padding: 6px 4px;
        gap: 4px;
        border-radius: 10px;
        min-width: 70px;
    }

    .tab-label {
        font-size: 11px;
    }

    .tab-count {
        min-width: 15px;
        height: 15px;
        padding: 0 3px;
        font-size: 9px;
    }
}

/* 瞬间卡片瀑布流布局 */
.anniversary-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* 时间线年份标题 - 紧凑版 */
.timeline-year-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg,
        rgba(var(--background-primary-rgb, 255, 255, 255), 0.98) 0%,
        rgba(var(--background-primary-rgb, 255, 255, 255), 0.95) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    z-index: 10;
    padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg,
        transparent 0%,
        var(--primary-color) 20%,
        var(--primary-color) 80%,
        transparent 100%);
    border-image-slice: 1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.timeline-year-title {
    font-size: 40px;
    font-weight: var(--font-weight-bold);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -1.5px;
    line-height: 1;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
    animation: yearTitleFadeIn 0.6s ease-out;
}

@keyframes yearTitleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 时间线月份标题 - 紧凑版 */
.timeline-month-header {
    position: relative;
    padding: 0;
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.timeline-month-header::before {
    content: '';
    flex: 0 0 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    margin-right: var(--spacing-sm);
}

.timeline-month-title {
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0.3px;
    padding: 6px var(--spacing-md);
    background: var(--background-secondary);
    border-radius: var(--radius-extra-large);
    border: 1px solid rgba(252, 92, 124, 0.2);
    box-shadow: var(--shadow-light);
    position: relative;
    transition: all var(--transition-medium);
}

.timeline-month-title::before {
    content: '📅';
    margin-right: 6px;
    font-size: 16px;
}

.timeline-month-header::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--background-tertiary) 100%);
    margin-left: var(--spacing-sm);
}

/* 月份容器 - 瀑布流布局（紧凑版） */
.month-container {
    columns: 300px auto;
    column-gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

/* 纪念日卡片 - iOS叠加式设计（紧凑版） */
.anniversary-card {
    background: var(--background-primary);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
    position: relative;
    cursor: pointer;
    transform-origin: center;
    break-inside: avoid; /* 防止卡片在瀑布流中被分割 */
    margin-bottom: var(--spacing-md);
    min-height: 350px;
    border: 1px solid rgba(252, 92, 124, 0.15);
    /* 卡片内所有内容叠加排列 */
}

.anniversary-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-heavy);
}

.anniversary-card:active {
    transform: scale(0.99);
    transition: all 0.1s ease;
    box-shadow: var(--shadow-medium);
}

/* 卡片点击波纹效果 */
.anniversary-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 5;
}

.anniversary-card.ripple::after {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* 卡片背景图片/视频容器 - 填满整个卡片 */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 卡片背景图片子元素 */
.card-background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* 卡片背景视频 */
.card-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* 卡片渐变遮罩 - iOS风格渐变 */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.8) 90%,
        rgba(0, 0, 0, 0.9) 100%
    );
    z-index: 2;
}

/* 默认背景 - 温馨浪漫系列 */

/* 忆往昔 - 温暖怀旧色调 */
.card-default-bg-1 {
    background: linear-gradient(135deg,
        #FFE5F1 0%,
        #FFCDD2 25%,
        #F8BBD0 50%,
        #FC5C7C 75%,
        #E84A68 100%);
    position: relative;
}

.card-default-bg-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.card-default-bg-2 {
    background: linear-gradient(135deg,
        #FFF0F5 0%,
        #FFD6E7 30%,
        #FFADD2 60%,
        #FF6B9D 100%);
    position: relative;
}

.card-default-bg-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.card-default-bg-3 {
    background: linear-gradient(135deg,
        #FFB6C1 0%,
        #FF8FA3 35%,
        #FC5C7C 70%,
        #E84A68 100%);
    position: relative;
}

.card-default-bg-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 50%);
    pointer-events: none;
}

.card-default-bg-4 {
    background: linear-gradient(135deg,
        #FFDEE9 0%,
        #FFB8D2 30%,
        #FF8FA3 65%,
        #FF6B8A 100%);
    position: relative;
}

.card-default-bg-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    pointer-events: none;
}

/* 期来日 - 清新希望色调 */
.card-default-bg-5 {
    background: linear-gradient(135deg,
        #FFF5F7 0%,
        #FFE1EC 25%,
        #FFC9E3 50%,
        #FFB1D9 75%,
        #FF8FA3 100%);
    position: relative;
}

.card-default-bg-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 40% 50%, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    pointer-events: none;
}

.card-default-bg-6 {
    background: linear-gradient(135deg,
        #FFEBF0 0%,
        #FFD1E3 30%,
        #FFAED2 60%,
        #FC5C7C 100%);
    position: relative;
}

.card-default-bg-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.2) 0%, transparent 55%);
    pointer-events: none;
}

.card-default-bg-7 {
    background: linear-gradient(135deg,
        #FFF0F5 0%,
        #FFDCE9 25%,
        #FFBAD6 55%,
        #FF8FA3 85%,
        #FF6B8A 100%);
    position: relative;
}

.card-default-bg-7::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);
    pointer-events: none;
}

.card-default-bg-8 {
    background: linear-gradient(135deg,
        #FFEFF5 0%,
        #FFC9E3 35%,
        #FFA8C9 70%,
        #FC5C7C 100%);
    position: relative;
}

.card-default-bg-8::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.22) 0%, transparent 50%);
    pointer-events: none;
}

/* 卡片内容 - 叠加在背景上 */
.card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    color: white;
    justify-content: space-between;
}

.card-header {
    margin-bottom: var(--spacing-sm);
}

.card-title {
    font-size: 22px;
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--spacing-xs) 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.card-remark {
    font-size: 14px;
    font-weight: var(--font-weight-regular);
    opacity: 0.9;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    line-height: 1.4;
}

.card-date {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    opacity: 0.8;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 计时显示 - 紧凑型iOS毛玻璃风格 */
.card-countdown {
    /* iOS风格毛玻璃背景 */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    gap: 4px;
}

.countdown-label {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: var(--spacing-xs);
}

.countdown-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    width: 100%;
}

.countdown-prefix {
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.countdown-number {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    text-align: right;
}

/* 保留旧的 countdown-value 类以兼容 */
.countdown-value {
    font-size: 28px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time-units {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    padding-bottom: var(--spacing-sm);
}

/* 年单独显示 */
.time-unit-year {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 90px;
}

.time-unit-year .time-unit-value {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    line-height: 1;
}

.time-unit-year .time-unit-label {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
}

/* 简洁时分秒显示 */
.time-detail {
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-top: 2px;
}

/* 方向指示器 */
.direction-indicator {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-small);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    z-index: 4;
}

.direction-forward::before {
    content: "⏱";
    margin-right: 4px;
}

.direction-backward::before {
    content: "⏰";
    margin-right: 4px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-title {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.empty-description {
    font-size: 16px;
    margin: 0;
}

/* 底部 - 紧凑版 */
.footer {
    text-align: center;
    padding: var(--spacing-md) 0;
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--background-tertiary);
    margin-top: var(--spacing-xl);
}

.footer-text {
    margin: 0;
}

/* Toast 提示 - 顶部显示，主题适配版 */
.toast {
    position: fixed;
    top: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--background-primary);
    color: var(--text-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-large);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    z-index: 10000;
    opacity: 0;
    transition: transform var(--transition-medium), opacity var(--transition-medium);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--background-tertiary);
    box-shadow: var(--shadow-heavy);
    max-width: 90%;
    min-width: 280px;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg,
        rgba(52, 199, 89, 0.95) 0%,
        rgba(52, 199, 89, 0.85) 100%);
    color: white;
    border-color: rgba(52, 199, 89, 0.3);
}

.toast.warning {
    background: linear-gradient(135deg,
        rgba(255, 149, 0, 0.95) 0%,
        rgba(255, 149, 0, 0.85) 100%);
    color: white;
    border-color: rgba(255, 149, 0, 0.3);
}

.toast.error {
    background: linear-gradient(135deg,
        rgba(255, 59, 48, 0.95) 0%,
        rgba(255, 59, 48, 0.85) 100%);
    color: white;
    border-color: rgba(255, 59, 48, 0.3);
}

.toast.info {
    background: linear-gradient(135deg,
        #FC5C7C 0%,
        #FF6B8A 100%);
    color: white;
    border-color: rgba(252, 92, 124, 0.3);
}

/* 浮动操作按钮 */
.fab {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: var(--shadow-heavy);
    transition: all var(--transition-medium);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.fab:active {
    transform: scale(0.95);
}

/* 进度指示器 */
.progress-ring {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.progress-ring circle {
    transition: stroke-dashoffset 0.35s;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

/* 优化滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--background-tertiary);
    border-radius: var(--radius-small);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 模态对话框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--background-primary);
    border-radius: var(--radius-large);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.8);
    transition: all var(--transition-medium);
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--background-tertiary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: var(--font-weight-semibold);
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-small);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group textarea,
.form-group select {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--background-tertiary);
    border-radius: var(--radius-medium);
    font-size: 16px;
    line-height: 1.5;
    font-family: inherit;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
    text-align: left;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group.checkbox-group {
    margin-bottom: var(--spacing-md);
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    padding: 0;
    margin: 0;
    font-size: 0; /* 消除inline元素间隙 */
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    vertical-align: middle;
}

.checkbox-label span {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    line-height: 16px; /* 与checkbox高度一致 */
    vertical-align: middle;
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--background-tertiary);
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--background-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--background-tertiary);
}

/* 详情对话框样式 */
.detail-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.detail-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* 详情媒体容器 */
.detail-media-container {
    width: 100%;
    border-radius: var(--radius-large);
    overflow: hidden;
    background: var(--background-secondary);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
}

/* 详情视频容器 */
.detail-video-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-video {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-large);
}

/* 详情图片容器 */
.detail-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-large);
}

/* 详情信息区域 */
.detail-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.detail-label {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
}

.detail-value {
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
}

/* 备注样式 */
.detail-remark {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 详情计时样式 */
.detail-countdown {
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-align: center;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--background-secondary), var(--background-tertiary));
    border-radius: var(--radius-medium);
    border: 1px solid var(--background-tertiary);
}

/* 备注缩略样式 - 需要替换原有的 .card-remark 样式 */

/* 响应式对话框 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: var(--spacing-md);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }

    .detail-modal-content {
        max-width: 95%;
        margin: var(--spacing-sm);
    }

    .detail-image {
        max-height: 300px;
    }

    .detail-video {
        max-height: 300px;
    }

    .detail-countdown {
        font-size: 20px;
        padding: var(--spacing-sm);
    }
}

/* 右键上下文菜单 */
.context-menu {
    position: fixed;
    background: var(--background-primary);
    border: 1px solid var(--background-tertiary);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    min-width: 120px;
    padding: var(--spacing-xs) 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.context-menu-item {
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.context-menu-item:hover {
    background: var(--background-secondary);
}

.context-menu-item span {
    display: block;
}

/* 波纹效果样式 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* 主题切换时的特殊动画 */
[data-theme] .anniversary-card {
    animation: theme-change-slide 0.6s ease-out;
}

@keyframes theme-change-slide {
    0% {
        transform: translateY(-10px);
        opacity: 0.8;
    }
    50% {
        transform: translateY(5px);
        opacity: 0.9;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 主题切换按钮的脉冲效果 */
.theme-toggle.pulse {
    animation: pulse-effect 0.6s ease-out;
}

@keyframes pulse-effect {
    0% {
        box-shadow: 0 0 0 0 rgba(252, 92, 124, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(252, 92, 124, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(252, 92, 124, 0);
    }
}

/* 响应式设计 - 紧凑版 */
@media (max-width: 768px) {
    .app-container {
        padding: 0 var(--spacing-sm);
    }

    .header::before {
        font-size: 80px;
        right: 5%;
    }

    .header::after {
        font-size: 60px;
        left: 5%;
    }

    .app-title {
        font-size: 24px;
    }

    .app-title::after {
        font-size: 16px;
        right: -25px;
    }

    .app-subtitle {
        font-size: 13px;
    }

    .month-container {
        columns: 1fr;
        column-gap: var(--spacing-sm);
    }

    .timeline-year-header {
        padding: var(--spacing-md) 0 var(--spacing-sm) 0;
        margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
    }

    .timeline-year-title {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .timeline-month-header {
        margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    }

    .timeline-month-header::before {
        flex: 0 0 20px;
    }

    .timeline-month-title {
        font-size: 16px;
        padding: 4px var(--spacing-sm);
    }

    .card-content {
        padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    }

    .countdown-number {
        font-size: 24px;
    }

    .countdown-prefix {
        font-size: 14px;
    }

    .countdown-value {
        font-size: 30px;
    }

    .countdown-detail {
        font-size: 12px;
    }

    .time-unit-value {
        font-size: 14px;
    }

    .time-detail {
        font-size: 14px;
    }

    .main-content {
        padding: 0 var(--spacing-sm) var(--spacing-md);
    }

    .tab-navigation {
        max-width: 100%;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }

    .tab-button {
        flex: 0 0 calc(25% - var(--spacing-sm)); /* 移动端也是每行4个 */
        min-width: 0;
        padding: var(--spacing-sm) 6px;
    }

    .tab-label {
        font-size: 13px;
    }

    .tab-count {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 22px;
    }

    .anniversary-card {
        height: 240px;
        margin-bottom: var(--spacing-sm);
    }

    .card-title {
        font-size: 18px;
    }

    .countdown-value {
        font-size: 26px;
    }

    .countdown-detail {
        font-size: 11px;
    }

    .time-detail {
        font-size: 13px;
    }

    .timeline-year-header {
        padding: var(--spacing-sm) 0;
        margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    }

    .timeline-year-title {
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .timeline-month-header {
        margin: var(--spacing-sm) 0;
    }

    .timeline-month-header::before {
        flex: 0 0 15px;
    }

    .timeline-month-header::after {
        display: none;
    }

    .timeline-month-title {
        font-size: 14px;
        padding: 4px var(--spacing-sm);
    }

    .timeline-month-title::before {
        font-size: 14px;
        margin-right: 4px;
    }

    .month-container {
        margin-bottom: var(--spacing-lg);
    }
}

@media (min-width: 1200px) {
    .month-container {
        columns: 4 300px;
        column-gap: var(--spacing-md);
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .month-container {
        columns: 3 300px;
        column-gap: var(--spacing-md);
    }
}

@media (min-width: 768px) and (max-width: 899px) {
    .month-container {
        columns: 2 300px;
        column-gap: var(--spacing-sm);
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anniversary-card {
    animation: fadeIn var(--transition-slow) ease-out;
}

.anniversary-card:nth-child(1) { animation-delay: 0.1s; }
.anniversary-card:nth-child(2) { animation-delay: 0.2s; }
.anniversary-card:nth-child(3) { animation-delay: 0.3s; }
.anniversary-card:nth-child(4) { animation-delay: 0.4s; }
.anniversary-card:nth-child(5) { animation-delay: 0.5s; }
.anniversary-card:nth-child(6) { animation-delay: 0.6s; }

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --background-primary: #FFFFFF;
        --background-secondary: #F0F0F0;
    }
}

/* 浅色主题 */
[data-theme="light"] {
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;
    --background-primary: #FFFFFF;
    --background-secondary: #F2F2F7;
    --background-tertiary: #E5E5EA;
    --primary-light: #5AC8FA;
    --primary-dark: #0056CC;
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFE5F1 50%, #FFF0F5 100%);
}

[data-theme="light"] .header {
    background: linear-gradient(135deg,
        rgba(255, 245, 247, 0.98) 0%,
        rgba(255, 229, 241, 0.95) 50%,
        rgba(255, 240, 245, 0.98) 100%);
    border-bottom: 1px solid var(--background-tertiary);
}

/* 深色主题 */
[data-theme="dark"] {
    --text-primary: #FFFFFF;
    --text-secondary: #98989D;
    --text-tertiary: #636366;
    --background-primary: #1C1C1E;
    --background-secondary: #2C2C2E;
    --background-tertiary: #38383A;
    --primary-light: #5AC8FA;
    --primary-dark: #0056CC;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 50%, #2A1A1E 100%);
}

[data-theme="dark"] .header {
    background: linear-gradient(135deg,
        rgba(28, 28, 30, 0.95) 0%,
        rgba(42, 26, 30, 0.95) 50%,
        rgba(28, 28, 30, 0.95) 100%);
    border-bottom: 1px solid var(--background-tertiary);
}

[data-theme="dark"] .timeline-year-header {
    background: linear-gradient(135deg,
        rgba(28, 28, 30, 0.98) 0%,
        rgba(44, 44, 46, 0.95) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .timeline-month-title {
    background: var(--background-secondary);
    border-color: var(--background-tertiary);
}

/* 自动主题跟随系统 */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --text-primary: #1C1C1E;
        --text-secondary: #8E8E93;
        --text-tertiary: #C7C7CC;
        --background-primary: #FFFFFF;
        --background-secondary: #F2F2F7;
        --background-tertiary: #E5E5EA;
    }

    :root:not([data-theme]) body {
        background: linear-gradient(135deg, #FFF5F7 0%, #FFE5F1 50%, #FFF0F5 100%);
    }

    :root:not([data-theme]) .header {
        background: linear-gradient(135deg,
            rgba(255, 245, 247, 0.98) 0%,
            rgba(255, 229, 241, 0.95) 50%,
            rgba(255, 240, 245, 0.98) 100%);
        border-bottom: 1px solid var(--background-tertiary);
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --text-primary: #FFFFFF;
        --text-secondary: #98989D;
        --text-tertiary: #636366;
        --background-primary: #1C1C1E;
        --background-secondary: #2C2C2E;
        --background-tertiary: #38383A;
    }

    :root:not([data-theme]) body {
        background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 50%, #2A1A1E 100%);
    }

    :root:not([data-theme]) .header {
        background: linear-gradient(135deg,
            rgba(28, 28, 30, 0.95) 0%,
            rgba(42, 26, 30, 0.95) 50%,
            rgba(28, 28, 30, 0.95) 100%);
        border-bottom: 1px solid var(--background-tertiary);
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .loading-spinner {
        animation: none;
    }
}

/* ========== 日记功能样式 ========== */

/* 日记卡片 - 瀑布流布局优化 */
.diary-card {
    position: relative;
    background: var(--background-primary);
    border-radius: var(--radius-large);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(252, 92, 124, 0.15);
    cursor: pointer;
    transition: all var(--transition-medium);
    animation: fadeIn var(--transition-slow) ease-out;
    overflow: visible;
    break-inside: avoid; /* 防止卡片在瀑布流中被分割 */
    margin-bottom: var(--spacing-md); /* 卡片间距 */
    display: inline-block; /* 确保在列布局中正常显示 */
    width: 100%; /* 占满列宽 */
}

.diary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.diary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(252, 92, 124, 0.2);
}

.diary-card:hover::before {
    opacity: 1;
}

.diary-card:active {
    transform: translateY(-3px) scale(1.005);
}

/* 日记卡片头部 - 优化可读性 */
.diary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-md);
    position: relative;
}

.diary-card-title {
    font-size: 20px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.4;
    position: relative;
    transition: color var(--transition-fast);
}

.diary-card:hover .diary-card-title {
    color: var(--primary-color);
}

.diary-card-date {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    background: var(--background-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-extra-large);
    border: 1px solid rgba(252, 92, 124, 0.2);
}

/* 日记卡片内容 - 优化可读性 */
.diary-card-content {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.diary-card-preview {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

/* 日记卡片底部 - 优化可读性 */
.diary-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
    border-top: 1px solid rgba(252, 92, 124, 0.1);
}

.diary-card-author {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.diary-card-read-more {
    font-size: 14px;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    transition: all var(--transition-fast);
    position: relative;
    padding-right: 20px;
}

.diary-card-read-more::after {
    content: '→';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: all var(--transition-fast);
}

.diary-card:hover .diary-card-read-more {
    color: var(--primary-dark);
}

.diary-card:hover .diary-card-read-more::after {
    right: -4px;
}

/* 日记详情页样式 */
.diary-detail-page {
    /* 继承 body 的渐变背景，不覆盖 */
}

.diary-detail-content {
    max-width: 800px;
    min-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

/* 返回按钮 */
.back-button {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(252, 92, 124, 0.2);
    border-radius: var(--radius-medium);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    min-width: 80px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(252, 92, 124, 0.15);
    transform: translateX(-2px);
    border-color: rgba(252, 92, 124, 0.3);
}

.back-button:active {
    transform: translateX(-1px) scale(0.98);
}

/* 日记详情头部 - 增强视觉效果 */
.diary-header {
    position: relative;
    background: var(--background-primary);
    border-radius: var(--radius-large);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(252, 92, 124, 0.15);
    overflow: hidden;
}

.diary-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%);
}

.diary-header::after {
    content: '✨';
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    font-size: 48px;
    opacity: 0.06;
    pointer-events: none;
}

.diary-title {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.2;
    position: relative;
}

.diary-meta {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.diary-author {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--background-secondary);
    border-radius: var(--radius-medium);
}

.diary-date {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--background-secondary);
    border-radius: var(--radius-medium);
}

.diary-author::before {
    content: '✍️';
}

.diary-date::before {
    content: '📅';
}

/* 日记详情内容 - Markdown渲染区域，增强视觉效果 */
.diary-content {
    position: relative;
    background: var(--background-primary);
    border-radius: var(--radius-large);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(252, 92, 124, 0.15);
    min-height: 200px;
}

.diary-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 60px;
    background: linear-gradient(180deg,
        var(--primary-color) 0%,
        transparent 100%);
    border-radius: 0 0 3px 3px;
}

/* Markdown 样式 */
.markdown-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    color: var(--text-primary);
}

.markdown-body h1 {
    font-size: 28px;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid transparent;
    background-image: linear-gradient(var(--background-primary), var(--background-primary)),
                      linear-gradient(90deg,
                        var(--primary-color) 0%,
                        var(--secondary-color) 100%);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
    position: relative;
}

.markdown-body h1::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%);
}

.markdown-body h2 {
    font-size: 24px;
    padding-bottom: var(--spacing-xs);
    padding-left: var(--spacing-sm);
    border-left: 3px solid var(--primary-color);
    position: relative;
}

.markdown-body h3 {
    font-size: 20px;
}

.markdown-body h4 {
    font-size: 18px;
}

.markdown-body h5,
.markdown-body h6 {
    font-size: 16px;
}

.markdown-body p {
    margin: var(--spacing-md) 0;
}

.markdown-body ul,
.markdown-body ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.markdown-body li {
    margin: var(--spacing-xs) 0;
}

.markdown-body blockquote {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid transparent;
    background: var(--background-secondary);
    border-radius: var(--radius-medium);
    color: var(--text-secondary);
    position: relative;
    background-image: linear-gradient(var(--background-secondary), var(--background-secondary)),
                      linear-gradient(180deg,
                        var(--primary-color) 0%,
                        var(--secondary-color) 100%);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
}

.markdown-body blockquote::before {
    content: '"';
    position: absolute;
    top: 0;
    left: 12px;
    font-size: 48px;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    opacity: 0.15;
    line-height: 1;
}

.markdown-body code {
    background: rgba(252, 92, 124, 0.08);
    padding: 2px 6px;
    border-radius: var(--radius-small);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--primary-color);
    border: 1px solid rgba(252, 92, 124, 0.15);
}

.markdown-body pre {
    background: var(--background-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-medium);
    overflow-x: auto;
    margin: var(--spacing-md) 0;
    border: 1px solid var(--background-tertiary);
    position: relative;
}

.markdown-body pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        transparent 100%);
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
    border: none;
}

.markdown-body a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}

.markdown-body a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-medium);
    margin: var(--spacing-md) 0;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-medium);
}

.markdown-body img:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.markdown-body hr {
    border: none;
    height: 1px;
    background: var(--background-tertiary);
    margin: var(--spacing-xl) 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.markdown-body th,
.markdown-body td {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--background-tertiary);
    text-align: left;
}

.markdown-body th {
    background: linear-gradient(135deg,
        rgba(252, 92, 124, 0.08) 0%,
        rgba(255, 107, 138, 0.08) 100%);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    position: relative;
}

.markdown-body th:first-child {
    border-left: 3px solid var(--primary-color);
}

.markdown-body tr:nth-child(even) {
    background: var(--background-secondary);
}

.markdown-body tbody tr:hover {
    background: rgba(252, 92, 124, 0.04);
    transition: background var(--transition-fast);
}

/* 错误容器 */
.error-container {
    text-align: center;
    padding: var(--spacing-xl);
}

.error-message {
    font-size: 16px;
    color: var(--error-color);
    margin-bottom: var(--spacing-lg);
}

/* 响应式设计 - 日记页面 */
@media (max-width: 768px) {
    .diary-detail-content {
        min-width: auto;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .diary-header {
        padding: var(--spacing-lg);
    }

    .diary-title {
        font-size: 24px;
    }

    .diary-content {
        padding: var(--spacing-lg);
    }

    .markdown-body {
        font-size: 15px;
    }

    .markdown-body h1 {
        font-size: 24px;
    }

    .markdown-body h2 {
        font-size: 20px;
    }

    .markdown-body h3 {
        font-size: 18px;
    }

    .diary-card {
        padding: var(--spacing-md);
    }

    .diary-card-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .diary-header {
        padding: var(--spacing-md);
    }

    .diary-title {
        font-size: 20px;
    }

    .diary-content {
        padding: var(--spacing-md);
    }

    .diary-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
}

/* ========== 加载更多样式 ========== */
.loading-more {
    position: fixed;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background: var(--background-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-extra-large);
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(252, 92, 124, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    animation: fadeInUp 0.3s ease-out;
}

.loading-more .loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin-bottom: 0;
}

.loading-more-text {
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========== 待办事项模块样式 ========== */

/* 待办卡片容器 */
.todo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
}

/* 待办筛选器 */
/* 待办搜索区域 */
.todo-search-area {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-large);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.todo-search-row {
    margin-bottom: var(--spacing-sm);
}

.todo-search-row:last-child {
    margin-bottom: 0;
}

.todo-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
}

.todo-search-input {
    width: 100%;
    padding: 10px 90px 10px 38px;
    border: 1px solid rgba(252, 92, 124, 0.2);
    border-radius: var(--radius-medium);
    font-size: 16px;
    font-family: inherit;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.todo-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 48px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.clear-search-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

/* 展开/收起时间筛选按钮 */
.toggle-date-filter-btn {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-medium);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.toggle-date-filter-btn:hover {
    background: rgba(0, 122, 255, 0.2);
}

.toggle-date-filter-btn .toggle-icon {
    font-size: 12px;
    line-height: 1;
}

.todo-date-filter-row {
    overflow: hidden;
    transition: all var(--transition-medium);
}

.todo-date-filter {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.date-filter-label {
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    white-space: nowrap;
}

.todo-date-input {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
    padding: 8px 10px;
    border: 1px solid rgba(252, 92, 124, 0.2);
    border-radius: var(--radius-medium);
    font-size: 13px;
    font-family: inherit;
    background: var(--background-primary);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
}

.todo-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.date-separator {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 0 4px;
}

.clear-date-btn {
    padding: 8px 12px;
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: var(--radius-medium);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    color: var(--error-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.clear-date-btn:hover {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.3);
}

.todo-filters {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.todo-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(252, 92, 124, 0.2);
    border-radius: var(--radius-extra-large);
    font-size: 13px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.todo-filter-btn:hover {
    background: rgba(252, 92, 124, 0.15);
    border-color: rgba(252, 92, 124, 0.3);
    transform: translateY(-2px);
}

.todo-filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-medium);
}

/* 待办列表 */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* 待办卡片 - 苹果风格 */
.todo-card {
    position: relative;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(252, 249, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 24px;
    box-shadow:
        0 4px 20px rgba(252, 92, 124, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1.5px solid transparent;
    background-clip: padding-box;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn var(--transition-slow) ease-out;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    overflow: hidden;
}

/* 渐变边框效果 */
.todo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1.5px;
    background: linear-gradient(135deg,
        rgba(252, 92, 124, 0.2) 0%,
        rgba(255, 107, 138, 0.15) 50%,
        rgba(252, 92, 124, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* 左侧优先级条 */
.todo-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 5px;
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px currentColor;
}

.todo-card.priority-high::after {
    background: linear-gradient(180deg, var(--error-color) 0%, #ff6b6b 100%);
    color: var(--error-color);
}

.todo-card.priority-medium::after {
    background: linear-gradient(180deg, var(--warning-color) 0%, #ffb347 100%);
    color: var(--warning-color);
}

.todo-card.priority-low::after {
    background: linear-gradient(180deg, var(--success-color) 0%, #51cf66 100%);
    color: var(--success-color);
}

.todo-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(252, 92, 124, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.todo-card:hover::before {
    opacity: 1;
}

.todo-card:hover::after {
    opacity: 1;
    left: 0;
}

/* 完成状态 - 成就感设计 */
.todo-card.completed {
    background: linear-gradient(145deg,
        rgba(52, 199, 89, 0.06) 0%,
        rgba(48, 209, 88, 0.08) 50%,
        rgba(52, 199, 89, 0.05) 100%);
    border: 1.5px solid rgba(52, 199, 89, 0.4);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(52, 199, 89, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.todo-card.completed::before {
    background: linear-gradient(135deg,
        rgba(52, 199, 89, 0.3) 0%,
        rgba(48, 209, 88, 0.25) 50%,
        rgba(52, 199, 89, 0.2) 100%);
    opacity: 1;
}

/* 完成光效 - 创建闪光动画层 */
.todo-card.completed::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20px;
    bottom: 20px;
    width: 5px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--success-color) 0%, #30D158 100%);
    opacity: 1;
    box-shadow: 0 0 15px rgba(52, 199, 89, 0.5);
    animation: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.todo-card.completed .todo-card-title {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    position: relative;
}

/* 完成标记 */
.todo-card.completed .todo-card-title::before {
    content: '✓ ';
    color: var(--success-color);
    font-weight: var(--font-weight-bold);
    margin-right: 4px;
}

/* 待办复选框 - 重新设计 */
.todo-checkbox {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2.5px solid #d1d1d6;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: #ffffff;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.todo-checkbox:hover {
    border-color: var(--primary-color);
    transform: scale(1.15);
    box-shadow:
        0 4px 12px rgba(252, 92, 124, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.todo-checkbox.checked {
    background: linear-gradient(135deg, #fc5c7c 0%, #ff6b8a 100%);
    border-color: #fc5c7c;
    box-shadow:
        0 4px 16px rgba(252, 92, 124, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.todo-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    color: white;
    font-size: 16px;
    font-weight: bold;
    animation: checkmark-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmark-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 待办内容区域 */
.todo-card-content {
    flex: 1;
    min-width: 0;
    padding-right: 40px; /* 给星标按钮留出空间 */
}

.todo-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.todo-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
    word-break: break-word;
    letter-spacing: -0.2px;
}

.todo-priority-badge {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.todo-priority-badge.high {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 69, 58, 0.12) 100%);
    color: #ff3b30;
    border: 1.5px solid rgba(255, 59, 48, 0.3);
}

.todo-priority-badge.medium {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 159, 10, 0.12) 100%);
    color: #ff9500;
    border: 1.5px solid rgba(255, 149, 0, 0.3);
}

.todo-priority-badge.low {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15) 0%, rgba(48, 209, 88, 0.12) 100%);
    color: #34c759;
    border: 1.5px solid rgba(52, 199, 89, 0.3);
}

.todo-starred-badge {
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.todo-starred-badge:hover {
    background: rgba(255, 204, 0, 0.1);
}

.todo-repeat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-extra-large);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.todo-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 12px 0;
    word-break: break-word;
    opacity: 0.85;
}

.todo-card-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.todo-card-due-date {
    font-size: 13px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.todo-card-due-date::before {
    content: '🕐';
    font-size: 14px;
}

.todo-card-due-date.overdue {
    color: var(--error-color);
    font-weight: var(--font-weight-semibold);
}

.todo-card-due-date.overdue::before {
    content: '⚠️';
}

/* 待办操作按钮 - 右下角布局 */
.todo-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.todo-action-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(250, 250, 252, 0.8) 100%);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.todo-action-btn:hover {
    background: linear-gradient(135deg, rgba(252, 92, 124, 0.12) 0%, rgba(255, 107, 138, 0.1) 100%);
    border-color: rgba(252, 92, 124, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(252, 92, 124, 0.2);
}

/* 星标按钮 - 右上角 */
.todo-star-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 22px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    color: #d1d1d6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.todo-star-btn.starred {
    color: #ffcc00;
}

.todo-star-btn:hover {
    background: rgba(255, 204, 0, 0.12);
    color: #ffcc00;
}

.todo-star-btn.starred:hover {
    /* 移除动画效果 */
}

.todo-action-btn.edit:hover {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.12) 0%, rgba(10, 132, 255, 0.1) 100%);
    border-color: rgba(0, 122, 255, 0.4);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

.todo-action-btn.delete:hover {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.12) 0%, rgba(255, 69, 58, 0.1) 100%);
    border-color: rgba(255, 59, 48, 0.4);
    color: var(--error-color);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.2);
}

/* 倒计时显示 */
.todo-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(252, 92, 124, 0.08) 0%, rgba(255, 107, 138, 0.08) 100%);
    border-radius: var(--radius-medium);
    font-size: 13px;
    font-weight: var(--font-weight-semibold);
    color: var(--primary-color);
    border: 1px solid rgba(252, 92, 124, 0.15);
    margin-top: var(--spacing-xs);
}

.todo-countdown::before {
    content: '⏱';
    font-size: 14px;
}

.todo-countdown.urgent {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1) 0%, rgba(255, 59, 48, 0.08) 100%);
    color: var(--error-color);
    border-color: rgba(255, 59, 48, 0.2);
}

.todo-countdown.urgent::before {
    content: '🔥';
}

/* 完成感想样式 */
.completion-todo-title {
    font-size: 18px;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    padding: var(--spacing-md);
    background: var(--background-secondary);
    border-radius: var(--radius-medium);
    border-left: 4px solid var(--primary-color);
    margin-bottom: var(--spacing-lg);
}

/* 完成徽章 */
.todo-completed-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg,
        rgba(52, 199, 89, 0.15) 0%,
        rgba(48, 209, 88, 0.15) 100%);
    border: 1.5px solid rgba(52, 199, 89, 0.4);
    border-radius: var(--radius-extra-large);
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    color: var(--success-color);
    margin-top: var(--spacing-xs);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.2);
}

.todo-completed-badge::before {
    content: '🎉';
    font-size: 14px;
}

/* 完成时间 */
.todo-completed-time {
    font-size: 12px;
    color: var(--success-color);
    font-weight: var(--font-weight-medium);
    margin-left: 8px;
}

.todo-completion-note {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: linear-gradient(135deg,
        rgba(52, 199, 89, 0.08) 0%,
        rgba(52, 199, 89, 0.05) 100%);
    border-radius: var(--radius-large);
    border: 1.5px solid rgba(52, 199, 89, 0.25);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.1);
    position: relative;
}

.todo-completion-note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
        var(--success-color) 0%,
        #30D158 100%);
    border-radius: 4px 0 0 4px;
}

.todo-completion-note-label {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    color: var(--success-color);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.todo-completion-note-label::before {
    content: '💭';
    font-size: 16px;
}

.todo-completion-note-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    word-break: break-word;
    padding-left: 4px;
}

/* 图片上传区域 */
.completion-image-upload {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.image-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg,
        rgba(252, 92, 124, 0.08) 0%,
        rgba(255, 107, 138, 0.08) 100%);
    border: 2px dashed rgba(252, 92, 124, 0.3);
    border-radius: var(--radius-large);
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    align-self: flex-start;
}

.image-upload-btn:hover {
    background: linear-gradient(135deg,
        rgba(252, 92, 124, 0.15) 0%,
        rgba(255, 107, 138, 0.15) 100%);
    border-color: rgba(252, 92, 124, 0.5);
    transform: translateY(-2px);
}

.upload-icon {
    font-size: 20px;
}

.image-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-medium);
    overflow: hidden;
    background: var(--background-secondary);
    border: 2px solid rgba(252, 92, 124, 0.15);
    transition: all var(--transition-fast);
}

.image-preview-item:hover {
    transform: scale(1.05);
    border-color: rgba(252, 92, 124, 0.3);
    box-shadow: var(--shadow-medium);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(255, 59, 48, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2;
}

.image-preview-remove:hover {
    background: var(--error-color);
    transform: scale(1.1);
}

/* 完成待办图片展示 */
.todo-completion-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 80px));
    gap: 8px;
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(52, 199, 89, 0.03);
    border-radius: var(--radius-medium);
    border: 1px solid rgba(52, 199, 89, 0.15);
}

.todo-completion-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-small);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.todo-completion-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
    border-color: rgba(52, 199, 89, 0.4);
}

.todo-completion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片查看器 */
.image-viewer-modal {
    background: rgba(0, 0, 0, 0.9);
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-viewer-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.image-nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-counter {
    color: white;
    font-size: 16px;
    font-weight: var(--font-weight-medium);
    min-width: 60px;
    text-align: center;
}

/* 自定义确认对话框 */
.confirm-modal-content {
    max-width: 420px;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: 24px;
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(252, 249, 255, 0.98) 100%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    animation: confirmSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes confirmSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-icon {
    font-size: 56px;
    margin-bottom: var(--spacing-md);
    line-height: 1;
    animation: iconBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.confirm-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    letter-spacing: -0.3px;
}

.confirm-message {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 var(--spacing-xl) 0;
    opacity: 0.9;
}

.confirm-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.confirm-actions .btn {
    flex: 1;
    max-width: 160px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-danger {
    background: linear-gradient(135deg, #ff3b30 0%, #ff453a 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff453a 0%, #ff5544 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.4);
}

.btn-danger:active {
    transform: translateY(0);
}

/* 空状态优化 */
.todo-empty {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.todo-empty-icon {
    font-size: 72px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.todo-empty-title {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.todo-empty-description {
    font-size: 16px;
    margin: 0;
}

/* 响应式设计 - 待办模块 */
@media (max-width: 768px) {
    .todo-container {
        padding: var(--spacing-md) 0;
    }

    .todo-card {
        padding: 20px;
        gap: 16px;
        border-radius: 18px;
        box-shadow:
            0 3px 16px rgba(252, 92, 124, 0.08),
            0 2px 6px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .todo-card:hover {
        transform: translateY(-4px) scale(1.005);
        box-shadow:
            0 8px 30px rgba(252, 92, 124, 0.12),
            0 4px 15px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }

    .todo-card::after {
        top: 18px;
        bottom: 18px;
    }

    .todo-checkbox {
        width: 26px;
        height: 26px;
        border-width: 2px;
    }

    .todo-card-title {
        font-size: 16px;
        line-height: 1.45;
    }

    .todo-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 8px;
    }

    .todo-priority-badge {
        padding: 5px 12px;
        font-size: 10px;
    }

    .todo-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-top: 10px;
    }

    .todo-action-btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .todo-card-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
        justify-content: flex-end;
    }

    .todo-card-description {
        font-size: 13px;
        margin: 8px 0;
    }

    .todo-search-area {
        padding: 10px;
        margin-bottom: 10px;
    }

    .search-icon {
        left: 10px;
        font-size: 14px;
    }

    .todo-search-input {
        padding: 8px 80px 8px 32px;
        font-size: 16px;
    }

    .toggle-date-filter-btn {
        right: 8px;
        width: 28px;
        height: 28px;
    }

    .clear-search-btn {
        right: 42px;
        width: 22px;
        height: 22px;
    }

    .todo-date-filter {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 4px;
    }

    .date-filter-label {
        width: auto;
        font-size: 11px;
        flex-shrink: 0;
    }

    .todo-date-input {
        flex: 1;
        min-width: 95px;
        max-width: 130px;
        font-size: 11px;
        padding: 6px 8px;
        box-sizing: border-box;
    }

    .date-separator {
        text-align: center;
        flex-shrink: 0;
        font-size: 11px;
        padding: 0 2px;
    }

    .clear-date-btn {
        width: auto;
        flex-shrink: 0;
        padding: 6px 10px;
        font-size: 11px;
    }

    .todo-filters {
        gap: 6px;
        margin-bottom: var(--spacing-md);
    }

    .todo-filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .todo-card {
        padding: 16px;
        gap: 14px;
        border-radius: 16px;
        box-shadow:
            0 2px 12px rgba(252, 92, 124, 0.08),
            0 1px 4px rgba(0, 0, 0, 0.04),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }

    .todo-card:hover {
        transform: translateY(-3px) scale(1.005);
        box-shadow:
            0 6px 24px rgba(252, 92, 124, 0.12),
            0 3px 10px rgba(0, 0, 0, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }

    .todo-card::after {
        top: 16px;
        bottom: 16px;
        width: 4px;
    }

    .todo-checkbox {
        width: 24px;
        height: 24px;
        border-width: 2px;
    }

    .todo-checkbox.checked::after {
        font-size: 14px;
    }

    .todo-card-title {
        font-size: 15px;
        line-height: 1.4;
    }

    .todo-card-description {
        font-size: 13px;
        margin: 8px 0;
    }

    .todo-priority-badge {
        padding: 4px 10px;
        font-size: 9px;
        border-radius: 10px;
        letter-spacing: 0.2px;
    }

    .todo-action-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 8px;
    }

    .todo-card-header {
        gap: 8px;
        margin-bottom: 6px;
    }

    .todo-card-footer {
        gap: 8px;
        margin-top: 8px;
    }

    .todo-card-actions {
        gap: 6px;
    }

    .todo-card-actions {
        gap: 8px;
    }

    /* 修复移动端输入框样式 */
    .form-group input[type="datetime-local"],
    .form-group input[type="date"],
    .form-group input[type="time"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 44px;
        line-height: 1.5;
        box-sizing: border-box !important;
        padding: var(--spacing-sm) var(--spacing-md) !important;
        margin: 0 !important;
        text-align: left !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    /* 修复iPhone上的日期选择器内部元素 */
    .form-group input[type="datetime-local"]::-webkit-datetime-edit,
    .form-group input[type="date"]::-webkit-date-and-time-value,
    .form-group input[type="date"]::-webkit-inner-spin-button,
    .form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator,
    .form-group input[type="date"]::-webkit-calendar-picker-indicator {
        margin: 0;
        padding: 0;
    }

    /* 确保模态框内容不超出视口 */
    .modal-content {
        max-height: 85vh;
        width: 95%;
    }

    .modal-body {
        padding: var(--spacing-md);
        max-width: 100%;
        overflow-x: hidden;
    }

    .form-group {
        max-width: 100%;
        overflow: hidden;
    }

    /* 防止输入框内容溢出 */
    .form-group input:not([type="checkbox"]):not([type="radio"]),
    .form-group textarea,
    .form-group select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
}