* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(-45deg, #eaeded, #e5e9e9, #e0e4e4, #eaeded);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;
    color: #2d4a22;
    position: relative; /* 为绝对定位的背景图提供参考点 */
    overflow-x: hidden; /* 防止横向滚动条 */
}

/* 顶部背景图 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px; /* 设置一个具体高度 */
    background-image: url('../picture/background1.png');
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto; /* 宽度与页面匹配，高度自适应保持比例 */
    z-index: -1; /* 确保在内容后面 */
}

/* 右下角背景图 */
body::after {
    content: '';
    position: fixed; 
    bottom: 0;
    right: 0;
    width: 300px; 
    height: 300px;
    background-image: url('../picture/background2.png');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain; /* 保持原图比例 */
    z-index: -1; /* 确保在内容后面 */
}

/* 左下角背景图 */
body::after {
    content: '';
    position: fixed; 
    bottom: 0;
    left: 0;
    width: 100px; 
    height: 100px;
    background-image: url('../picture/background3.png');
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: contain; /* 保持原图比例 */
    opacity: 0.6; /* 设置透明度 */
    z-index: 10; /* 浮于内容之上 */
    pointer-events: none; /* 不阻挡点击事件 */
}

/* 固定位置的退出登录按钮
.logout-btn-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(214, 52, 71, 0.15);
    border: 1px solid rgba(214, 52, 71, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    z-index: 999;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.logout-btn-fixed:hover {
    background: rgba(214, 52, 71, 0.25);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
} */

/* 登录模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 74, 34, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    background: rgba(234, 237, 237, 0.95); /* 从黄色改为灰色 */
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(69, 134, 26, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(200, 205, 205, 0.5); /* 边框颜色也调整 */
    text-align: center;
    min-width: 350px;
    animation: slideDown 0.3s ease;
}

.modal-content h2 {
    color: #45861a;
    margin-bottom: 25px;
    font-size: 1.5em;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #45861a;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #2d4a22;
    transform: scale(1.1);
}

.modal-content input, .modal-content textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(200, 205, 205, 0.5); /* 边框颜色调整 */
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 15px;
    background: rgba(234, 237, 237, 0.8); /* 从黄色改为灰色 */
    color: #2d4a22;
    transition: all 0.3s ease;
}

.modal-content textarea {
    resize: vertical; /* 允许垂直调整大小 */
    min-height: 120px; /* 设置最小高度 */
    white-space: pre-wrap; /* 保留换行和空格 */
    line-height: 1.5; /* 增加行高，提高可读性 */
}

.modal-content input:focus, .modal-content textarea:focus {
    outline: none;
    border-color: rgba(180, 185, 185, 0.7); /* 聚焦时边框颜色 */
    background: rgba(234, 237, 237, 0.95); /* 聚焦时背景色 */
}

