/* 简约清闲风格 - 天空蓝色主题 */

/* 移动端友好调整：保持响应式，不强制桌面布局 */
@media (max-width: 1024px) {
    body {
        min-width: auto;
        font-size: 16px;
    }

    .navigation {
        width: 100%;
        max-width: none;
    }

    .nav-container {
        width: 100%;
        margin: 0;
        flex-direction: row;
        padding: 0 12px;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

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

    .nav-auth {
        margin-left: auto;
    }

    /* 时间线移动端布局：主轴靠左，卡片为单列布局 */
    .timeline::before {
        left: 30px;
    }

    .timeline-item.left-position .timeline-content,
    .timeline-item.right-position .timeline-content,
    .timeline-content {
        left: 80px !important;
        width: calc(100% - 80px) !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline-item.left-position .timeline-node,
    .timeline-item.right-position .timeline-node,
    .timeline-node {
        left: 5px !important;
        right: auto !important;
    }

    .year-navigation {
        right: 10px;
        top: auto;
        bottom: 100px;
        min-width: 120px;
    }

    .year-nav-list {
        max-height: 220px;
    }

    /* 触控友好：表单和交互元素保持合适大小 */
    button, input, textarea, select {
        font-size: 16px;
        -webkit-appearance: none;
    }
}
:root {
    --sky-blue: #87CEEB;
    --light-sky: #E0F6FF;
    --soft-blue: #B0E0E6;
    --deep-blue: #4682B4;
    --text-dark: #2C5282;
    --text-medium: #4A5568;
    --text-light: #718096;
    --bg-white: #F8FCFF;
    --bg-light: #F0F8FF;
    --shadow: rgba(135, 206, 235, 0.2);
    --border: rgba(135, 206, 235, 0.3);
}

/* 自托管字体定义（优先使用本地 woff2，避免依赖第三方） */
@font-face {
    font-family: 'Noto Sans SC';
    src: url('/fonts/NotoSansSC-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Noto Sans SC';
    src: url('/fonts/NotoSansSC-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Noto Sans SC';
    src: url('/fonts/NotoSansSC-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: bold;
    font-display: swap;
}

/* 强制移动端与 PC 端日志使用相同字体，覆盖浏览器默认和系统替换 */
html, body, .diary-content, .diary-editable, .diary-text, .moment-text, .diary-card, .timeline-content {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
}

/* 移动端字体大小和行高微调，防止浏览器自动缩放/替换 */
@media (max-width: 768px) {
    .diary-content, .moment-text {
        font-size: 16px !important;
        line-height: 1.8 !important;
    }
}

/* 当字体尚未加载时，使用临时的系统字体避免闪烁，然后在字体加载完成后替换 */
.font-loading .diary-content, .font-loading .moment-text {
    visibility: hidden;
}
.font-loaded .diary-content, .font-loaded .moment-text {
    visibility: visible;
}

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

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-light) 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* 防止 iOS/Android 自动放大或调整字体，保持与 PC 一致 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 强制日志内容使用统一字体，避免移动端回退到系统默认 */
.diary-content, .diary-editable, .diary-text, .moment-text {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* 顶部区域 */
.header {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--soft-blue) 100%);
    padding: 60px 20px 40px;
    box-shadow: 0 4px 20px var(--shadow);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.avatar-container {
    position: relative;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.profile-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-info p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.weather-widget {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.2);
}

.weather-widget i {
    font-size: 1.5rem;
    color: #FFD700;
}

.weather-widget span {
    font-weight: 500;
    color: white;
}

.temperature {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* 导航栏 */
.navigation {
    background: white;
    box-shadow: 0 2px 15px var(--shadow);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.nav-buttons {
    display: flex;
    gap: 0;
}

.nav-auth {
    display: flex;
    gap: 15px;
    margin-left: 40px;
}

.nav-button {
    background: none;
    border: none;
    padding: 20px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-button:hover {
    background: var(--light-sky);
    color: var(--deep-blue);
}

.nav-button.active {
    background: var(--sky-blue);
    color: white;
    box-shadow: 0 2px 10px var(--shadow);
}

.nav-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.nav-button i {
    font-size: 1.1rem;
}

/* 主内容区域 */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px; /* 减少底部空白，保留顶部间距 */
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.section.active {
    display: block;
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--deep-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--sky-blue);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 300;
}

.highlight-number {
    color: var(--deep-blue);
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 2px;
}

.add-moment-btn {
    background: var(--sky-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.add-moment-btn:hover {
    background: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
}

.add-moment-btn i {
    font-size: 1rem;
}

/* 添加日志按钮 */
.add-diary-btn {
    background: var(--sky-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.add-diary-btn:hover {
    background: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
}

.add-diary-btn i {
    font-size: 1rem;
}

/* 添加回忆按钮 */
.add-memory-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.add-memory-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.add-memory-btn:hover::before {
    left: 100%;
}

.add-memory-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.add-memory-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.add-memory-btn i {
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 为回忆按钮添加装饰效果 */
.add-memory-btn::after {
    content: '💭';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.add-memory-btn:hover::after {
    transform: translateY(-50%) scale(1.2) rotate(10deg);
    opacity: 1;
}

/* 现有图片预览样式 */
.existing-image {
    position: relative;
    display: inline-block;
    margin: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--sky-blue);
}

.existing-image img {
    display: block;
    transition: transform 0.3s ease;
}

.existing-image:hover img {
    transform: scale(1.05);
}

.existing-image .remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.existing-image .remove-image-btn:hover {
    background: #dc3545;
    opacity: 1;
    transform: scale(1.1);
}

.existing-image .image-status {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    padding: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* 添加日志表单 */
.add-diary-form {
    margin-bottom: 40px;
}

/* 添加事件按钮 */
.add-event-btn {
    background: var(--sky-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.add-event-btn:hover {
    background: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.4);
}

.add-event-btn i {
    font-size: 1rem;
}

/* 添加事件表单 */
.add-event-form {
    margin-bottom: 40px;
}

/* 动态卡片 */
.moments-container {
    display: grid;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.moment-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.moment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sky-blue), var(--soft-blue));
}

.moment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(135, 206, 235, 0.3);
}


.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.moment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--sky-blue);
    transition: transform 0.3s ease;
}

.moment-avatar:hover {
    transform: scale(1.1);
}

.moment-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--deep-blue);
    margin-bottom: 4px;
}

.moment-time {
    font-size: 0.9rem;
    color: var(--text-light);
}

.card-content {
    margin-bottom: 25px;
}

.moment-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 20px;
}

/* 多图片显示样式 - 优先横向铺满，之后换行 */
.moment-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, 120px);
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-start;
    max-width: none;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .moment-images {
        grid-template-columns: repeat(auto-fit, 100px);
        gap: 6px;
    }

    .moment-images .moment-image {
        width: 100px;
        height: 100px;
    }
}

/* 统一的图片预览尺寸 */
.moment-images .moment-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.15);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.moment-images .moment-image:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.moment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.moment-image:hover img {
    transform: scale(1.1);
}


/* 添加动态表单样式 */
.add-moment-form {
    margin-bottom: 40px;
}

.form-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

.form-card h3 {
    color: var(--deep-blue);
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 文件上传控件样式 */
.file-upload-container {
    position: relative;
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(135, 206, 235, 0.02);
}

.file-upload-area:hover {
    border-color: var(--sky-blue);
    background: rgba(135, 206, 235, 0.05);
}

.file-upload-area.drag-over {
    border-color: var(--deep-blue);
    background: rgba(135, 206, 235, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 15px;
}

.upload-icon i {
    font-size: 2.5rem;
    color: var(--sky-blue);
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-primary {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--deep-blue);
}

/* 上传选项样式 */
.upload-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.upload-options-text {
    padding: 8px 16px;
    background: rgba(135, 206, 235, 0.1);
    border: 1px solid var(--sky-blue);
    border-radius: 20px;
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 500;
}

/* 上传进度条样式 */
.upload-progress {
    margin-top: 15px;
    padding: 15px;
    background: rgba(135, 206, 235, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sky-blue), var(--deep-blue));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.progress-text span:first-child {
    font-weight: 600;
    color: var(--sky-blue);
}

.upload-progress.uploading .progress-fill {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.upload-progress.completed .progress-fill {
    background: linear-gradient(90deg, #51cf66, #40c057);
}

.upload-progress.error .progress-fill {
    background: linear-gradient(90deg, #ff6b6b, #fa5252);
}

/* 回忆时间线样式 */
.memories-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0; /* 缩减上下内边距，减少空白 */
}

.timeline {
    position: relative;
    padding: 10px 0;
}

/* 时间线主轴 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    top: 0;
    bottom: 0;
    height: 100%;
    background: linear-gradient(to bottom,
        var(--sky-blue),
        #5a67d8,
        var(--deep-blue),
        #ff6b35,
        var(--sky-blue)
    );
    border-radius: 3px;
    box-shadow:
        0 0 20px rgba(135, 206, 235, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.timeline::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    top: 0;
    bottom: 0;
    height: 100%;
    background:
        radial-gradient(circle at 50% 20%, rgba(135, 206, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 40%, rgba(255, 107, 53, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 60%, rgba(135, 206, 235, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(255, 107, 53, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 时间线节点 */
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

/* 同一日期的多个回忆之间的间距 */
.timeline-item + .timeline-item {
    margin-top: -20px; /* 减少重叠，保持视觉连贯性 */
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 减少页面底部空白：最后一个时间线项底部间距更小 */
.timeline-item:last-child {
    margin-bottom: 12px;
}

/* 左侧位置的卡片 */
.timeline-item.left-position .timeline-content {
    left: 0;
    text-align: right;
    padding-right: 80px;
}

.timeline-item.left-position .timeline-node {
    right: -25px;
}

/* 右侧位置的卡片 */
.timeline-item.right-position .timeline-content {
    left: 50%;
    margin-left: 50px;
    padding-left: 80px;
}

.timeline-item.right-position .timeline-node {
    left: -25px;
}

/* 向后兼容：如果没有位置类，使用nth-child */
.timeline-item:not(.left-position):not(.right-position):nth-child(odd) .timeline-content {
    left: 0;
    text-align: right;
    padding-right: 80px;
}

.timeline-item:not(.left-position):not(.right-position):nth-child(even) .timeline-content {
    left: 50%;
    margin-left: 50px;
    padding-left: 80px;
}

.timeline-item:not(.left-position):not(.right-position):nth-child(odd) .timeline-node {
    right: -25px;
}

.timeline-item:not(.left-position):not(.right-position):nth-child(even) .timeline-node {
    left: -25px;
}

/* 时间线节点圆点 */
.timeline-node {
    position: absolute;
    top: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    border: 4px solid white;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.15),
        0 0 0 6px rgba(135, 206, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 2;
    transition: all 0.3s ease;
    animation: gentlePulse 4s infinite;
}

.timeline-node:hover {
    transform: scale(1.15);
    box-shadow:
        0 6px 20px rgba(0,0,0,0.2),
        0 0 0 8px rgba(135, 206, 235, 0.2);
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 4px 12px rgba(0,0,0,0.15),
            0 0 0 6px rgba(135, 206, 235, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 4px 16px rgba(0,0,0,0.2),
            0 0 0 8px rgba(135, 206, 235, 0.15);
    }
}

/* 时间线内容卡片 */
.timeline-content {
    position: relative;
    width: 45%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* 左侧卡片的连接线 */
.timeline-item.left-position .timeline-content::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 30px;
    width: 20px;
    height: 3px;
    background: linear-gradient(to right, rgba(135, 206, 235, 0.6), rgba(135, 206, 235, 0.3));
    border-radius: 2px;
    z-index: 2;
}

/* 右侧卡片的连接线 */
.timeline-item.right-position .timeline-content::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 30px;
    width: 20px;
    height: 3px;
    background: linear-gradient(to left, rgba(135, 206, 235, 0.6), rgba(135, 206, 235, 0.3));
    border-radius: 2px;
    z-index: 2;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

/* 年份导航悬浮控件 */
.year-navigation {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(135, 206, 235, 0.3);
    z-index: 1000;
    min-width: 160px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.year-navigation.collapsed {
    min-width: 50px;
    height: auto;
}

.year-navigation.collapsed .year-nav-list {
    display: none;
}

.year-nav-header {
    padding: 15px 20px 10px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--deep-blue);
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px 10px 0 0;
}

.year-nav-header:hover {
    background: rgba(135, 206, 235, 0.05);
}

.year-navigation.collapsed .year-nav-header {
    padding: 15px;
    border-bottom: none;
    justify-content: center;
}

.year-navigation.collapsed .year-nav-header span {
    display: none;
}

.year-nav-toggle {
    color: var(--deep-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    transition: all 0.2s ease;
}

.year-nav-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.year-navigation.collapsed .year-nav-toggle i {
    transform: rotate(180deg);
}

.year-nav-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sky-blue) transparent;
}

.year-nav-list::-webkit-scrollbar {
    width: 4px;
}

.year-nav-list::-webkit-scrollbar-track {
    background: transparent;
}

.year-nav-list::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 2px;
}

.year-nav-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--deep-blue);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    position: relative;
}

.year-nav-item:hover {
    background: rgba(135, 206, 235, 0.1);
    color: var(--sky-blue);
    transform: translateX(5px);
}

.year-nav-item.active {
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    color: white;
    font-weight: 600;
}

.year-nav-item.active:hover {
    background: linear-gradient(135deg, var(--deep-blue), var(--sky-blue));
}


/* 移动端适配 */
@media (max-width: 768px) {
    .year-navigation {
        right: 15px;
        min-width: 140px;
        top: auto;
        bottom: 100px;
        transform: none;
    }

    .year-navigation.collapsed {
        min-width: 45px;
    }

    .year-nav-header {
        padding: 12px 15px 8px 15px;
        font-size: 0.8rem;
    }

    .year-nav-toggle {
        width: 25px;
        height: 25px;
    }

    .year-nav-toggle i {
        font-size: 0.7rem;
    }

    .year-nav-header:hover {
        background: rgba(135, 206, 235, 0.05);
    }

    .year-nav-item {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* 年份标题节点 */
.timeline-year-header {
    position: relative;
    width: 100%;
    margin: 60px 0 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.year-header-content {
    text-align: center;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 2px solid var(--sky-blue);
    min-width: 120px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.year-header-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.year-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--deep-blue);
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 移动端年份标题适配 */
@media (max-width: 768px) {
    .timeline-year-header {
        margin: 50px 0 25px 0;
    }

    .year-header-content {
        padding: 10px 20px;
        min-width: 100px;
    }

    .year-title {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }
}

/* 时间线头部 */
.timeline-header {
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.timeline-header .memory-date {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.memory-age {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff; /* 白色 */
    margin-left: 8px;
}

.timeline-header .memory-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

/* 左侧位置卡片的头部右对齐 */
.timeline-item.left-position .timeline-header {
    justify-content: flex-end;
    text-align: right;
}

.timeline-item.left-position .timeline-header .memory-date,
.timeline-item.left-position .timeline-header .memory-title {
    text-align: right;
}

/* 左侧位置卡片的正文左对齐 */
.timeline-item.left-position .timeline-body {
    text-align: left;
}

.timeline-item.left-position .timeline-body .memory-description {
    text-align: left;
}

/* 右侧位置卡片的头部和正文都左对齐 */
.timeline-item.right-position .timeline-header {
    justify-content: flex-start;
    text-align: left;
}

.timeline-item.right-position .timeline-header .memory-date,
.timeline-item.right-position .timeline-header .memory-title {
    text-align: left;
}

.timeline-item.right-position .timeline-body {
    text-align: left;
}

.timeline-item.right-position .timeline-body .memory-description {
    text-align: left;
}

/* 时间线图片 */
/* 回忆单张图片样式 */
.timeline-images {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.timeline-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.timeline-content:hover .timeline-images img {
    transform: scale(1.05);
}

/* 回忆多张图片网格样式 */
.timeline-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-start;
    max-width: none;
}

.timeline-image-item {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.15);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.timeline-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .timeline-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }

    .timeline-image-item {
        width: 100px;
        height: 100px;
    }
}

/* 轮播样式 */
.timeline-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 250px;
    border-radius: 10px;
    background: #f8f9fa;
}
.timeline-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(.22,.9,.35,1);
}
.timeline-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.timeline-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.timeline-prev, .timeline-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.75);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    z-index: 10;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    pointer-events: auto;
}
.timeline-prev { left: 12px; }
.timeline-next { right: 12px; }
.timeline-indicators {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    display: flex;
    gap: 8px;
    z-index: 6;
}
.timeline-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    pointer-events: auto;
}
.timeline-indicator.active {
    background: rgba(255,255,255,1);
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* 轮播控件默认隐藏，仅在鼠标悬浮或聚焦时显示（提高可用性） */
.timeline-carousel .timeline-prev,
.timeline-carousel .timeline-next,
.timeline-carousel .timeline-indicators {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.timeline-carousel:hover .timeline-prev,
.timeline-carousel:hover .timeline-next,
.timeline-carousel:hover .timeline-indicators,
.timeline-carousel:focus-within .timeline-prev,
.timeline-carousel:focus-within .timeline-next,
.timeline-carousel:focus-within .timeline-indicators {
    opacity: 1;
    visibility: visible;
}

/* 时间线文字内容 */
.timeline-body {
    padding: 25px;
}

.timeline-body .memory-description {
    color: #555;
    line-height: 1.7;
    margin: 0;
    font-size: 1rem;
}

/* 时间线控制按钮 */
.timeline-controls {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.timeline-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.timeline-controls .edit-btn {
    background: var(--sky-blue);
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    min-width: 70px;
    height: 36px;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 6px;
}

.timeline-controls .edit-btn:hover {
    background: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.3);
}

.timeline-controls .delete-btn {
    background: #dc3545;
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    min-width: 70px;
    height: 36px;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 6px;
}

.timeline-controls .delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* 回忆表单样式 */
.memory-form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.memory-form-overlay.show {
    opacity: 1;
}

.add-memory-form {
    background: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.add-memory-form.show {
    transform: translateY(0);
}

.memory-form-header {
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    color: white;
    padding: 25px;
    text-align: center;
}

.memory-form-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.memory-form-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.memory-form-body {
    padding: 30px;
}

.memory-form-group {
    margin-bottom: 25px;
}

.memory-editor-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.memory-editor-toolbar input[type="url"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.memory-editor-toolbar button {
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    background: var(--sky-blue);
    color: white;
    cursor: pointer;
}
.memory-editor-toolbar button:hover {
    background: var(--deep-blue);
}

/* 日志富文本编辑器样式 */
.diary-editor-toolbar {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diary-editor-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.diary-editor-toolbar .toolbar-group:last-child {
    border-bottom: none;
}

.diary-editor-toolbar select,
.diary-editor-toolbar input[type="color"],
.diary-editor-toolbar .toolbar-btn {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-height: 32px;
}

.diary-editor-toolbar select:hover,
.diary-editor-toolbar input[type="color"]:hover,
.diary-editor-toolbar .toolbar-btn:hover {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.1);
}

.diary-editor-toolbar select:focus,
.diary-editor-toolbar input[type="color"]:focus,
.diary-editor-toolbar .toolbar-btn:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.2);
}

.diary-editor-toolbar .toolbar-btn {
    min-width: 32px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.diary-editor-toolbar .toolbar-btn.active {
    background: var(--sky-blue);
    color: white;
    border-color: var(--sky-blue);
}

.diary-editor-toolbar .color-btn {
    position: relative;
    min-width: 28px;
    padding: 4px 6px;
}

.diary-editor-toolbar .color-btn span {
    font-weight: bold;
    font-size: 14px;
    display: block;
    text-shadow: none;
}

.diary-editor-toolbar .color-btn[data-value="#FFFFFF"] {
    border: 2px solid #ddd;
    background: #f8f9fa;
}

.diary-editor-toolbar .color-btn[data-value="#FFFFFF"]:hover {
    border-color: #999;
    background: #e9ecef;
}

.diary-editor-toolbar .color-btn[data-value="#FFFFFF"] span {
    text-shadow: 0 0 1px #000;
}

.diary-editor-toolbar .color-btn.active {
    box-shadow: 0 0 0 2px rgba(135, 206, 235, 0.5);
}

/* 富文本编辑器内嵌样式 */
.diary-editable table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    font-size: 0.9em;
}

.diary-editable table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    min-width: 60px;
}

.diary-editable table td:empty:before {
    content: '\00a0';
    color: #999;
}

/* 缩进样式 */
.diary-editable [style*="margin-left"] {
    /* 段落缩进样式由浏览器自动处理 */
}

/* 首行缩进样式 */
.diary-editable [style*="text-indent"] {
    /* 首行缩进样式 */
}

.diary-editable blockquote {
    border-left: 4px solid var(--sky-blue);
    padding-left: 16px;
    margin: 16px 0;
    color: var(--text-medium);
    font-style: italic;
    background: rgba(135, 206, 235, 0.05);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

.diary-editable pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    overflow-x: auto;
}

.diary-editable h1, .diary-editable h2, .diary-editable h3,
.diary-editable h4, .diary-editable h5, .diary-editable h6 {
    margin: 16px 0 8px 0;
    color: var(--deep-blue);
    font-weight: 600;
}

.diary-editable h1 { font-size: 1.8em; }
.diary-editable h2 { font-size: 1.6em; }
.diary-editable h3 { font-size: 1.4em; }
.diary-editable h4 { font-size: 1.2em; }
.diary-editable h5 { font-size: 1.1em; }
.diary-editable h6 { font-size: 1.0em; }

.diary-editable ul, .diary-editable ol {
    margin: 12px 0;
    padding-left: 24px;
}

.diary-editable li {
    margin: 4px 0;
}

.diary-editable a {
    color: var(--sky-blue);
    text-decoration: underline;
}

.diary-editable a:hover {
    color: var(--deep-blue);
}

.diary-editable img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.diary-editable hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 20px 0;
    height: 0;
}

.diary-editable sub, .diary-editable sup {
    font-size: 0.8em;
    vertical-align: baseline;
    position: relative;
}

.diary-editable sub {
    bottom: -0.2em;
}

.diary-editable sup {
    top: -0.3em;
}
.diary-editable {
    min-height: 140px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    outline: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    /* 强制默认行距 */
    line-height: 1.8;
}

/* 强制段落首行缩进2中文字符 */
/* 移除强制段落格式，用户可完全自定义 */
/*
.diary-editable p {
    text-indent: 2em;
    margin-bottom: 1em;
    line-height: 1.8;
}
*/

/* 段落间的适当间距 - 已移除，用户可自定义 */
/*
.diary-editable p + p {
    margin-top: 0.5em;
}
*/
.diary-editable:empty:before {
    content: attr(placeholder);
    color: var(--text-light);
}

.memory-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 1rem;
}

.memory-form-group input,
.memory-form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.memory-form-group input:focus,
.memory-form-group textarea:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(135, 206, 235, 0.1);
}

.memory-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* 图片预览网格 */
.memory-images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.memory-image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.memory-image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.memory-image-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.memory-image-item .remove-image:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item.left-position .timeline-content,
    .timeline-item.right-position .timeline-content {
        left: 80px !important;
        width: calc(100% - 80px) !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline-item.left-position .timeline-node,
    .timeline-item.right-position .timeline-node {
        left: 5px !important;
        right: auto !important;
    }

    .timeline-content {
        width: calc(100% - 80px) !important;
    }
}

/* 突出显示数字样式 */
.highlight-number {
    color: var(--sky-blue);
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(135, 206, 235, 0.3);
    animation: numberGlow 2s ease-in-out infinite alternate;
}

@keyframes numberGlow {
    from {
        text-shadow: 0 1px 2px rgba(135, 206, 235, 0.3);
    }
    to {
        text-shadow: 0 1px 4px rgba(135, 206, 235, 0.6), 0 0 8px rgba(135, 206, 235, 0.4);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item.visible {
    animation: fadeInUp 0.6s ease forwards;
}

/* 时间线连接线动画 */
.timeline::before {
    animation: lineGrow 2s ease forwards;
}

@keyframes lineGrow {
    from {
        height: 0;
    }
    to {
        height: calc(100% - 60px); /* 减去最后一个项的底部间距，避免空白 */
    }
}

/* 视频样式 */
.moment-videos {
    margin-top: 15px;
}

.moment-video {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--border);
    position: relative;
}

.moment-video video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

/* 视频加载状态样式 */
.moment-video video:invalid {
    border: 2px solid #f44336;
}

.moment-video video:valid {
    border: 1px solid var(--border);
}

/* 视频控制栏样式 */
.moment-video video::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.8);
}