.login-btn {
    width: 100%;
    background: rgba(69, 134, 26, 0.8);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.login-btn:hover {
    background: rgba(69, 134, 26, 1);
    transform: translateY(-2px);
}

.error-message {
    color: #d63447;
    margin-top: 10px;
    font-size: 14px;
    min-height: 20px;
}

/* 移除原来的退出登录按钮样式（因为已移到固定位置） */
.logout-btn {
    display: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 20px 20px; /* 增加顶部padding为固定按钮留空间 */
}

.header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(69, 134, 26, 0.15);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(69, 134, 26, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(69, 134, 26, 0.25);
    /* 移除浮动动画 */
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #2d4a22;
}

.header h1 .title-prefix {
    font-size: 0.7em;
    color: #45861a;
    margin-right: 5px;
}

/* 头部标志图片样式 */
.header-logo {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.header-logo:hover {
    transform: scale(1.1);
}

.header h1 .emoji {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
    border-radius: 8px; /* 为PNG图片添加圆角 */
}

.header h1 .emoji:hover {
    transform: scale(1.2);
}

.header .subtitle {
    font-size: 0.9em;
    color: #45861a;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
    font-family: 'Times New Roman', serif;
}

/* 导航按钮 */
.nav {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-btn {
    background: rgba(155, 186, 157, 0.2);
    color: #2d4a22;
    border: none;
    padding: 15px 20px;  /* 减小左右内边距 */
    border-radius: 12px;  /* 从50px减小到12px */
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(173, 200, 151, 0.3);
}

.nav-btn:hover {
    background: rgba(155, 186, 157, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(69, 134, 26, 0.1);
}

.nav-btn.active {
    background: rgba(69, 134, 26, 0.2);
    box-shadow: 0 4px 15px rgba(69, 134, 26, 0.1);
    color: #2d4a22;
    border-color: rgba(69, 134, 26, 0.3);
}

/* 时间轴控制按钮 */
.timeline-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid rgba(173, 200, 151, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d4a22;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: rgba(69, 134, 26, 0.6);
    box-shadow: 0 0 0 3px rgba(69, 134, 26, 0.1);
}

.date-search-input {
    padding: 10px 15px;
    border: 1px solid rgba(173, 200, 151, 0.4);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d4a22;
    font-size: 14px;
    transition: all 0.3s ease;
}

.date-search-input:focus {
    outline: none;
    border-color: rgba(69, 134, 26, 0.6);
    box-shadow: 0 0 0 3px rgba(69, 134, 26, 0.1);
}

.clear-search-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #cc0000;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1;
}

.clear-search-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.05);
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-status {
    text-align: center;
    padding: 10px 15px;
    background: rgba(69, 134, 26, 0.1);
    border: 1px solid rgba(69, 134, 26, 0.2);
    border-radius: 8px;
    color: #2d4a22;
    font-size: 14px;
    margin-bottom: 15px;
    backdrop-filter: blur(4px);
}

.sort-btn, .refresh-btn {
    background: rgba(155, 186, 157, 0.25);
    border: 1px solid rgba(173, 200, 151, 0.4);
    color: #2d4a22;
    padding: 8px 15px;  /* 减小内边距使按钮更紧凑 */
    border-radius: 8px;  /* 从20px减小到8px */
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;  /* 减小图标和文本之间的间距 */
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-weight: 500;
    min-width: auto;  /* 移除最小宽度限制 */
    width: auto;  /* 使按钮宽度自适应内容 */
}

.sort-btn:hover, .refresh-btn:hover {
    background: rgba(155, 186, 157, 0.4);
    transform: translateY(-1px);
}

.sort-icon, .refresh-icon {
    font-size: 1.2em;
    color: #45861a;
}

.sort-text, .refresh-text {
    color: #2d4a22;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #68a63f;
    font-size: 18px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: rgba(143, 187, 128, 0.4);
    top: 0;
}

.timeline-item {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.timeline-content {
    background: rgba(234, 237, 237, 0.4); /* 从黄色改为浅灰色 */
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(69, 134, 26, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(220, 225, 225, 0.5); /* 边框也改为灰色系 */
    position: relative;
    max-width: 600px;
    width: 100%;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    background: rgba(234, 237, 237, 0.6); /* 悬停时也使用相同色系 */
    box-shadow: 0 12px 40px rgba(69, 134, 26, 0.15);
}

.timeline-date {
    position: absolute;
    top: -5px; /* 从-15px改为-10px，缩短与上边框的距离 */
    left: 10px;
    color: #2d4a22;
    font-size: 0.9em;
    background: rgba(234, 237, 237, 0.9); /* 修改为灰色背景 */
    padding: 4px 12px; /* 减小内边距 */
    border-radius: 15px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(220, 225, 225, 0.7); /* 修改边框颜色 */
    font-weight: 500;
}

.timeline-media {
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.timeline-media img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.timeline-media img:hover {
    transform: scale(1.02);
}

.timeline-media video {
    width: 100%;
    border-radius: 6px;
}

.timeline-text {
    color: #2d4a22;
    line-height: 1.6;
}

.timeline-text p {
    white-space: pre-line; /* 保留换行符和空格 */
    word-wrap: break-word; /* 长单词自动换行 */
}

.timeline-text h3 {
    margin-bottom: 10px;
    color: #45861a;
    font-size: 1.2em;
}

.timeline-posted {
    font-size: 0.8em;
    color: #68a63f;
    margin-top: 10px; /* 从15px减为10px */
    text-align: right;
    font-style: italic;
}

/* 删除按钮样式 */
.timeline-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
}

.delete-btn, .edit-btn {
    background: rgba(214, 52, 71, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-size: 18px;
}

.delete-btn {
    color: #d63447;
}

.edit-btn {
    background: rgba(69, 134, 26, 0.2);
    color: #45861a;
}

.delete-btn:hover {
    background: rgba(214, 52, 71, 0.3);
    transform: scale(1.1);
}

.edit-btn:hover {
    background: rgba(69, 134, 26, 0.3);
    transform: scale(1.1);
}

.delete-btn::before {
    content: '×';
    font-weight: bold;
}

.edit-btn::before {
    content: '✎';
    font-weight: bold;
}

/* 空状态消息 */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #68a63f;
    font-size: 1.2em;
    background: rgba(234, 237, 237, 0.4); /* 从绿色改为灰色 */
    border-radius: 20px;
    border: 2px dashed rgba(200, 205, 205, 0.6); /* 边框也改为灰色系 */
}

/* 主要内容区域 */
.section {
    display: none;
    background: rgba(234, 237, 237, 0.25); /* 修改为灰色背景 */
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(69, 134, 26, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(220, 225, 225, 0.6); /* 修改边框颜色 */
    margin-bottom: 30px;
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.section h2 {
    color: #45861a;
    font-weight: 600;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-align: center;
}

/* 上传类型切换按钮 */
.upload-options {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.upload-type-btn {
    background: rgba(155, 186, 157, 0.2);
    border: 1px solid rgba(173, 200, 151, 0.3);
    color: #2d4a22;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    font-weight: 500;
    font-size: 14px;
}

.upload-type-btn:hover {
    background: rgba(155, 186, 157, 0.35);
    transform: translateY(-1px);
}

.upload-type-btn.active {
    background: rgba(69, 134, 26, 0.2);
    border-color: rgba(69, 134, 26, 0.3);
    color: #2d4a22;
    font-weight: 600;
}

/* 上传区域样式 */
.upload-area {
    background: rgba(234, 237, 237, 0.4); /* 从黄色改为灰色 */
    border: 2px dashed rgba(200, 205, 205, 0.6); /* 边框也改为灰色系 */
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(234, 237, 237, 0.6); /* 悬停状态也改为灰色系 */
    border-color: rgba(180, 185, 185, 0.8);
}

.upload-area h3 {
    font-size: 1.2em;
    color: #45861a;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-area p {
    font-size: 0.9em;
    color: #2d4a22;
    margin-bottom: 15px;
}

.hidden {
    display: none;
}

/* 预览区域 */
.upload-preview {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.preview-item {
    background: rgba(234, 237, 237, 0.3); /* 从黄色改为灰色 */
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(200, 205, 205, 0.5); /* 边框颜色也调整 */
}

.preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.video-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #68a63f;
}

.file-name {
    font-size: 12px;
    color: #68a63f;
    word-break: break-word;
}

/* 通用按钮样式 */
.upload-btn {
    background: rgba(69, 134, 26, 0.2);
    color: #2d4a22;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    margin: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(173, 200, 151, 0.3);
    font-weight: 500;
}

.upload-btn:hover {
    background: rgba(69, 134, 26, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(69, 134, 26, 0.2);
}

.upload-btn:disabled {
    background: rgba(155, 186, 157, 0.2);
    color: #68a63f;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 提交按钮 */
.submit-btn {
    background: rgba(69, 134, 26, 0.25);
    color: #2d4a22;
    font-weight: 600;
    font-size: 1.1em;
    padding: 15px 30px;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    background: rgba(69, 134, 26, 0.35);
    transform: translateY(-2px);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d4a22;
    font-weight: 500;
    font-size: 1em;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(234, 237, 237, 0.5); /* 从黄色改为灰色 */
    border: 1px solid rgba(200, 205, 205, 0.5); /* 边框颜色调整 */
    border-radius: 10px;
    font-size: 14px;
    color: #2d4a22;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    background: rgba(234, 237, 237, 0.7); /* 聚焦时背景色 */
    border-color: rgba(180, 185, 185, 0.7); /* 聚焦时边框颜色 */
}

/* 占位符文字样式 */
input::placeholder,
textarea::placeholder {
    color: #68a63f !important;
    opacity: 0.8;
}

/* 日期选择器样式 */
input[type="datetime-local"] {
    background: rgba(234, 237, 237, 0.5); /* 从黄色改为灰色 */
    border: 1px solid rgba(200, 205, 205, 0.5); /* 边框颜色调整 */
    border-radius: 10px;
    padding: 12px;
    color: #2d4a22;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

input[type="datetime-local"]:focus {
    background: rgba(234, 237, 237, 0.7); /* 聚焦时背景色 */
    border-color: rgba(180, 185, 185, 0.7); /* 聚焦时边框颜色 */
    outline: none;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: opacity(0.6);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    background-color: rgba(155, 186, 157, 0.2);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    filter: opacity(1);
    background-color: rgba(155, 186, 157, 0.3);
}

input[type="datetime-local"]::-webkit-datetime-edit {
    color: #2d4a22;
}

input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    color: #2d4a22;
}

input[type="datetime-local"]::-webkit-datetime-edit-text {
    color: #2d4a22;
    opacity: 0.8;
}

input[type="datetime-local"]::-webkit-datetime-edit-month-field,
input[type="datetime-local"]::-webkit-datetime-edit-day-field,
input[type="datetime-local"]::-webkit-datetime-edit-year-field,
input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
    color: #2d4a22;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 80px; /* 调整位置避免与退出按钮重叠 */
    padding: 15px 25px;
    border-radius: 50px;
    background: rgba(254, 245, 211, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(155, 186, 157, 0.3);
    color: #2d4a22;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(69, 134, 26, 0.1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: rgba(155, 186, 157, 0.3);
    color: #45861a;
    border-color: rgba(69, 134, 26, 0.3);
}

.notification.error {
    background: rgba(214, 52, 71, 0.15);
    color: #d63447;
    border-color: rgba(214, 52, 71, 0.3);
}

/* 底部文字 */
.footer {
    text-align: center;
    margin-top: 40px;
    color: #3a4149;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.5);
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
        flex-wrap: wrap;
    }
    
    /* 在平板设备上调整标志图片大小 */
    .header-logo {
        height: 60px; /* 稍微减小高度 */
    }
    
    .nav {
        flex-direction: row; /* 改为水平排列 */
        align-items: center;
        justify-content: center;
        gap: 10px; /* 减小间距 */
    }
    
    .nav-btn {
        width: auto; /* 自适应内容宽度 */
        padding: 10px 15px; /* 减小内边距 */
        font-size: 14px; /* 减小字体 */
    }
    
    .container {
        padding: 10px;
    }
    
    .timeline::before {
        left: 5px; /* 将时间轴线更靠近左侧 */
    }
    
    .search-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    .search-container .search-input {
        width: 100%;
        max-width: 300px;
        order: 1;
    }
    
    /* 将日期搜索框和清除按钮包装在一个flex容器中 */
    .search-container .date-search-input {
        width: 65%;
        min-width: 120px;
        order: 2;
    }
    
    .search-container .clear-search-btn {
        width: 30%;
        min-width: 60px;
        max-width: 80px;
        order: 3;
        padding: 10px 8px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* 使用CSS Grid在移动端重新排列元素 */
    .search-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    .search-container .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    /* 创建一个flex容器来包含日期搜索框和清除按钮 */
    .search-container {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    .search-container .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    /* 移动端：为日期搜索框和清除按钮创建一个flex行 */
    .search-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    /* 使用CSS Grid来重新布局移动端搜索容器 */
    .search-container {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        justify-content: center;
        align-items: center;
    }
    
    /* 第一行：文本搜索框占满宽度 */
    .search-container .search-input {
        width: 100%;
        max-width: 300px;
        order: 1;
        flex-basis: 100%;
    }
    
    /* 第二行：日期搜索框和清除按钮并排 */
    .search-container .date-search-input {
        width: auto;
        min-width: 180px;
        max-width: 200px;
        flex: 1;
        order: 2;
    }
    
    .search-container .clear-search-btn {
        width: auto;
        min-width: 60px;
        max-width: 80px;
        padding: 10px 12px;
        font-size: 14px;
        order: 3;
        flex: 0 0 auto;
    }
    
    .control-buttons {
        gap: 8px;
    }
    
    .sort-btn, .refresh-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .timeline-content {
        margin-left: 10px; /* 减小左侧边距 */
        max-width: calc(100% - 20px); /* 增加内容框宽度 */
    }
    
    .timeline-date {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 15px;
        display: inline-block;
    }
    
    .upload-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .modal-content {
        margin: 20px;
        min-width: auto;
        width: calc(100% - 40px);
        max-width: 400px;
    }
    
    .upload-options {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-type-btn {
        width: 200px;
    }
    
    /* 修改移动端时间轴控制按钮样式 */
    .timeline-controls {
        flex-direction: row; /* 在移动端也保持水平排列 */
        justify-content: center;
        gap: 10px;
    }
    
    /* 调整底部文字在平板设备上的样式 */
    .footer {
        margin-top: 30px;
        padding: 12px;
        font-size: 13px;
        border-radius: 15px;
    }
}

/* 添加手机端删除按钮样式 */
@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    /* 在手机设备上调整标志图片大小 */
    .header-logo {
        height: 40px; /* 根据需求减小到40px */
    }
    
    /* 手机端调整按钮尺寸 */
    .delete-btn, .edit-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .timeline-actions {
        top: 8px;
        right: 8px;
        gap: 5px;
    }
    
    .section {
        padding: 20px;
    }
    
    
    .upload-area {
        padding: 25px 15px;
    }
    
    .timeline-content {
        padding: 20px 15px;
    }
    
    /* 调整底部文字在小屏手机上的样式 */
    .footer {
        margin-top: 20px;
        padding: 10px;
        font-size: 12px;
        border-radius: 10px;
    }
}

/* 多文件上传相关样式 */
.upload-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.clear-btn {
    background: rgba(214, 52, 71, 0.2);
    color: #d63447;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(214, 52, 71, 0.3);
    font-weight: 500;
}

.clear-btn:hover {
    background: rgba(214, 52, 71, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(214, 52, 71, 0.2);
}

.files-counter {
    background: rgba(69, 134, 26, 0.15);
    color: #2d4a22;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid rgba(69, 134, 26, 0.2);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.preview-image-container,
.preview-video-container {
    position: relative;
    display: inline-block;
}

.remove-file-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(214, 52, 71, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file-btn:hover {
    background: rgba(214, 52, 71, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(214, 52, 71, 0.4);
}

.preview-image-container img {
    display: block;
}

.preview-video-container .video-icon {
    position: relative;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .upload-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .files-counter {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .remove-file-btn {
        width: 20px;
        height: 20px;
        font-size: 14px;
        top: 3px;
        right: 3px;
    }
}

/* 文本上传区域样式 */
.text-upload-info {
    text-align: center;
    padding: 40px 20px;
    background: rgba(234, 237, 237, 0.2);
    border-radius: 15px;
    border: 2px dashed rgba(173, 200, 151, 0.3);
}

.text-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 15px;
}

.text-upload-info p {
    font-size: 16px;
    color: #68a63f;
    font-weight: 500;
}

/* 图片轮播样式 */
.image-carousel {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    /* 触摸优化 */
    touch-action: pan-y; /* 只允许垂直滚动，水平手势用于切换 */
    user-select: none; /* 防止文本选择 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.carousel-slide img:hover {
    transform: scale(1.02);
}

.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #000;
}

.carousel-slide video:hover {
    transform: scale(1.02);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* 单张图片样式 */
.single-image {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.single-image img:hover {
    transform: scale(1.02);
}

.single-video {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-video video {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

/* 图片模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-image-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-image-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: #000;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: -70px;
}

.modal-next {
    right: -70px;
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-progress-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.modal-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}

.modal-progress-bar.active {
    background: rgba(255, 255, 255, 0.4);
}

.modal-progress-bar.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    animation: progressFill 3s linear forwards;
}

.modal-progress-bar.completed {
    background: rgba(255, 255, 255, 0.8);
}

.modal-progress-bar.completed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 2px;
}

/* 视频模态框特殊样式 */
.video-modal .modal-progress-bar.active {
    background: rgba(255, 255, 255, 0.4);
}

.video-modal .modal-progress-bar.active::after {
    display: none; /* 视频不需要时间填充动画，依赖视频本身的播放进度 */
}

@keyframes progressFill {
    from {
        width: 0;
        box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
    }
    to {
        width: 100%;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    }
}

.modal-counter {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
        /* 移动端触摸优化 */
        touch-action: pan-y;
        -webkit-touch-callout: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
        /* 在移动端保持按钮可见，但降低透明度，因为现在支持滑动 */
        opacity: 0.7;
        transition: opacity 0.3s ease;
    }
    
    .carousel-btn:active {
        opacity: 1;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel-counter {
        top: 5px;
        right: 5px;
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .carousel-dots {
        bottom: 10px;
        gap: 4px;
    }
    
    .carousel-dot {
        width: 6px;
        height: 6px;
    }
    
    .single-image img {
        max-height: 300px;
    }
    
    .modal-image-container {
        max-width: 98%;
        max-height: 90%;
        /* 改善触摸体验 */
        touch-action: pan-x; /* 只允许水平滑动 */
        user-select: none; /* 防止选中 */
    }
    
    .modal-image-container img {
        border-radius: 4px;
        /* 防止图片拖拽 */
        pointer-events: none;
    }
    
    /* 移动端导航按钮优化 */
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
        /* 增加触摸区域 */
        padding: 10px;
        /* 改善触摸反馈 */
        transition: all 0.2s ease;
    }
    
    .modal-prev {
        left: -55px;
    }
    
    .modal-next {
        right: -55px;
    }
    
    .modal-close {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: -50px;
        right: -50px;
    }
    
    .modal-progress-container {
        bottom: 10px;
        left: 15px;
        right: 15px;
    }
    
    .modal-progress-bar {
        height: 3px;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .modal-prev {
        left: -50px;
    }
    
    .modal-next {
        right: -50px;
    }
    
    .modal-close {
        top: -30px;
        right: -30px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .modal-counter {
        bottom: -50px;
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* 更小屏幕的额外优化 */
@media (max-width: 480px) {
    .modal-image-container {
        max-width: 100%;
        max-height: 92%;
    }
    
    .modal-progress-container {
        bottom: 8px;
        left: 10px;
        right: 10px;
        gap: 2px;
    }
    
    .modal-counter {
        bottom: -45px;
        font-size: 11px;
    }
    
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .modal-prev {
        left: -45px;
    }
    
    .modal-next {
        right: -45px;
    }
    
    .modal-close {
        top: -25px;
        right: -25px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}

/* 编辑模态框样式 */
.edit-modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.edit-media-section {
    border: 1px solid rgba(173, 200, 151, 0.3);
    border-radius: 12px;
    padding: 20px;
    background: rgba(234, 237, 237, 0.1);
}

.current-media {
    margin-bottom: 20px;
}

.no-media-text {
    text-align: center;
    color: #68a63f;
    font-style: italic;
    padding: 20px;
}

.current-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.current-media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.current-media-item img,
.current-media-item video {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
}

.remove-current-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(214, 52, 71, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-current-media:hover {
    background: rgba(214, 52, 71, 1);
    transform: scale(1.1);
}

.media-edit-controls {
    border-top: 1px solid rgba(173, 200, 151, 0.2);
    padding-top: 20px;
}

.upload-type-selector {
    margin-bottom: 15px;
}

.upload-type-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d4a22;
}

.media-type-btn {
    background: rgba(69, 134, 26, 0.1);
    color: #2d4a22;
    border: 1px solid rgba(173, 200, 151, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.media-type-btn:hover {
    background: rgba(69, 134, 26, 0.2);
}

.media-type-btn.active {
    background: rgba(69, 134, 26, 0.3);
    color: #2d4a22;
    font-weight: 600;
}

.edit-upload-area {
    margin-top: 15px;
}

.small-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 15px;
}

.edit-preview {
    margin-top: 15px;
}

.edit-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.edit-preview-item {
    background: rgba(234, 237, 237, 0.3);
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    border: 1px solid rgba(200, 205, 205, 0.5);
}

.edit-preview-image-container,
.edit-preview-video-container {
    position: relative;
    display: inline-block;
}

.edit-preview-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 5px;
}

.edit-preview-video-container .video-icon {
    font-size: 32px;
    margin-bottom: 5px;
    color: #68a63f;
}

.remove-edit-file-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(214, 52, 71, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-edit-file-btn:hover {
    background: rgba(214, 52, 71, 1);
    transform: scale(1.1);
}

.edit-file-name {
    font-size: 10px;
    color: #68a63f;
    word-break: break-word;
    display: block;
}

/* 移动端编辑模态框适配 */
@media (max-width: 768px) {
    .edit-modal-content {
        max-width: 95%;
        margin: 10px;
        padding: 15px;
    }
    
    .current-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .current-media-item img,
    .current-media-item video {
        height: 100px;
    }
    
    .media-type-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-right: 5px;
        margin-bottom: 5px;
    }
    
    .edit-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .edit-preview-item img {
        width: 60px;
        height: 60px;
    }
    
    .edit-preview-video-container .video-icon {
        font-size: 24px;
    }
}