.moment-video video::-webkit-media-controls {
    border-radius: 0 0 10px 10px;
}

/* 视频信息样式 */
.video-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    border-top: 1px solid #e9ecef;
}

.upload-secondary {
    font-size: 0.9rem;
    color: var(--text-light);
}

.file-preview {
    position: relative;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--sky-blue);
    background: white;
}

.preview-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
}

.preview-file-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-light);
    min-width: 200px;
    max-width: 200px;
}

.preview-file-item img,
.preview-file-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.preview-file-name {
    padding: 8px;
    font-size: 12px;
    color: var(--text-medium);
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid var(--border);
}

.remove-preview-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e53e3e;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.remove-preview-file:hover {
    opacity: 1;
}

.remove-file {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e53e3e;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-file:hover {
    background: #e53e3e;
    color: white;
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.cancel-btn,
.submit-btn {
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid;
}

.cancel-btn {
    background: white;
    border-color: var(--text-light);
    color: var(--text-light);
}

.cancel-btn:hover {
    background: var(--text-light);
    color: white;
}

.submit-btn {
    background: var(--sky-blue);
    border-color: var(--sky-blue);
    color: white;
}

.submit-btn:hover {
    background: var(--deep-blue);
    border-color: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

/* 卡片控制按钮样式 */
.card-controls {
    display: flex;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.edit-btn,
.delete-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.edit-btn {
    color: var(--sky-blue);
}

.edit-btn:hover {
    background: rgba(135, 206, 235, 0.1);
    color: var(--deep-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.2);
}

.delete-btn {
    color: #e53e3e;
}

.delete-btn:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}



/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-content {
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-content i {
    font-size: 4rem;
    color: var(--sky-blue);
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state-content h3 {
    font-size: 1.5rem;
    color: var(--text-medium);
    margin-bottom: 10px;
    font-weight: 600;
}

.empty-state-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.card-actions {
    display: flex;
    gap: 20px;
}


/* 日志卡片 */
.diary-container {
    display: grid;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.diary-card {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.diary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(135, 206, 235, 0.3);
}

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

.diary-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.diary-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    margin-right: 20px;
}

.diary-collapse-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.diary-collapse-btn:hover {
    background: rgba(135, 206, 235, 0.1);
    color: var(--sky-blue);
    transform: scale(1.05);
}

.diary-collapse-btn:active {
    transform: scale(0.95);
}

.diary-collapse-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.diary-title-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--deep-blue);
    line-height: 1.3;
    flex: 1;
    margin-right: 20px;
}

.diary-controls {
    display: flex;
    gap: 8px;
}

.diary-date {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

.diary-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 30px;
    /* 确保与编辑器样式完全一致 */
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 强制段落首行缩进2中文字符和行距 */
/* 移除强制段落格式，用户可完全自定义 */
/*
.diary-content p {
    text-indent: 2em;
    margin-bottom: 1em;
    line-height: 1.8;
}
*/

/* 段落间的适当间距 - 已移除，用户可自定义 */
/*
.diary-content p + p {
    margin-top: 0.5em;
}
*/

.diary-content p:last-child {
    margin-bottom: 0;
}

/* 日志折叠功能样式 */
.diary-content {
    transition: opacity 0.3s ease;
}

.diary-content.collapsed {
    display: none;
    opacity: 0;
}

.diary-content:not(.collapsed) {
    display: block;
    opacity: 1;
}

.diary-footer {
    transition: opacity 0.3s ease;
}

.diary-footer.collapsed {
    display: none;
    opacity: 0;
}

.diary-footer:not(.collapsed) {
    display: block;
    opacity: 1;
}

/* 确保富文本编辑器保存的样式在显示时正确渲染 */
.diary-content * {
    box-sizing: border-box;
}

/* 表格样式一致性 */
.diary-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
    font-size: inherit;
    line-height: inherit;
}

.diary-content table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    min-width: 60px;
}

/* 缩进样式 */
.diary-content [style*="margin-left"] {
    /* 段落缩进样式由浏览器自动处理 */
}

/* 首行缩进样式 */
.diary-content [style*="text-indent"] {
    /* 首行缩进样式 */
}

/* 引用块样式一致性 */
.diary-content blockquote {
    border-left: 4px solid var(--sky-blue);
    padding-left: 16px;
    margin: 16px 0;
    color: inherit;
    font-style: italic;
    background: rgba(135, 206, 235, 0.05);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

/* 代码块样式一致性 */
.diary-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
    overflow-x: auto;
    line-height: 1.4;
}

/* 标题样式一致性 */
.diary-content h1, .diary-content h2, .diary-content h3,
.diary-content h4, .diary-content h5, .diary-content h6 {
    margin: 16px 0 8px 0;
    color: var(--deep-blue);
    font-weight: 600;
    line-height: 1.3;
}

.diary-content h1 { font-size: 1.8em; }
.diary-content h2 { font-size: 1.6em; }
.diary-content h3 { font-size: 1.4em; }
.diary-content h4 { font-size: 1.2em; }
.diary-content h5 { font-size: 1.1em; }
.diary-content h6 { font-size: 1.0em; }

/* 列表样式一致性 */
.diary-content ul, .diary-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.diary-content li {
    margin: 4px 0;
    line-height: inherit;
}

/* 链接样式一致性 */
.diary-content a {
    color: var(--sky-blue);
    text-decoration: underline;
}

.diary-content a:hover {
    color: var(--deep-blue);
}

/* 图片样式一致性 */
.diary-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 水平线样式一致性 */
.diary-content hr {
    border: none;
    border-top: 2px solid var(--border);
    margin: 20px 0;
    height: 0;
}

/* 上标下标样式一致性 */
.diary-content sub, .diary-content sup {
    font-size: 0.8em;
    vertical-align: baseline;
    position: relative;
    line-height: 1;
}

.diary-content sub {
    bottom: -0.2em;
}

.diary-content sup {
    top: -0.3em;
}

.diary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diary-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--light-sky);
    color: var(--deep-blue);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--sky-blue);
}

/* 私密日志样式 */
.private-diary {
    border: 2px solid var(--warning-orange);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.private-indicator {
    color: var(--warning-orange);
    margin-left: 8px;
    font-size: 0.9em;
}

.private-indicator i {
    opacity: 0.8;
}

.private-content {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(255, 193, 7, 0.1) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255, 193, 7, 0.1) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255, 193, 7, 0.1) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255, 193, 7, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border: 2px dashed var(--warning-orange);
    border-radius: 10px;
    padding: 20px;
}

.private-placeholder {
    text-align: center;
    color: var(--text-light);
}

.private-placeholder i {
    font-size: 3rem;
    color: var(--warning-orange);
    margin-bottom: 15px;
    opacity: 0.7;
}

.private-placeholder p {
    margin: 8px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.private-placeholder p:first-of-type {
    color: var(--text-dark);
    font-weight: 600;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label:hover .checkmark {
    border-color: var(--sky-blue);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background-color: var(--sky-blue);
    border-color: var(--sky-blue);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}

/* 私密复选框文字样式（选中时高亮） */
.checkbox-label .checkbox-text {
    transition: color 0.18s ease, font-weight 0.18s ease, opacity 0.18s ease;
    color: var(--text-dark);
    opacity: 0.95;
}

.checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: var(--warning-orange);
    font-weight: 700;
    opacity: 1;
}

.diary-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.diary-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 事件卡片 */
.events-container {
    display: grid;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(135, 206, 235, 0.3);
}

.event-date {
    background: linear-gradient(135deg, var(--sky-blue), var(--soft-blue));
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    text-align: center;
    color: white;
}

.date-solar {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.date-lunar {
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 4px;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.8);
}

.event-content {
    flex: 1;
    padding: 30px;
    position: relative;
}

.event-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--deep-blue);
    margin-bottom: 15px;
}

.event-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: 25px;
}

.event-content .delete-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

.event-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.event-images img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.2);
}

.event-images img:hover {
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .profile-section {
        flex-direction: column;
        gap: 20px;
    }

    .nav-container {
        flex-wrap: wrap;
    }

    .nav-button {
        padding: 15px 30px;
    }

    .moments-container,
    .diary-container,
    .events-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 40px 20px 30px;
    }

    .profile-info h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .moment-card,
    .diary-card {
        padding: 25px;
    }

    .event-item {
        flex-direction: column;
    }

    .event-date {
        min-width: auto;
        padding: 20px;
    }

    .date-number {
        font-size: 1.5rem;
    }

    .event-content {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 30px 15px;
    }

    .profile-info h1 {
        font-size: 1.8rem;
    }

    .weather-widget {
        padding: 10px 20px;
    }

    .nav-button {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .diary-title-section {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        width: 100%;
    }

    .diary-controls {
        align-self: flex-end;
    }

    .diary-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--deep-blue);
}

/* 自定义确认对话框 */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.confirm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.confirm-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(135, 206, 235, 0.3);
    border: 2px solid var(--sky-blue);
    max-width: 400px;
    width: 90%;
    margin: 20px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.confirm-modal-header {
    padding: 25px 25px 15px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.confirm-modal-header i {
    font-size: 2.5rem;
    color: #ff6b35;
    margin-bottom: 10px;
}

.confirm-modal-header h3 {
    color: var(--deep-blue);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.confirm-modal-body {
    padding: 25px;
    text-align: center;
}

.confirm-modal-body p {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* 回忆删除确认的特殊样式 */
.confirm-modal-content.deletion-warning {
    border-color: #ff6b35;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.4);
}

.deletion-warning .confirm-modal-header {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 107, 53, 0.05));
    border-bottom-color: rgba(255, 107, 53, 0.2);
}

.deletion-warning .confirm-modal-header i {
    color: #ff6b35;
    animation: warningPulse 2s infinite;
}

.deletion-warning .confirm-modal-body p {
    color: var(--text-dark);
    font-weight: 500;
}

.deletion-warning .delete-confirm-btn {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    border-color: #ff6b35;
    animation: dangerGlow 2s infinite alternate;
}

@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes dangerGlow {
    0% { box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3); }
    100% { box-shadow: 0 4px 20px rgba(255, 107, 53, 0.5); }
}

.confirm-modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    min-width: 100px;
    justify-content: center;
}

.cancel-btn {
    background: white;
    border-color: var(--text-light);
    color: var(--text-light);
}

.cancel-btn:hover {
    background: var(--text-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.delete-confirm-btn {
    background: #ff6b35;
    border-color: #ff6b35;
    color: white;
}

.delete-confirm-btn:hover {
    background: #e55a2b;
    border-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

@media (max-width: 480px) {
    .confirm-modal-footer {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
    }
}

/* 图片查看器样式 */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-viewer.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

/* 移动端更紧凑的导航样式，确保横向显示 */
@media (max-width: 480px) {
    .nav-container {
        padding: 6px 8px;
    }

    .nav-buttons {
        display: flex;
        gap: 6px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        align-items: center;
    }

    .nav-button {
        padding: 6px 8px;
        font-size: 0.78rem;
        min-width: auto;
        white-space: nowrap;
    }

    .nav-button i {
        font-size: 0.95rem;
        margin-right: 6px;
    }

    .nav-button span {
        display: inline-block;
    }
}

.image-viewer-header {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    z-index: 2;
}

.image-counter {
    font-size: 16px;
    font-weight: 500;
}

.close-viewer {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.close-viewer:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-viewer-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 2;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.image-container {
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .image-viewer-header {
        top: -50px;
    }

    .image-viewer-body {
        gap: 10px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .image-container {
        max-width: 95vw;
        max-height: 70vh;
    }
}
/* 动画类 */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    background: var(--sky-blue);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.notification-content i {
    font-size: 1.2rem;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 登录按钮样式 */
.login-btn, .logout-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    color: white;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.3);
}

.login-btn:hover, .logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(135, 206, 235, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.logout-btn:hover {
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.4);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-medium);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--text-dark);
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.modal-body .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.modal-body .form-group input:focus {
    outline: none;
    border-color: var(--sky-blue);
}

.modal-body .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.modal-body .cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-body .cancel-btn:hover {
    background: #5a6268;
}

.modal-body .submit-btn {
    background: linear-gradient(135deg, var(--sky-blue), var(--deep-blue));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-body .submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px 15px;
    }

    .nav-buttons {
        order: 2;
    }

    .nav-auth {
        order: 1;
    }

    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* 错误提示模态框样式 */
.error-modal {
    max-width: 400px;
    animation: errorShake 0.5s ease-in-out;
}

.error-header {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.error-header h3 {
    color: white;
}

.error-content {
    text-align: center;
    padding: 20px 0;
}

.error-icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
}

.error-icon i {
    animation: errorPulse 2s infinite;
}

#errorMessage {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.5;
}

.error-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.error-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* 错误动画效果 */
@keyframes errorShake {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    10%, 30%, 50%, 70%, 90% { transform: translate(-50%, -50%) scale(1.02); }
    20%, 40%, 60%, 80% { transform: translate(-50%, -50%) scale(0.98); }
}

@keyframes errorPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .error-modal {
        margin: 30px;
        width: calc(100% - 60px);
    }

    .error-content {
        padding: 15px 0;
    }

    .error-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
}



/* 拖拽上传区域样式增强 */
.file-upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area.drag-over {
    background: rgba(135, 206, 235, 0.1);
    border-color: var(--sky-blue);
    transform: scale(1.02);
}

.file-upload-area.drag-over .upload-icon {
    color: var(--sky-blue);
    transform: scale(1.1);
}

.file-upload-area.drag-over .upload-text {
    color: var(--sky-blue);
}

/* 回忆图片预览样式 */
.memory-image-item {
    position: relative;
    display: inline-block;
    margin: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--sky-blue);
}

.memory-image-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
}

.memory-image-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.memory-image-item .remove-image:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* 回忆图片查看器样式 */
.memory-image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.memory-image-viewer.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.memory-image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.memory-image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.memory-image-viewer-header {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    z-index: 2;
}

.memory-image-counter {
    font-size: 16px;
    font-weight: 500;
}

.memory-close-viewer {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.memory-close-viewer:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.memory-image-viewer-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.memory-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 2;
}

.memory-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.memory-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.memory-image-container {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .memory-image-viewer-header {
        top: -50px;
    }

    .memory-image-viewer-body {
        gap: 10px;
    }

    .memory-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .memory-image-container {
        max-width: 95vw;
        max-height: 70vh;
    }
}


/* 日记日期信息样式 */

/* 有声日志样式 */
.audio-play-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    /* 调整图标大小（较标题略小） */
    font-size: 1.4rem;
    line-height: 1.25;
    padding: 0 4px;
    margin: 0 3px;
    border-radius: 4px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    /* 限制按钮高度以与标题对齐（略小） */
    height: 1.4rem;
}

.audio-play-btn:hover {
    background-color: rgba(0, 123, 255, 0.08);
    color: #0056b3;
    transform: scale(1.03);
}

.audio-play-btn:active {
    transform: scale(0.95);
}

/* 录音功能样式 */
.audio-recording-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background-color: #f8f9fa;
}

.audio-recording-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.record-btn, .stop-btn, .play-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.record-btn {
    background-color: #dc3545;
    color: white;
}

.record-btn:hover {
    background-color: #c82333;
}

.stop-btn {
    background-color: #6c757d;
    color: white;
}

.stop-btn:hover {
    background-color: #5a6268;
}

.play-btn {
    background-color: #28a745;
    color: white;
}

.play-btn:hover {
    background-color: #218838;
}

.recording-indicator {
    color: #dc3545;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.recording-dot {
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.audio-preview {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background-color: white;
}

.audio-preview audio {
    width: 100%;
    margin-bottom: 8px;
}

.delete-audio-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
}

.delete-audio-btn:hover {
    background-color: #c82333;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .audio-recording-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .record-btn, .stop-btn, .play-btn {
        justify-content: center;
        padding: 12px 16px;
    }

    .audio-play-btn {
        font-size: 14px;
        padding: 0 6px;
        margin: 0 2px;
    }
}
