/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--primary-color);
}

/* 固定顶部的页眉样式（仅用于关于我们、使用条款、隐私政策、联系我们页面） */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 0 30px;
}

/* 返回主页按钮样式 */
.home-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f2f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background-color: #e4e6e9;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 深色模式适配 */
body.dark-mode .home-btn {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .home-btn:hover {
    background-color: #4a4a4a;
    color: #fff;
}

/* 将主题按钮和明暗切换按钮移动到登录按钮旁边 */
.theme-controls {
    order: 2;
    margin-right: 10px;
}

.auth-links {
    order: 3;
}

.datetime {
    order: 1;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
}

/* 日期时间显示样式 */
.datetime {
    font-size: 16px;
    color: #333;
    font-weight: normal;
    text-align: center;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
}

/* 日历图标样式 */
.calendar-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    background-color: #1e90ff;
    color: #fff;
    border-radius: 2px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-right: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    vertical-align: middle;
    display: inline-flex;
    flex-shrink: 0;
}

.calendar-icon::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 1px;
    background-color: rgba(255,255,255,0.3);
    border-radius: 1px;
}

.calendar-day {
    position: relative;
    z-index: 1;
    font-size: 11px;
}

/* 星期图标样式 */
.weekday-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    background-color: #4caf50;
    color: #fff;
    border-radius: 2px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    margin: 0 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    text-align: center;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    flex-shrink: 0;
}

.weekday-text {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 时间图标样式 */
.time-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    background-color: #ff9800;
    color: #fff;
    border-radius: 2px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    margin: 0 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    vertical-align: middle;
    display: inline-flex;
    flex-shrink: 0;
}

/* 自定义时钟图标 */
.time-icon::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid #fff;
    border-radius: 50%;
}

/* 时针 */
.time-icon::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 3px;
    background-color: #fff;
    border-radius: 1px;
    top: 7px;
    transform-origin: bottom center;
    transform: rotate(var(--hour-angle, 45deg));
}

/* 分针 */
.time-icon .time-icon-text::before {
    content: '';
    position: absolute;
    width: 1px;
    height: 4px;
    background-color: #fff;
    border-radius: 1px;
    top: 6px;
    transform-origin: bottom center;
    transform: rotate(var(--minute-angle, -45deg));
}

/* 时钟中心点 */
.time-icon .time-icon-text::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #fff;
    border-radius: 50%;
    top: 9px;
}

.datetime span {
    margin: 0 5px;
}

/* 农历日期样式 */
.lunar-date {
    color: #666;
    font-size: 14px;
    font-weight: normal;
    margin-left: 8px;
}

.logo img {
    width: 80px;
    height: 80px;
}

/* 搜索框容器样式 */
.search-box-container {
    border-radius: 8px;
    padding: 15px 30px;
    margin-bottom: 20px;
}

/* 搜索引擎选择样式 */
.search-engines {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    justify-content: center;
}

.engine-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.engine-btn::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.2);
}

.engine-btn:hover {
    background-color: #e6f2ff;
    border-color: #1e90ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(30,144,255,0.2);
}

.engine-btn.active {
    background-color: #1e90ff;
    color: #fff;
    border-color: #1e90ff;
}

/* 自定义搜索引擎图标 - 使用品牌favicon */
/* 百度 */
.engine-baidu::before {
    content: '';
    background-image: url('https://www.baidu.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 有道 */
.engine-youdao::before {
    content: '';
    background-image: url('https://www.youdao.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 360 */
.engine-360::before {
    content: '';
    background-image: url('https://www.so.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 必应 */
.engine-bing::before {
    content: '';
    background-image: url('https://www.bing.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 搜狐 */
.engine-sohu::before {
    content: '搜';
    background-color: #ff4e4e;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    line-height: 18px;
    background-image: none;
}

.engine-btn.active.engine-sohu::before {
    background-color: rgba(255,255,255,0.2);
}

/* 搜狗 */
.engine-sogou::before {
    content: '';
    background-image: url('https://www.sogou.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 新浪 */
.engine-sina::before {
    content: '';
    background-image: url('https://www.sina.com.cn/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 抖音 */
.engine-douyin::before {
    content: '';
    background-image: url('https://www.douyin.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 微博 */
.engine-weibo::before {
    content: '';
    background-image: url('https://weibo.com/favicon.ico');
    background-color: transparent;
    border: none;
}

/* 站内 */
.engine-site::before {
    content: '';
    background-image: url('hylogo/ihaiy.ico');
    background-color: transparent;
    border: none;
    background-size: contain;
    background-position: center;
}

/* 激活状态下的图标效果 */
.engine-btn.active::before {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

/* 搜索输入区域样式 */
.search-input-area {
    display: -ms-flexbox;
    display: flex;
    width: 100%;
    max-width: 100%;
    margin-bottom: 12px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    -ms-flex: 1 1 auto;
    flex: 1;
}

.search-input-wrapper input {
    width: 100%;
    height: 45px;
    padding: 0 40px 0 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input-wrapper input:focus {
    border-color: #1e90ff;
}

/* 清空搜索内容按钮 */
#clear-input-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    display: none; /* 默认隐藏 */
    font-weight: bold;
}

#clear-input-btn:hover {
    color: #666;
}

.search-input-area button {
    width: 60px;
    height: 45px;
    background-color: #1e90ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    margin-left: 8px;
}

/* 简单放大镜图标 - 与截图完全一致 */
.search-input-area button::before {
    content: '';
    display: block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
}

.search-input-area button::after {
    content: '';
    display: block;
    width: 2px;
    height: 8px;
    background-color: #fff;
    position: absolute;
    top: 22px;
    left: 35px;
    transform: rotate(45deg);
}

.search-input-area button:hover {
    background-color: #4169e1;
}

/* 搜索记录样式 */
.search-history {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: none; /* 默认隐藏搜索记录 */
}

.history-header {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-bottom: 10px;
}

.history-header span {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}

.clear-history {
    padding: 4px 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-history:hover {
    background-color: #e6e6e6;
}

.history-list {
    list-style: none;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
}

.history-item {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
}

.history-item:hover {
    background-color: #e6f2ff;
    border-color: #1e90ff;
}

.delete-history {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.delete-history:hover {
    background-color: #ff6b6b;
    color: #fff;
}

/* 热门搜索样式 */
.hot-searches {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
}

.hot-label {
    margin-right: 10px;
}

.hot-link {
    margin: 0 8px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hot-link:hover {
    color: #1e90ff;
    text-decoration: underline;
}



/* 主体内容样式 */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 分类导航样式 - 选项卡风格 */
.category-nav-tabs {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

/* 选项卡导航 */
.tab-nav {
    display: -ms-flexbox;
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 2px solid #1e90ff;
}

/* 选项卡按钮图标 */
.tab-btn::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 热门网站图标 */
.tab-btn[data-tab="hot"]::before {
    content: '\1F525';
    font-size: 16px;
    line-height: 1;
}

/* 视频音乐图标 */
.tab-btn[data-tab="video"]::before {
    content: '\1F3AC';
    font-size: 16px;
    line-height: 1;
}

/* 社交聊天图标 */
.tab-btn[data-tab="social"]::before {
    content: '\1F4AC';
    font-size: 16px;
    line-height: 1;
}

/* 购物电商图标 */
.tab-btn[data-tab="shopping"]::before {
    content: '\1F6D2';
    font-size: 16px;
    line-height: 1;
}

/* 新闻资讯图标 */
.tab-btn[data-tab="news"]::before {
    content: '\1F4F0';
    font-size: 16px;
    line-height: 1;
}

/* 游戏娱乐图标 */
.tab-btn[data-tab="game"]::before {
    content: '\1F3AE';
    font-size: 16px;
    line-height: 1;
}

/* 网盘邮箱图标 */
.tab-btn[data-tab="cloud"]::before {
    content: '\1F4E7';
    font-size: 16px;
    line-height: 1;
}

/* 政企网站图标 */
.tab-btn[data-tab="government"]::before {
    content: '\1F3DB';
    font-size: 16px;
    line-height: 1;
}

/* 工作网站图标 */
.tab-btn[data-tab="work"]::before {
    content: '\1F4BC';
    font-size: 16px;
    line-height: 1;
}

.tab-btn {
    -ms-flex: 1;
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid #ddd;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn:hover {
    background-color: #e6f2ff;
    color: #1e90ff;
}

.tab-btn.active {
    background-color: #1e90ff;
    color: #fff;
    font-weight: bold;
}

/* 选项卡内容 */
.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.site-list {
    list-style: none;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

.site-list li {
    width: 16%;
    margin-bottom: 15px;
}

.site-list li a {
    display: block;
    padding: 8px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

/* 我的网站选项卡图标 */
.tab-btn[data-tab="custom"]::before {
    content: '\2B50';
    font-size: 16px;
    line-height: 1;
}

/* 登录注册按钮样式 */
.auth-links {
    display: flex;
    gap: 15px;
    order: 3;
}

.theme-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 10px;
    order: 2;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 14px;
}

/* 登录和注册按钮使用相同的灰色样式 */
.auth-btn:not(:last-child) {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.auth-btn:not(:last-child):hover {
    background-color: #e0e0e0;
    color: #1e90ff;
    border-color: #1e90ff;
}

/* 个人中心按钮使用蓝色样式 */
.auth-btn:last-child {
    background-color: #1e90ff;
    color: #fff;
    border: 1px solid #1e90ff;
}

.auth-btn:last-child .user-icon {
    filter: brightness(0) invert(1);
}

.header-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 4px;
}

.auth-btn:last-child .header-avatar {
    filter: none;
}

/* 个人中心头像显示样式 */
.user-avatar-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.user-avatar-display img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-avatar-display #defaultAvatar {
    font-size: 48px;
}

/* 头像选择样式 */
.avatar-selection {
    margin-bottom: 20px;
}

.avatar-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.avatar-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
}

.avatar-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(30, 144, 255, 0.1);
}

/* 头像上传按钮样式 */
.avatar-upload {
    margin-top: 10px;
}

.avatar-upload label {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.avatar-upload label:hover {
    background-color: var(--primary-hover);
}

#avatarUpload {
    display: none;
}

#removeAvatar {
    margin-left: 10px;
    padding: 6px 12px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#removeAvatar:hover {
    background-color: #cc0000;
}

/* 个人中心布局样式 */
.user-main {
    flex: 1;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-section {
    margin-bottom: 40px;
}

.user-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 30px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.user-email {
    color: #666;
    margin-bottom: 5px;
}

.user-joined {
    color: #999;
    font-size: 14px;
}

.settings-form {
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.1);
}

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

.btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.auth-btn:last-child:hover {
    background-color: #4169e1;
    border-color: #4169e1;
}

/* 通知小红点样式 */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

#userCenterBtn {
    position: relative;
}

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

/* 通知列表样式优化 */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
}

.notification-item {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.notification-item.unread {
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f8ff 100%);
    border-left: 4px solid #1e90ff;
    box-shadow: 0 4px 12px rgba(30,144,255,0.15);
}

.notification-item.read {
    background-color: #f9f9f9;
    opacity: 0.85;
}

.notification-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.notification-icon {
    font-size: 28px;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 6px;
}

.notification-item.unread .notification-title {
    color: #1e90ff;
}

.notification-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notification-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.notification-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border: none;
    background-color: #ffebee;
    color: #f44336;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.notification-item:hover .notification-delete {
    opacity: 1;
}

.notification-delete:hover {
    background-color: #f44336;
    color: white;
    transform: scale(1.1);
}

/* 通知控制按钮样式 */
.notification-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.notification-controls .btn-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.notification-controls .btn-small:first-child {
    background-color: #1e90ff;
    color: white;
    border: none;
}

.notification-controls .btn-small:first-child:hover {
    background-color: #4169e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,144,255,0.3);
}

.notification-controls .btn-small:last-child {
    background-color: #ffebee;
    color: #f44336;
    border: 1px solid #ffcdd2;
}

.notification-controls .btn-small:last-child:hover {
    background-color: #f44336;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244,67,54,0.3);
}

/* 空状态样式 */
.notifications-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.notifications-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.notifications-empty-text {
    font-size: 16px;
    color: #666;
}

/* 暗黑模式通知样式 */
body.dark-mode .notification-item {
    background-color: #2c2c2c;
    border-color: #3a3a3a;
}

body.dark-mode .notification-item.unread {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c4a6e 100%);
    border-left-color: #4a9eff;
}

body.dark-mode .notification-item.read {
    background-color: #252525;
}

body.dark-mode .notification-item:hover {
    background-color: #3a3a3a;
}

body.dark-mode .notification-icon {
    background-color: #3a3a3a;
}

body.dark-mode .notification-title {
    color: #e0e0e0;
}

body.dark-mode .notification-item.unread .notification-title {
    color: #4a9eff;
}

body.dark-mode .notification-text {
    color: #b0b0b0;
}

body.dark-mode .notification-time {
    color: #888;
}

body.dark-mode .notification-controls {
    background-color: #2c2c2c;
    border-color: #3a3a3a;
}

body.dark-mode .notifications-empty {
    color: #888;
}

body.dark-mode .notifications-empty-text {
    color: #aaa;
}

/* 暗黑模式头像样式 */
@media (prefers-color-scheme: dark) {
    .user-avatar-display {
        background-color: #333;
        border-color: var(--primary-color);
    }
    
    .avatar-option {
        background-color: #333;
        border-color: #555;
    }
    
    .avatar-option:hover {
        border-color: var(--primary-color);
    }
    
    .avatar-option.selected {
        border-color: var(--primary-color);
        background-color: rgba(30, 144, 255, 0.2);
    }
    
    .user-main {
        background-color: #222;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .user-section h2 {
        color: #fff;
    }
    
    .user-name {
        color: #fff;
    }
    
    .user-email {
        color: #aaa;
    }
    
    .user-joined {
        color: #888;
    }
    
    .form-group label {
        color: #fff;
    }
    
    .form-group input,
    .form-group textarea {
        background-color: #333;
        border-color: #555;
        color: #fff;
    }
    
    .form-group input:focus,
    .form-group textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.3);
    }
}

.auth-welcome {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
}

/* 主题选择面板 */
.theme-panel {
    position: relative;
}

/* 主题切换按钮 */
.theme-toggle {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

/* 主题下拉菜单 */
.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.theme-dropdown.show {
    display: block;
}

/* 颜色主题选择 */
.color-themes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.theme-btn {
    width: 25px;
    height: 25px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.theme-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 蓝色主题 */
.theme-btn[data-theme="blue"] {
    background-color: #1e90ff;
}

/* 绿色主题 */
.theme-btn[data-theme="green"] {
    background-color: #4caf50;
}

/* 紫色主题 */
.theme-btn[data-theme="purple"] {
    background-color: #9c27b0;
}

/* 橙色主题 */
.theme-btn[data-theme="orange"] {
    background-color: #ff9800;
}

/* 红色主题 */
.theme-btn[data-theme="red"] {
    background-color: #f44336;
}

/* 粉色主题 */
.theme-btn[data-theme="pink"] {
    background-color: #e91e63;
}

/* 青色主题 */
.theme-btn[data-theme="cyan"] {
    background-color: #00bcd4;
}

/* 黄色主题 */
.theme-btn[data-theme="yellow"] {
    background-color: #ffeb3b;
    border: 1px solid #fdd835;
}

/* 深色模式适配 */
body.dark-mode .theme-dropdown {
    background-color: #333;
    border-color: #555;
}

body.dark-mode .theme-toggle {
    background-color: #444;
    color: #fff;
}

/* 明暗模式切换 */
.mode-toggle {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.mode-toggle:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

/* 深色模式样式 */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .datetime {
    color: #e0e0e0;
}

body.dark-mode .datetime span {
    color: #e0e0e0;
}

body.dark-mode .lunar-date {
    color: #ccc;
}

body.dark-mode .search-box-container,
body.dark-mode .category-nav-tabs,
body.dark-mode .tools {
    background-color: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .tab-nav {
    background-color: #3a3a3a;
}

body.dark-mode .tab-btn {
    color: #ccc;
    border-right-color: #555;
}

body.dark-mode .tab-btn:hover {
    background-color: #444;
    color: var(--primary-color);
}

body.dark-mode .tab-btn.active {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .site-list {
    background-color: #2c2c2c;
}

body.dark-mode .site-list li a {
    color: #e0e0e0;
}

body.dark-mode .site-list li a:hover {
    background-color: #3a3a3a;
    color: #fff;
}

body.dark-mode .tab-content {
    background-color: #2c2c2c;
}

body.dark-mode .tab-pane {
    background-color: #2c2c2c;
}

body.dark-mode .auth-links {
    color: #e0e0e0;
}

body.dark-mode .auth-welcome {
    color: #e0e0e0;
    margin-right: 10px;
}

body.dark-mode .auth-btn {
    color: #e0e0e0;
}

body.dark-mode .auth-btn:not(:last-child) {
    background-color: #3a3a3a;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .auth-btn:not(:last-child):hover {
    background-color: #444;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

body.dark-mode .auth-btn:last-child {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body.dark-mode .auth-btn:last-child:hover {
    background-color: var(--primary-hover);
}

/* 主题颜色变量 */
:root {
    --primary-color: #1e90ff;
    --primary-dark: #187bcd;
    --primary-hover: #1976d2;
}

body.blue-theme {
    --primary-color: #1e90ff;
    --primary-dark: #187bcd;
    --primary-hover: #1976d2;
}

body.green-theme {
    --primary-color: #4caf50;
    --primary-dark: #3d8b40;
    --primary-hover: #388e3c;
}

body.purple-theme {
    --primary-color: #9c27b0;
    --primary-dark: #7b1fa2;
    --primary-hover: #7b1fa2;
}

body.orange-theme {
    --primary-color: #ff9800;
    --primary-dark: #f57c00;
    --primary-hover: #f57c00;
}

body.red-theme {
    --primary-color: #f44336;
    --primary-dark: #d32f2f;
    --primary-hover: #d32f2f;
}

body.pink-theme {
    --primary-color: #e91e63;
    --primary-dark: #c2185b;
    --primary-hover: #c2185b;
}

body.cyan-theme {
    --primary-color: #00bcd4;
    --primary-dark: #0097a7;
    --primary-hover: #0097a7;
}

body.yellow-theme {
    --primary-color: #ffc107;
    --primary-dark: #ffa000;
    --primary-hover: #ffa000;
}

/* 应用主题颜色 */
.header-content {
    /* border-bottom: 1px solid var(--primary-color); */
}

.tab-btn.active,
.engine-btn.active {
    background-color: var(--primary-color);
}

.search-input-wrapper input:focus {
    border-color: var(--primary-color);
}

.search-input-area button {
    background-color: var(--primary-color);
}

.search-input-area button:hover {
    opacity: 0.9;
}

.tab-nav {
    border-bottom-color: var(--primary-color);
}

.tools-list a:hover {
    background-color: var(--primary-color);
}

/* 网站链接悬停效果 */
.site-list li a:hover {
    background-color: #f0f2f5;
    color: #1e90ff;
}

/* 工具模块样式 */
.tools {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.weather, .calendar, .utility-tools {
    -ms-flex: 1;
    flex: 1;
    margin-right: 20px;
}

.tools h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.weather-info, .calendar-info {
    text-align: center;
    padding: 10px;
    background-color: #f0f2f5;
    border-radius: 4px;
}

.weather-info span, .calendar-info span {
    display: block;
    margin-bottom: 5px;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.tools-list a {
    display: block;
    padding: 6px 12px;
    margin: 5px;
    color: #333;
    text-decoration: none;
    background-color: #f0f2f5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tools-list a:hover {
    background-color: #1e90ff;
    color: #fff;
}

/* 底部样式 */
.footer {
    background-color: #fff;
    color: #333;
    padding: 40px 0 20px;
    margin-top: 20px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;
}

/* 社交媒体图标 */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-icon svg {
    fill: currentColor;
}

/* 微信图标 */
.social-icon.wechat {
    background-color: #07C160;
    color: #fff;
}

.social-icon.wechat:hover {
    background-color: #06AD56;
}

/* QQ图标 */
.social-icon.qq {
    background-color: #12B7F5;
    color: #fff;
}

.social-icon.qq:hover {
    background-color: #0EA5E0;
}

/* 微博图标 */
.social-icon.weibo {
    background-color: #E6162D;
    color: #fff;
}

.social-icon.weibo:hover {
    background-color: #D01428;
}

/* 抖音图标 */
.social-icon.douyin {
    background-color: #000000;
    color: #fff;
}

.social-icon.douyin:hover {
    background-color: #333333;
}

/* 小红书图标 */
.social-icon.xiaohongshu {
    background-color: #FF2442;
    color: #fff;
}

.social-icon.xiaohongshu:hover {
    background-color: #E61F3A;
}

/* GitHub图标 */
.social-icon.github {
    background-color: #181717;
    color: #fff;
}

.social-icon.github:hover {
    background-color: #333;
}

/* 知乎图标 */
.social-icon.zhihu {
    background-color: #0084FF;
    color: #fff;
}

.social-icon.zhihu:hover {
    background-color: #0070D9;
}

/* 邮箱图标 */
.social-icon.email {
    background-color: #0078D4;
    color: #fff;
    cursor: pointer;
}

.social-icon.email:hover {
    background-color: #0063B1;
}

/* 二维码区域 */
.qr-codes {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.qr-item:hover {
    transform: scale(1.05);
}

.qr-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.qr-item:hover .qr-img {
    border-color: #1e90ff;
}

.qr-label {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
}

/* 关于我们 */
.about-us {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.about-us h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

/* 主要内容区域样式 */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 30px 30px;
    min-height: 600px;
}

/* 内容容器样式 */
.content-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

/* 内容部分样式 */
.content-section {
    width: 100%;
}

/* 页面标题样式 */
.section-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

/* 关于我们内容样式 */
.about-content {
    line-height: 1.8;
}

.about-content h2 {
    font-size: 22px;
    color: #333;
    margin: 20px 0 10px;
}

.about-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.about-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.about-content li {
    margin-bottom: 5px;
}

/* 使用条款内容样式 */
.terms-content {
    line-height: 1.8;
}

.terms-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.terms-content h2 {
    font-size: 22px;
    color: #333;
    margin: 20px 0 10px;
}

.terms-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.terms-content li {
    margin-bottom: 5px;
}

.terms-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.terms-content a:hover {
    text-decoration: underline;
}

/* 隐私政策内容样式 */
.privacy-content {
    line-height: 1.8;
}

.privacy-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.privacy-content h2 {
    font-size: 22px;
    color: #333;
    margin: 20px 0 10px;
}

.privacy-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.privacy-content li {
    margin-bottom: 5px;
}

/* 联系我们内容样式 */
.contact-content {
    line-height: 1.8;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info h2 {
    font-size: 22px;
    color: #333;
    margin: 20px 0 10px;
}

.contact-info p {
    margin-bottom: 10px;
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
    color: var(--primary-color);
    text-decoration: none;
}

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

/* 联系表单样式 */
.contact-form {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.submit-btn {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--primary-dark);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main {
        padding: 0 15px;
    }
    
    .content-container {
        padding: 15px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .about-content h2,
    .terms-content h2,
    .privacy-content h2,
    .contact-content h2 {
        font-size: 20px;
    }
    
    .contact-form {
        padding: 15px;
    }
}

/* 深色模式适配 */
body.dark-mode .content-container {
    background-color: #2c2c2c;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .section-title {
    color: #e0e0e0;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .about-content h2,
body.dark-mode .terms-content h2,
body.dark-mode .privacy-content h2,
body.dark-mode .contact-content h2 {
    color: #e0e0e0;
}

body.dark-mode .about-content p,
body.dark-mode .terms-content p,
body.dark-mode .privacy-content p,
body.dark-mode .contact-content p {
    color: #e0e0e0;
}

body.dark-mode .about-content li,
body.dark-mode .terms-content li,
body.dark-mode .privacy-content li {
    color: #e0e0e0;
}

body.dark-mode .contact-form {
    background-color: #3a3a3a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-mode .form-group label {
    color: #e0e0e0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background-color: #4a4a4a;
    border-color: #555;
    color: #e0e0e0;
}

.about-us p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    margin: 0 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: #1e90ff;
}

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

.copyright a {
    text-decoration: none;
    color: #333;
}

.copyright a:hover {
    text-decoration: none;
    color: #1e90ff;
}

/* 图片弹出模态框 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(30, 144, 255, 0.85);
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 50px;
    width: auto;
    height: auto;
    min-width: 340px;
    min-height: 340px;
}

.image-modal.show {
    display: flex;
}

.image-modal-content {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.image-modal-close:hover {
    background-color: #fff;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .theme-controls {
        margin-bottom: 5px;
    }
    
    .auth-links {
        margin-top: 5px;
    }
    
    /* 调整datetime在小屏下的显示，明确分为两行 */
    .datetime {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        padding: 0 10px;
        max-width: 100%;
        gap: 8px;
    }
    
    /* 第一行：日历图标 + 日期 + 农历日期 */
    .datetime .calendar-icon {
        order: 1;
    }
    
    .datetime .date {
        order: 2;
    }
    
    .datetime .lunar-date {
        order: 3;
        /* 保持在第一行 */
        width: auto;
        margin-top: 0;
    }
    
    /* 添加一个隐藏的换行元素，确保星期和时间显示在第二行 */
    .datetime::before {
        content: '';
        order: 4;
        width: 100%;
        margin-top: 4px;
    }
    
    /* 第二行：星期图标 + 星期 + 时间图标 + 时间 */
    .datetime .weekday-icon {
        order: 5;
        width: auto;
        margin-top: 0;
    }
    
    .datetime .weekday {
        order: 6;
    }
    
    .datetime .time-icon {
        order: 7;
        margin-left: 10px;
    }
    
    .datetime .time {
        order: 8;
    }
    
    .datetime > * {
        flex-shrink: 1;
        margin: 0 3px;
        display: flex;
        align-items: center;
        align-content: center;
    }
    
    /* 调整小屏下的字体大小以适应显示 */
    .datetime {
        font-size: 13px;
        align-items: center;
        align-content: center;
    }
    
    .datetime .date,
    .datetime .lunar-date {
        display: flex;
        align-items: center;
        line-height: 1;
        vertical-align: middle;
    }
    
    .calendar-day {
        font-size: 10px;
        display: flex;
        align-items: center;
    }
    
    .weekday-text {
        font-size: 7px;
        display: flex;
        align-items: center;
    }
    
    /* 确保图标保持正方形 */
    .calendar-icon,
    .weekday-icon,
    .time-icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-box {
        width: 100%;
        margin: 10px 0;
    }
    
    /* 调整搜索引擎按钮布局，小屏下3-4个每行 */
    .search-engines {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
        margin-bottom: 10px;
        justify-content: center;
    }
    
    .engine-btn {
        padding: 6px 10px;
        font-size: 12px;
        justify-content: center;
        white-space: nowrap;
    }
    
    .search-history {
        width: 100%;
    }

    .site-list li {
        width: 25%;
    }

    .site-list li a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px 4px;
    }

    .tools {
        flex-direction: column;
    }

    .weather, .calendar, .utility-tools {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .current-weather {
        flex-direction: column;
        text-align: center;
    }

    .weather-info {
        align-items: center;
    }

    .weather-days-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 10px;
    }

    .weather-day {
        flex: 0 0 95px !important;
        padding: 12px 8px;
    }

    .weather-day.yesterday {
        flex: 0 0 95px !important;
    }

    /* 响应式自定义网站表单 */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: auto;
    }

    /* 手机端天气预报模块竖向排列 */
    .weather-forecast-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .weather-location {
        flex-wrap: wrap;
        gap: 8px;
    }

    .city-search {
        width: 100%;
    }

    .city-search input {
        width: 100%;
    }

    .weather-date {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .weather-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .weather-temp {
        font-size: 12px;
        margin-bottom: 2px;
    }

    /* 手机端选项卡优化 */
    .category-nav-tabs {
        position: relative;
    }
    
    .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        scroll-behavior: smooth;
    }
    
    /* 左右滚动箭头按钮 */
    .tab-scroll-arrow {
        position: absolute;
        top: 22px;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        background-color: rgba(30, 144, 255, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: #1e90ff;
        z-index: 10;
        animation: pulse 2s infinite;
        cursor: pointer;
        user-select: none;
        font-weight: bold;
    }
    
    .tab-scroll-left {
        left: 5px;
    }
    
    .tab-scroll-right {
        right: 5px;
    }
    
    /* 脉冲动画 */
    @keyframes pulse {
        0%, 100% {
            opacity: 0.6;
            transform: translateY(-50%) scale(1);
        }
        50% {
            opacity: 1;
            transform: translateY(-50%) scale(1.1);
        }
    }

    .tab-btn {
        flex: 0 0 auto;
        padding: 12px 15px;
        font-size: 14px;
        white-space: nowrap;
        position: relative;
        z-index: 2;
    }

    .tab-btn::before {
        margin-right: 4px;
    }
    
    /* 隐藏滚动条但保留滚动功能 */
    .tab-nav::-webkit-scrollbar {
        display: none;
    }
    
    .tab-nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* 自定义网站表单样式 */
.custom-site-form-container {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.custom-site-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px;
}

.custom-site-header .custom-site-title {
    margin: 0 !important;
    color: #333 !important;
    font-size: 15px !important;
    font-weight: bold !important;
    flex: 1 !important;
}

.custom-site-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.form-group {
    flex: 1;
    min-width: 100px;
}

.form-group label {
    display: block;
    margin-bottom: 2px;
    color: #666;
    font-weight: bold;
    font-size: 12px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 5px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e90ff;
    box-shadow: 0 0 5px rgba(30, 144, 255, 0.2);
}

.btn-add-site {
    padding: 6px 12px !important;
    background-color: #1e90ff !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.btn-add-site:hover {
    background-color: #4169e1;
}

/* 自定义网站列表样式 */
#customSiteList {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 自定义网站左右布局容器 */
.custom-sites-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* 分类列容器 */
.category-column {
    flex: 1;
    min-width: 200px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease;
}

.category-column:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-column h4 {
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    color: #333;
    border-bottom: 2px solid #1e90ff;
    font-size: 16px;
}

.category-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-column ul li {
    margin-bottom: 8px;
}

.category-column ul li a {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-column ul li a:hover {
    background-color: #e3f2fd;
}

.category-column ul li a span {
    margin-right: 8px;
    font-size: 16px;
}

.category-column ul li a .delete-site {
    margin-left: auto;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.category-column ul li a .delete-site:hover {
    color: #ff4444;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .custom-sites-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .category-column {
        min-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .category-column {
        min-width: 45%;
        flex: 0 0 calc(50% - 10px);
    }
}

/* 深色模式适配 */
body.dark-mode .category-column {
    background-color: #2d2d2d;
}

body.dark-mode .category-column h4 {
    color: #fff;
}

body.dark-mode .category-column ul li a {
    color: #e0e0e0;
}

body.dark-mode .category-column ul li a:hover {
    background-color: #3d3d3d;
}

body.dark-mode .category-column ul li a .delete-site {
    color: #999;
}

body.dark-mode .category-column ul li a .delete-site:hover {
    color: #ff6b6b;
}

/* 深色模式适配 */
body.dark-mode .custom-site-form-container {
    background-color: #2d2d2d;
}

body.dark-mode .custom-site-header .custom-site-title {
    color: #fff !important;
}

body.dark-mode .form-group label {
    color: #ccc;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select {
    background-color: #3d3d3d;
    border-color: #555;
    color: #fff;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus {
    border-color: #1e90ff;
}

body.dark-mode .btn-add-site {
    background-color: #1e90ff;
    color: #fff;
}

body.dark-mode .btn-add-site:hover {
    background-color: #4169e1;
}

/* 站内搜索结果深色模式适配 */
body.dark-mode .site-search-results {
    background-color: #333;
    color: #fff;
}

body.dark-mode .site-search-results h3 {
    color: #fff;
}

body.dark-mode .site-search-results-list p {
    color: #ccc;
}

body.dark-mode .site-search-results-list > div {
    background-color: #444;
}

body.dark-mode .site-search-results-list > div:hover {
    background-color: #555;
}

body.dark-mode .site-search-results-list a {
    color: #fff;
}

body.dark-mode .site-search-results-list a div:last-child {
    color: #aaa;
}

body.dark-mode .site-search-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 天气预报模块样式 */
.weather-forecast-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 8px 12px;
}

.weather-forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 2px;
    border-bottom: 1px solid #eee;
}

.weather-forecast-header h3 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: bold;
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 10px;
}

.city-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.city-search input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    width: 150px;
}

.city-search input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.search-city-btn {
    padding: 6px 12px;
    background-color: #1e90ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-city-btn:hover {
    background-color: #4169e1;
}

.locate-btn {
    padding: 6px 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.locate-btn:hover {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.weather-days-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 10px;
}

.weather-details-grid {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    padding: 6px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    border-radius: 8px;
    width: 100%;
    justify-content: space-between;
}

.weather-details-grid::-webkit-scrollbar {
    display: none;
}

.weather-detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1px 2px;
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    flex: 1;
    max-width: 130px;
}

/* 普通天气卡片设置比例为1.2份 */
.weather-detail-card:not(.sun-time-card):not(.travel-advice-card) {
    flex: 1.2;
}

.weather-detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sun-time-card {
    flex: 1.8; /* 日出日落卡片占1.8份 */
    min-width: 230px; /* 确保稍窄一些 */
}

/* 移动端覆盖日出日落卡片样式 */
@media (max-width: 768px) {
    .sun-time-card {
        min-width: 0 !important;
        max-width: none !important;
    }
}

.sun-time-card .detail-row {
    justify-content: flex-start;
    gap: 2px;
    margin-bottom: 1px;
}

.travel-advice-card {
    flex: 3; /* 出行建议卡片占3份 */
    min-width: 390px; /* 确保至少是3个卡片的宽度 */
}

/* 移动端覆盖出行建议卡片样式 */
@media (max-width: 768px) {
    .travel-advice-card {
        min-width: 0 !important;
        max-width: none !important;
        flex: 0 0 calc(100% - 4px) !important;
    }
}

.travel-advice-card .travel-header {
    justify-content: center;
    margin-bottom: 2px;
}

.travel-advice-card .travel-content {
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    padding-left: 0;
}

.detail-value-small {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2px;
}

.detail-icon {
    font-size: 18px;
}

.detail-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.detail-value {
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.weather-day {
    flex: 1;
    min-width: 0;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.weather-day:hover {
    background-color: #e6f2ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.weather-day.yesterday {
    opacity: 0.7;
}

.weather-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: bold;
}

.weather-icon {
    font-size: 20px;
    margin-bottom: 2px;
    display: block;
}

.weather-temp {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
}

.weather-temp span {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.weather-condition {
    font-size: 14px;
    color: #666;
}

.real-time-weather {
    display: flex;
    align-items: center;
    gap: 12px;
}

.real-temp {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b00;
}

.real-icon {
    font-size: 20px;
}

.real-condition {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.real-wind {
    font-size: 14px;
    color: #666;
}

.real-time {
    font-size: 13px;
    color: #999;
}

.real-time-label {
    font-size: 13px;
    color: #999;
    margin-right: -8px;
}

.refresh-weather-btn {
    padding: 4px 8px;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-weather-btn:hover {
    background-color: transparent;
}

.weather-location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-icon {
    font-size: 14px;
}

/* 深色模式适配 */
body.dark-mode .weather-forecast-container {
    background-color: #333;
}

body.dark-mode .weather-forecast-header {
    border-bottom-color: #555;
}

body.dark-mode .weather-forecast-header h3 {
    color: #fff;
}

body.dark-mode .weather-location span {
    color: #fff;
}

body.dark-mode .weather-day {
    background-color: #444;
}

body.dark-mode .weather-day:hover {
    background-color: #555;
}

body.dark-mode .weather-date {
    color: #ccc;
}

body.dark-mode .weather-temp {
    color: #fff;
}

body.dark-mode .weather-temp span {
    color: #aaa;
}

body.dark-mode .weather-condition {
    color: #ccc;
}

body.dark-mode .weather-details-grid {
    background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
}

body.dark-mode .weather-detail-card {
    background-color: #444;
}

body.dark-mode .detail-row .detail-label {
    color: #aaa;
}

body.dark-mode .detail-value {
    color: #fff;
}

body.dark-mode .detail-value-small {
    color: #fff;
}

@media (max-width: 1200px) {
    .weather-details-grid {
        gap: 2px;
        padding: 4px;
    }
    
    .weather-detail-card {
        min-width: 60px;
        padding: 1px;
    }
}

/* 移动端天气卡片布局 - 重新设计 */
@media (max-width: 768px) {
    /* 完全重置父容器 */
    .weather-forecast-content .weather-details-grid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0 !important; /* 关闭gap，手动控制间距 */
        padding: 3px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 重置所有卡片样式 */
    .weather-forecast-content .weather-details-grid .weather-detail-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        padding: 8px !important;
        background-color: #fff !important;
        border-radius: 6px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        flex-basis: auto !important;
    }
    
    /* 第一行：日出日落 (66.6%) + 湿度 (33.3%) */
    .weather-forecast-content .weather-details-grid .weather-detail-card.sun-time-card {
        flex: 0 0 calc(66.6% - 1px) !important; 
        width: calc(66.6% - 1px) !important;
        margin-right: 1px !important; 
        margin-bottom: 6px !important;
        order: 1 !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.humidity-card { 
        flex: 0 0 calc(33.3% - 2px) !important; 
        width: calc(33.3% - 2px) !important;
        margin-bottom: 6px !important;
        order: 2 !important;
    }
    
    /* 第二行：降水量 + 能见度 + 紫外线 (各33.3%) */
    .weather-forecast-content .weather-details-grid .weather-detail-card.precip-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-right: 2px !important;
        margin-bottom: 6px !important;
        order: 3 !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.visibility-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-right: 2px !important;
        margin-bottom: 6px !important;
        order: 4 !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.uv-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-bottom: 6px !important;
        order: 5 !important;
    }
    
    /* 第三行：体感温度 + 气压 + PM2.5 (各33.3%) */
    .weather-forecast-content .weather-details-grid .weather-detail-card.feelslike-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-right: 2px !important;
        margin-bottom: 6px !important;
        order: 6 !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.pressure-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-right: 2px !important;
        margin-bottom: 6px !important;
        order: 7 !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.pm25-card { 
        flex: 0 0 calc(33.3% - 2px) !important;
        width: calc(33.3% - 2px) !important;
        margin-bottom: 6px !important;
        order: 8 !important;
    }
    
    /* 第四行：出行建议 (100%) */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card { 
        flex: 0 0 calc(100% - 6px) !important; 
        width: calc(100% - 6px) !important;
        margin-bottom: 0 !important;
        order: 9 !important;
        text-align: center !important;
    }
    
    /* 确保出行建议卡片内容居中 */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-row.travel-header {
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-value.travel-content {
        text-align: center !important;
        padding-left: 0 !important;
        width: 100% !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        display: block !important;
    }
    
    /* 确保标签和图标也居中 */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-label,
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-icon {
        text-align: center !important;
    }
    
    /* 强制覆盖任何可能冲突的样式 */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card * {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* 特别针对出行建议卡片的.detail-row强制居中 */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-row {
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        display: flex !important;
        width: 100% !important;
    }
    
    /* 强制覆盖所有.detail-label和.detail-icon的样式 */
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-label,
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-icon,
    .weather-forecast-content .weather-details-grid .weather-detail-card.travel-advice-card .detail-value {
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
        width: auto !important;
        margin: 0 auto !important;
    }
    
    /* 最高优先级的居中样式 */
    @media (max-width: 768px) {
        .weather-forecast-content .weather-details-grid .travel-advice-card,
        .weather-forecast-content .weather-details-grid .travel-advice-card * {
            text-align: center !important;
            justify-content: center !important;
            align-items: center !important;
            display: flex !important;
            margin-left: auto !important;
            margin-right: auto !important;
        }
        
        .weather-forecast-content .weather-details-grid .travel-advice-card {
            flex-direction: column !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        .weather-forecast-content .weather-details-grid .travel-advice-card .travel-header,
        .weather-forecast-content .weather-details-grid .travel-advice-card .travel-content {
            width: 100% !important;
            text-align: center !important;
            justify-content: center !important;
        }
    }
    
    .detail-row {
        gap: 2px;
        margin-bottom: 1px;
    }
    
    .detail-icon {
        font-size: 12px;
    }
    
    .detail-label {
        font-size: 9px;
    }
    
    .detail-value {
        font-size: 10px;
    }
    
    .detail-value-small {
        font-size: 8px;
    }
}

/* 城市搜索深色模式样式 */
body.dark-mode .city-search input {
    background-color: #444;
    border-color: #555;
    color: #fff;
}

body.dark-mode .city-search input:focus {
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.3);
}

body.dark-mode .locate-btn {
    background-color: #555;
    border-color: #666;
    color: #fff;
}

body.dark-mode .locate-btn:hover {
    background-color: #666;
}

/* 任务管理模块样式 */
/* 仪表盘小部件容器 */
.dashboard-widgets {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-widgets .widget-large {
    flex: 2;
    min-width: 0;
    height: 640px;
}

.dashboard-widgets .widget-small {
    flex: 1;
    min-width: 0;
    height: 640px;
}

/* 响应式：小屏幕时堆叠显示 */
@media (max-width: 1024px) {
    .dashboard-widgets {
        flex-direction: column;
    }
    
    .dashboard-widgets .widget-large,
    .dashboard-widgets .widget-small {
        flex: 1;
        height: auto;
    }
}

/* 底部模块并排容器 - 实用查询和留言板 */
.bottom-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.bottom-widgets .widget-half {
    flex: 0 0 calc(50% - 10px);
    min-width: calc(50% - 10px);
    max-width: calc(50% - 10px);
    height: 480px;
}

.bottom-widgets .utility-tools-content,
.bottom-widgets .task-manager-content,
.bottom-widgets .notepad-content {
    min-height: 400px;
    max-height: 440px;
}

@media (max-width: 1024px) {
    .bottom-widgets {
        flex-direction: column;
    }
    
    .bottom-widgets .widget-half {
        flex: 1;
        width: 100%;
        height: auto;
    }
    
    .bottom-widgets .utility-tools-content,
    .bottom-widgets .task-manager-content,
    .bottom-widgets .notepad-content {
        min-height: auto;
        max-height: none;
        height: auto;
    }
}

/* 实用查询模块样式 */
.utility-tools.widget-half {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.utility-tools-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
}

.utility-tools-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.utility-icon {
    font-size: 22px;
}

.utility-tools-content {
    padding: 20px 30px;
}

.bottom-widgets .utility-tools .tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bottom-widgets .utility-tools .tools-list a {
    display: inline-block;
    padding: 10px 18px;
    background-color: #f5f7fa;
    color: #555;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.bottom-widgets .utility-tools .tools-list a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

body.dark-mode .utility-tools.widget-half {
    background-color: #2c2c2c;
}

body.dark-mode .utility-tools-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .utility-tools-header h3 {
    color: #e0e0e0;
}

body.dark-mode .bottom-widgets .utility-tools .tools-list a {
    background-color: #3a3a3a;
    color: #ccc;
    border-color: #555;
}

body.dark-mode .bottom-widgets .utility-tools .tools-list a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 任务管理模块样式 - 窄列版本 */
.dashboard-widgets .task-manager-container .task-manager-header {
    padding: 12px 20px;
}

.dashboard-widgets .task-manager-container .task-manager-header h3 {
    font-size: 15px;
}

.dashboard-widgets .task-manager-container .task-icon {
    font-size: 18px;
}

.dashboard-widgets .task-manager-container .task-stats {
    gap: 10px;
}

.dashboard-widgets .task-manager-container .task-stats span {
    font-size: 13px;
}

.dashboard-widgets .task-manager-container .task-manager-content {
    padding: 15px 20px;
}

.dashboard-widgets .task-manager-container .task-add-form {
    flex-wrap: nowrap;
    margin-bottom: 10px;
}

.dashboard-widgets .task-manager-container .task-add-form input[type="text"] {
    min-width: 0;
    padding: 6px 10px;
    font-size: 15px;
}

.dashboard-widgets .task-manager-container .btn-add-task {
    padding: 6px 12px;
    font-size: 14px;
    white-space: nowrap;
}

.dashboard-widgets .task-manager-container .task-delete {
    /* 移除margin-left: auto，避免挤压编辑按钮 */
}

/* 通用编辑按钮样式，确保在所有情况下都能显示 */
.task-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    margin-right: 5px;
    flex-shrink: 0;
}

.dashboard-widgets .task-manager-container .task-list {
    max-height: 180px;
    font-size: 15px;
}

.dashboard-widgets .task-manager-container .task-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.dashboard-widgets .task-manager-container .task-item .task-checkbox,
.dashboard-widgets .task-manager-container .task-item .task-edit,
.dashboard-widgets .task-manager-container .task-item .task-delete {
    flex-shrink: 0;
}

.dashboard-widgets .task-manager-container .task-item .task-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* 编辑按钮样式 */
.dashboard-widgets .task-manager-container .task-item .task-edit,
.task-manager-container .task-item .task-edit,
.bottom-widgets .task-manager-container.widget-half .task-item .task-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 1;
    text-align: center;
    margin-right: 5px;
    flex-shrink: 0;
}

/* 为自定义任务项添加专门的样式，确保编辑按钮能够正常显示 */
.my-task-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid #eee !important;
}

.my-task-item .task-edit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 1;
    text-align: center;
    margin-right: 5px;
    flex-shrink: 0;
}

/* 删除按钮样式 */
.dashboard-widgets .task-manager-container .task-item .task-delete,
.task-manager-container .task-item .task-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}

.task-manager-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.task-manager-container.widget-small,
.task-manager-container.widget-half {
    margin-bottom: 0;
}

.task-manager-header {
    background-color: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.task-manager-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 底部widgets中的任务管理模块头部样式 - 与实用查询保持一致 */
.bottom-widgets .task-manager-container.widget-half .task-manager-header {
    padding: 8px 15px;
}

.bottom-widgets .task-manager-container.widget-half .task-manager-header h3 {
    font-size: 18px;
}

.bottom-widgets .task-manager-container.widget-half .task-icon {
    font-size: 22px;
}

/* 修复实用查询模块在bottom-widgets中的flex布局问题 */
.bottom-widgets .utility-tools.widget-half {
    flex: 0 0 calc(50% - 10px) !important;
    margin-right: 0;
}

/* 记事本模块样式 */
.notepad-container.widget-half {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.notepad-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.notepad-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* .notepad-title-container 已移除，输入框现在位于工具栏 */

#notepadTitleInput {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    outline: none;
    height: 32px;
    box-sizing: border-box;
    margin-left: auto;
}

#notepadTitleInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.notepad-rename-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.notepad-rename-btn:hover {
    background-color: var(--primary-dark);
}

.notepad-icon {
    font-size: 22px;
}

.notepad-content {
    padding: 15px 15px 20px 15px;
    height: calc(100% - 46px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.notepad-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.notepad-save-btn, .notepad-clear-btn, .notepad-new-btn, .notepad-delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.notepad-save-btn, .notepad-new-btn {
    background-color: var(--primary-color);
    color: white;
}

.notepad-clear-btn {
    background-color: #f0f0f0;
    color: #333;
}

.notepad-delete-btn {
    background-color: #f44336;
    color: white;
}

.notepad-save-btn:hover, .notepad-new-btn:hover {
    background-color: var(--primary-dark);
}

.notepad-clear-btn:hover {
    background-color: #e0e0e0;
}

.notepad-delete-btn:hover {
    background-color: #d32f2f;
}

.notepad-main {
    display: flex;
    gap: 15px;
    flex: 1;
    overflow: hidden;
    align-items: stretch;
    padding-bottom: 10px;
    box-sizing: border-box;
}

.notepad-list-container {
    width: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    overflow-y: auto;
    flex-shrink: 0;
    flex-grow: 0;
    height: calc(100% - 10px);
    box-sizing: border-box;
    margin: 0;
}

.notepad-list-container h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.notepad-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notepad-list-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px 0;
}

.notepad-list-item {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: background-color 0.2s;
    overflow: visible;
}

.notepad-list-item:hover {
    background-color: #f5f5f5;
}

.notepad-list-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid var(--primary-color);
}

.notepad-list-item-content {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.notepad-list-item-date {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#notepadTextarea {
    flex: 1;
    width: calc(100% - 230px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    font-family: Arial, sans-serif;
    overflow-y: auto;
    box-sizing: border-box;
    height: calc(100% - 10px);
    margin: 0;
}

#notepadTextarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 文件上传模块样式 */
.file-upload-container.widget-half {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
    height: 480px;
    display: flex;
    flex-direction: column;
}

.file-upload-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
    flex-shrink: 0;
}

.file-upload-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-upload-icon {
    font-size: 22px;
}

.file-upload-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.file-select-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
}

.file-select-btn {
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

.file-select-btn:hover {
    background-color: var(--primary-dark);
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

.uploaded-files {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 5px;
}

.uploaded-files::-webkit-scrollbar {
    width: 6px;
}

.uploaded-files::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.uploaded-files::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.uploaded-files::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.uploaded-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    gap: 5px;
    flex-wrap: wrap;
}

.uploaded-file-item .file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.uploaded-file-item .file-size {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.uploaded-file-item .upload-status {
    color: #4CAF50;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}

.uploaded-file-item .file-preview-btn,
.uploaded-file-item .file-download-btn,
.uploaded-file-item .file-delete-btn {
    flex-shrink: 0;
}

.file-preview-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px 4px 24px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    position: relative;
    display: inline-block;
    min-width: 50px;
    min-height: 24px;
    z-index: 1;
}

.file-preview-btn::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.file-preview-btn:hover {
    background-color: #45a049;
}

.file-delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    display: inline-block;
    min-width: 40px;
    min-height: 24px;
    z-index: 1;
}

.file-delete-btn:hover {
    background-color: #cc0000;
}

.file-download-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    display: inline-block;
    min-width: 40px;
    min-height: 24px;
    z-index: 1;
}

.file-download-btn:hover {
    background-color: #1976D2;
}

.file-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999999;
    justify-content: center;
    align-items: center;
}

.file-preview-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f5f5f5;
}

.file-preview-title {
    margin: 0;
    font-size: 18px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-preview-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.file-preview-close:hover {
    color: #333;
}

.file-preview-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.file-preview-text {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    max-width: 100%;
}

.file-preview-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

body.dark-mode .file-preview-content {
    background-color: #2c2c2c;
}

body.dark-mode .file-preview-header {
    background-color: #3a3a3a;
    border-bottom-color: #444;
}

body.dark-mode .file-preview-title {
    color: #e0e0e0;
}

body.dark-mode .file-preview-close {
    color: #888;
}

body.dark-mode .file-preview-close:hover {
    color: #ccc;
}

body.dark-mode .file-preview-text {
    color: #e0e0e0;
}

.task-icon {
    font-size: 22px;
}

.task-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.task-stats span {
    font-size: 12px;
    color: #666;
}

.task-stats strong {
    color: var(--primary-color);
    font-weight: bold;
}

.task-manager-content {
    padding: 15px 20px;
}

.task-add-form-compact {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.task-add-form-compact input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s ease;
}

.task-add-form-compact input[type="text"]:focus {
    border-color: var(--primary-color);
}

.btn-add-task-compact {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-add-task-compact:hover {
    background-color: var(--primary-color-dark);
}

.task-list-compact {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.task-list-compact li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.task-list-compact li:hover {
    background-color: #f8f9fa;
}

.task-list-compact li:last-child {
    border-bottom: none;
}

.task-list-compact li.completed .task-text {
    text-decoration: line-through;
    color: #999;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

.task-delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.task-delete-btn:hover {
    opacity: 1;
}

.task-empty-message {
    text-align: center;
    color: #999;
    padding: 30px 20px;
    font-size: 14px;
}

/* 深色模式下的任务管理样式 */
body.dark-mode .task-manager-container {
    background-color: #2c2c2c;
}

body.dark-mode .task-manager-header {
    background-color: #3a3a3a;
}

body.dark-mode .task-manager-header h3 {
    color: #fff;
}

body.dark-mode .task-stats span {
    color: #aaa;
}

/* 底部widgets中的任务管理模块暗色模式样式 - 与实用查询保持一致 */
body.dark-mode .bottom-widgets .task-manager-container.widget-half .task-manager-header {
    background-color: #3a3a3a;
}

body.dark-mode .bottom-widgets .task-manager-container.widget-half .task-manager-header h3 {
    color: #e0e0e0;
}

body.dark-mode .task-add-form-compact input[type="text"] {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #fff;
}

body.dark-mode .task-add-form-compact input[type="text"]:focus {
    border-color: var(--primary-color);
}

body.dark-mode .task-add-form-compact input::placeholder {
    color: #888;
}

body.dark-mode .task-list-compact li {
    border-color: #3a3a3a;
}

body.dark-mode .task-list-compact li:hover {
    background-color: #3a3a3a;
}

body.dark-mode .task-text {
    color: #eee;
}

body.dark-mode .task-list-compact li.completed .task-text {
    color: #666;
}

.task-manager-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.task-manager-header {
    background-color: #f5f5f5;
    padding: 20px 30px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.task-manager-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-icon {
    font-size: 22px;
}

.task-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.task-stats span {
    font-size: 14px;
    color: #666;
}

.task-stats strong {
    color: var(--primary-color);
    font-weight: bold;
}

.task-manager-content {
    padding: 20px 30px;
}

.task-add-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.task-add-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.task-add-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

.task-add-form select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.task-add-form select:focus {
    border-color: var(--primary-color);
}

.task-add-form input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.task-add-form input[type="date"]:focus {
    border-color: var(--primary-color);
}

.btn-add-task {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-task:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.task-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #e6f2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.task-list {
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 10px;
}

.task-item:hover {
    background-color: #f0f0f0;
}

.task-item.completed {
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #999;
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.task-priority {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.task-priority.normal {
    background-color: #e0e0e0;
    color: #666;
}

.task-priority.important {
    background-color: #ff9800;
    color: #fff;
}

.task-priority.urgent {
    background-color: #f44336;
    color: #fff;
}

.task-due-date {
    font-size: 12px;
    color: #999;
}

.task-edit {
    width: 24px;
    height: 24px;
    background-color: #4caf50;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 5px;
    flex-shrink: 0;
}

.task-edit:hover {
    background-color: #45a049;
}

.task-item:not(.completed) .task-edit {
    position: static;
    z-index: auto;
    transform: none;
    filter: none;
    isolation: auto;
    will-change: auto;
    mix-blend-mode: normal;
    perspective: none;
}

.task-item.completed .task-edit {
    background-color: #555;
    color: #888;
    opacity: 0.3;
    cursor: not-allowed;
}

.task-delete {
    width: 24px;
    height: 24px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.task-delete:hover {
    background-color: #ee5a5a;
}



body.dark-mode .task-manager-container {
    background-color: #2c2c2c;
}

body.dark-mode .task-manager-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .task-manager-header h3 {
    color: #e0e0e0;
}

body.dark-mode .task-stats span {
    color: #ccc;
}

body.dark-mode .task-add-form input[type="text"],
body.dark-mode .task-add-form select,
body.dark-mode .task-add-form input[type="date"] {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .task-add-form input[type="text"]:focus,
body.dark-mode .task-add-form select:focus,
body.dark-mode .task-add-form input[type="date"]:focus {
    border-color: var(--primary-color);
}

body.dark-mode .filter-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .filter-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .task-item {
    background-color: #3a3a3a;
}

body.dark-mode .task-item:hover {
    background-color: #444;
}

body.dark-mode .task-text {
    color: #e0e0e0;
}

body.dark-mode .task-item.completed .task-edit {
    background-color: #555;
    color: #888;
    opacity: 0.3;
    cursor: not-allowed;
}

/* 时事新闻模块样式 */
/* 新闻模块样式 - 并排布局版本 */
.dashboard-widgets .news-container .news-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.dashboard-widgets .news-container .news-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.dashboard-widgets .news-container .news-header h3 {
    font-size: 18px;
    margin: 0;
}

.dashboard-widgets .news-container .news-icon {
    font-size: 22px;
}

.dashboard-widgets .news-container .news-category {
    gap: 4px;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.dashboard-widgets .news-container .news-category-btn {
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.dashboard-widgets .news-container .news-content {
    padding: 15px 20px;
    min-height: 560px;
    max-height: 560px;
    overflow-y: auto !important;
}

.dashboard-widgets .news-container .news-item {
    padding: 15px 20px;
}

.dashboard-widgets .news-container .news-thumbnail {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
}

.dashboard-widgets .news-container .news-info {
    flex: 1;
    min-width: 0;
}

.dashboard-widgets .news-container .news-title {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.dashboard-widgets .news-container .news-meta {
    font-size: 11px;
}

.news-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.news-container.widget-large {
    margin-bottom: 0;
}

.news-header {
    background-color: #f5f5f5;
    padding: 20px 30px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.news-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 搜索框样式 */
.news-search {
    display: flex;
    gap: 8px;
}

.news-search-input {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    width: 200px;
    height: 28px;
    outline: none;
}

.news-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.news-search-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-search-btn:hover {
    background-color: #e6f2ff;
    border-color: var(--primary-color);
}

/* 收藏按钮样式 */
.news-favorite-toggle-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-favorite-toggle-btn:hover {
    background-color: #ffebee;
    border-color: #ff6b6b;
}

.news-favorite-toggle-btn.active {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

/* 收藏心形按钮 */
.news-favorite-btn {
    position: relative;
    top: auto;
    right: auto;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

.news-favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.news-favorite-btn.active {
    color: #ff6b6b;
    background: rgba(255, 255, 255, 0.95);
}

/* Toast提示样式 */
.news-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.news-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.news-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-icon {
    font-size: 22px;
}

.news-category {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.news-category-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    height: 28px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-category-btn:hover {
    background-color: #e6f2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.news-category-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 下拉菜单样式 */
.news-dropdown {
    position: relative;
}

.news-dropdown-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    height: 28px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-dropdown-btn:hover {
    background-color: #e6f2ff;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.news-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 1000;
    overflow: hidden;
}

.news-dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

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

.news-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.news-dropdown-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 新闻刷新按钮样式 */
.news-refresh-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    height: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-refresh-btn:hover {
    background-color: #e6f2ff;
    border-color: var(--primary-color);
    transform: rotate(180deg);
}

.news-refresh-btn:active {
    transform: scale(0.95) rotate(180deg);
}

.news-content {
    padding: 20px 30px;
}

.news-list {
    display: grid;
    gap: 15px;
}

.news-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-item:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.news-thumbnail {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 15px;
    align-items: center;
}

.news-source {
    color: var(--primary-color);
    font-weight: 500;
}

.news-time {
    color: #999;
}

.news-description {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.news-source {
    background-color: #e6f2ff;
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 10px;
}

.news-category-tag {
    background-color: #f5f5f5;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
}

.news-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 40px;
    color: #666;
}

.news-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.news-error-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.news-error-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.news-error-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    max-width: 400px;
}

.news-retry-btn {
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.news-retry-btn:hover {
    background-color: #1a7ae8;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-modal.show {
    display: flex;
    opacity: 1;
}

.news-modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.news-modal.show .news-modal-content {
    transform: scale(1);
}

body.modal-open .task-edit {
    background-color: #666;
    opacity: 1;
    filter: none;
    pointer-events: auto;
}

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

.news-modal-title {
    margin: 0;
    font-size: 18px;
    color: #333;
    flex: 1;
    line-height: 1.4;
}

.news-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.news-modal-close:hover {
    color: #333;
}

.news-modal-body {
    padding: 25px;
}

.news-modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.news-modal-source {
    background-color: #e6f2ff;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
}

.news-modal-time {
    color: #999;
}

.news-modal-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

body.dark-mode .news-modal-content {
    background-color: #2c2c2c;
}

body.dark-mode .news-modal-header {
    border-bottom-color: #444;
}

body.dark-mode .news-modal-title {
    color: #fff;
}

body.dark-mode .news-modal-text {
    color: #e0e0e0;
}

body.dark-mode .news-modal-close:hover {
    color: #fff;
}

body.dark-mode .news-container {
    background-color: #2c2c2c;
}

body.dark-mode .news-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .news-header h3 {
    color: #e0e0e0;
}

body.dark-mode .news-icon {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .news-container {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .news-container .news-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .news-container .news-header h3 {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .news-container .news-icon {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .news-container .news-category-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .dashboard-widgets .news-container .news-category-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .dashboard-widgets .news-container .news-content {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .message-board-container {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .message-board-container .message-board-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .message-board-container .message-board-header h3 {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .message-board-container .message-icon {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .message-board-container .btn-submit-message {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .dashboard-widgets .message-board-container .message-board-content {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .message-board-container .message-form input[type="text"],
body.dark-mode .dashboard-widgets .message-board-container .message-form input[type="email"],
body.dark-mode .dashboard-widgets .message-board-container .message-form textarea {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .message-board-container .message-form input[type="text"]:focus,
body.dark-mode .dashboard-widgets .message-board-container .message-form input[type="email"]:focus,
body.dark-mode .dashboard-widgets .message-board-container .message-form textarea:focus {
    border-color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .message-board-container .message-list-container h4 {
    color: #e0e0e0;
    border-bottom-color: #555;
}

body.dark-mode .dashboard-widgets .message-board-container .message-item {
    background-color: #3a3a3a;
}

body.dark-mode .dashboard-widgets .message-board-container .message-item:hover {
    background-color: #444;
}

body.dark-mode .dashboard-widgets .message-board-container .message-name {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .message-board-container .message-content {
    color: #ccc;
}

body.dark-mode .dashboard-widgets .message-board-container .message-delete-btn {
    color: #888;
}

body.dark-mode .dashboard-widgets .message-board-container .message-delete-btn:hover {
    background-color: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

body.dark-mode .dashboard-widgets .message-board-container .message-delete-btn:focus {
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
}

body.dark-mode .dashboard-widgets .message-board-container .message-pagination {
    border-top-color: #555;
}

body.dark-mode .dashboard-widgets .message-board-container .page-info {
    color: #ccc;
}

body.dark-mode .dashboard-widgets .message-board-container .page-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .dashboard-widgets .message-board-container .page-btn:hover:not(:disabled) {
    background-color: #3a3a3a;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .message-board-container .page-btn:disabled {
    background-color: #333;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
}

body.dark-mode .dashboard-widgets .task-manager-container {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-manager-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .task-manager-container .task-manager-header h3 {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-icon {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-stats {
    color: #ccc;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-stats span {
    color: #ccc;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-manager-content {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-add-form input[type="text"] {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-add-form input[type="text"]:focus {
    border-color: var(--primary-color);
}

body.dark-mode .dashboard-widgets .task-manager-container .btn-add-task {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .dashboard-widgets .task-manager-container .btn-add-task:hover {
    background-color: var(--primary-hover);
}

body.dark-mode .dashboard-widgets .task-manager-container .task-list {
    background-color: #2c2c2c;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-item {
    background-color: #3a3a3a;
    border-color: #555;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-item:hover {
    background-color: #444;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-text {
    color: #e0e0e0;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-item.completed .task-text {
    color: #888;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-edit {
    background-color: #4caf50;
    color: #fff;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-edit:hover {
    background-color: #45a049;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-delete {
    background-color: #ff4444;
    color: #fff;
}

body.dark-mode .dashboard-widgets .task-manager-container .task-delete:hover {
    background-color: #cc0000;
}

body.dark-mode .news-category-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .news-category-btn:hover {
    background-color: #3a3a3a;
}

/* 深色模式下的下拉菜单样式 */
body.dark-mode .news-dropdown-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .news-dropdown-btn:hover {
    background-color: #3a3a3a;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-mode .news-dropdown-menu {
    background-color: #3a3a3a;
    border-color: #555;
}

body.dark-mode .news-dropdown-item {
    color: #ccc;
}

body.dark-mode .news-dropdown-item:hover {
    background-color: #444;
    color: var(--primary-color);
}

body.dark-mode .news-dropdown-item.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* 深色模式下的新闻刷新按钮样式 */
body.dark-mode .news-refresh-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .news-refresh-btn:hover {
    background-color: #3a3a3a;
    border-color: #666;
}

/* 深色模式下的搜索框样式 */
body.dark-mode .news-search-input {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .news-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

body.dark-mode .news-search-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .news-search-btn:hover {
    background-color: #3a3a3a;
    border-color: var(--primary-color);
}

/* 深色模式下的收藏按钮样式 */
body.dark-mode .news-favorite-toggle-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .news-favorite-toggle-btn:hover {
    background-color: #3a3a3a;
    border-color: #ff6b6b;
}

body.dark-mode .news-favorite-toggle-btn.active {
    background-color: #ff6b6b;
    color: #fff;
    border-color: #ff6b6b;
}

body.dark-mode .news-item {
    background-color: #3a3a3a;
}

body.dark-mode .news-item:hover {
    background-color: #444;
}

body.dark-mode .news-title {
    color: #e0e0e0;
}

body.dark-mode .news-meta {
    color: #ccc;
}

body.dark-mode .news-source {
    color: var(--primary-color);
}

body.dark-mode .news-time {
    color: #999;
}

body.dark-mode .news-summary {
    color: #ccc;
}

body.dark-mode .news-description {
    color: #bbb;
}

body.dark-mode .news-content {
    background-color: #2c2c2c;
}

body.dark-mode .news-loading {
    color: #ccc;
}

body.dark-mode .news-empty {
    color: #ccc;
}

body.dark-mode .news-error-title {
    color: #e0e0e0;
}

body.dark-mode .news-error-message {
    color: #ccc;
}

body.dark-mode .news-category-tag {
    background-color: #444;
    color: #ccc;
}

body.dark-mode .message-board-content {
    background-color: #2c2c2c;
}

body.dark-mode .message-form {
    background-color: #2c2c2c;
}

body.dark-mode .message-list {
    background-color: #2c2c2c;
}

body.dark-mode .message-list-container {
    background-color: #2c2c2c;
}

body.dark-mode .page-btn {
    background-color: #444;
    border-color: #555;
    color: #ccc;
}

body.dark-mode .page-btn:hover:not(:disabled) {
    background-color: #3a3a3a;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

body.dark-mode .page-btn:disabled {
    background-color: #333;
    border-color: #444;
    color: #666;
    cursor: not-allowed;
}

body.dark-mode .btn-submit-message {
    background-color: var(--primary-color);
    color: #fff;
}

body.dark-mode .btn-submit-message:hover {
    background-color: var(--primary-hover);
}

body.dark-mode .message-icon {
    color: #e0e0e0;
}

/* 留言板模块样式 */
.message-board-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
    overflow: hidden;
}

.message-board-container.widget-small .message-board-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-board-container.widget-small .message-board-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.message-board-container.widget-small .message-icon {
    font-size: 22px;
}

.message-board-container.widget-small .message-board-header .btn-submit-message {
    margin-top: 0;
    padding: 8px 18px;
    font-size: 12px;
}

.message-board-container.widget-small .message-board-content {
    min-height: 600px;
    max-height: 600px;
    overflow-y: auto;
}

.message-board-header {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.message-board-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-icon {
    font-size: 22px;
}

.message-board-content {
    padding: 20px 30px;
}

.message-form {
    margin-bottom: 30px;
}

.message-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.message-form input[type="text"] {
    flex: 0.8;
    min-width: 0;
    max-width: 45%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.message-form input[type="email"] {
    flex: 1.2;
    min-width: 0;
    max-width: 55%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.message-form input[type="text"]:focus,
.message-form input[type="email"]:focus {
    border-color: var(--primary-color);
}

.message-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.message-form textarea:focus {
    border-color: var(--primary-color);
}

.btn-submit-message {
    margin-top: 15px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-message:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.message-list-container h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.message-list {
    list-style: none;
}

.message-item {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.message-item:hover {
    background-color: #f0f0f0;
}

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

.message-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.message-name {
    font-weight: bold;
    color: #333;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.message-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: transparent;
    color: #999;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    padding: 0;
    line-height: 1;
}

.message-delete-btn::before {
    content: '🗑️';
    font-size: 14px;
}

.message-delete-btn:hover {
    background-color: #ffebee;
    color: #f44336;
    transform: scale(1.1);
}

.message-delete-btn:active {
    transform: scale(0.95);
}

.message-delete-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.message-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    word-break: break-word;
}

.message-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-btn {
    padding: 8px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #666;
}

body.dark-mode .message-board-container {
    background-color: #2c2c2c;
}

body.dark-mode .message-board-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .message-board-header h3 {
    color: #e0e0e0;
}

body.dark-mode .message-icon {
    color: #e0e0e0;
}

body.dark-mode .message-form input[type="text"],
body.dark-mode .message-form input[type="email"],
body.dark-mode .message-form textarea {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .message-form input[type="text"]:focus,
body.dark-mode .message-form input[type="email"]:focus,
body.dark-mode .message-form textarea:focus {
    border-color: var(--primary-color);
}

body.dark-mode .message-list-container h4 {
    color: #e0e0e0;
    border-bottom-color: #555;
}

body.dark-mode .message-item {
    background-color: #3a3a3a;
}

body.dark-mode .message-item:hover {
    background-color: #444;
}

body.dark-mode .message-name {
    color: #e0e0e0;
}

body.dark-mode .message-content {
    color: #ccc;
}

body.dark-mode .message-delete-btn {
    color: #888;
}

body.dark-mode .message-delete-btn:hover {
    background-color: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

body.dark-mode .message-delete-btn:focus {
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.3);
}

body.dark-mode .message-pagination {
    border-top-color: #555;
}

body.dark-mode .page-info {
    color: #ccc;
}

/* 深色模式下的记事本样式 */
body.dark-mode .notepad-container.widget-half {
    background-color: #2c2c2c;
}

body.dark-mode .notepad-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .notepad-header h3 {
    color: #e0e0e0;
}

body.dark-mode .notepad-icon {
    color: #e0e0e0;
}

body.dark-mode #notepadTitleInput {
    background-color: #444;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode #notepadTitleInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

body.dark-mode .notepad-list-container {
    background-color: #3a3a3a;
    border-color: #555;
}

body.dark-mode .notepad-list-container h4 {
    color: #e0e0e0;
}

body.dark-mode .notepad-list-item {
    border-bottom-color: #444;
}

body.dark-mode .notepad-list-item:hover {
    background-color: #444;
}

body.dark-mode .notepad-list-item.active {
    background-color: #2a4a6a;
    border-left-color: var(--primary-color);
}

body.dark-mode .notepad-list-item-content {
    color: #e0e0e0;
}

body.dark-mode .notepad-list-item-date {
    color: #888;
}

body.dark-mode #notepadTextarea {
    background-color: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode #notepadTextarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

body.dark-mode .notepad-list-empty {
    color: #888;
}

/* 深色模式下的文件上传样式 */
body.dark-mode .file-upload-container.widget-half {
    background-color: #2c2c2c;
}

body.dark-mode .file-upload-header {
    background-color: #3a3a3a;
    border-bottom-color: var(--primary-color);
}

body.dark-mode .file-upload-header h3 {
    color: #e0e0e0;
}

body.dark-mode .file-upload-icon {
    color: #e0e0e0;
}

body.dark-mode .file-upload-area {
    border-color: #555;
    background-color: #3a3a3a;
}

body.dark-mode .file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: #444;
}

body.dark-mode .upload-icon {
    color: #888;
}

body.dark-mode .file-upload-area p {
    color: #ccc;
}

body.dark-mode .uploaded-files {
    background-color: #3a3a3a;
}

body.dark-mode .uploaded-file-item {
    border-bottom-color: #555;
}

body.dark-mode .uploaded-file-item .file-name {
    color: #e0e0e0;
}

body.dark-mode .uploaded-file-item .file-size {
    color: #888;
}

body.dark-mode .uploaded-file-item .upload-status {
    color: #4CAF50;
}

/* 深色模式下滚动条样式 */
body.dark-mode ::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #333;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-add-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .task-add-form input[type="text"],
    .task-add-form select,
    .task-add-form input[type="date"] {
        width: 100%;
    }
    
    .news-item {
        flex-direction: column;
    }
    
    .news-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .message-form .form-row {
        flex-direction: row;
    }
    
    .task-manager-header,
    .news-header,
    .message-board-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-widgets .message-board-container.widget-small .message-board-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .dashboard-widgets .message-board-container.widget-small .message-board-header h3 {
        font-size: 16px;
        flex: 1;
    }
    
    .dashboard-widgets .message-board-container.widget-small .message-icon {
        font-size: 20px;
    }
    
    .dashboard-widgets .message-board-container.widget-small .btn-submit-message {
        padding: 6px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }
    
    .dashboard-widgets .news-container .news-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }
    
    .dashboard-widgets .news-container .news-header-left {
        flex-wrap: nowrap;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .dashboard-widgets .news-container .news-header-left h3 {
        font-size: 16px;
        flex: 1;
    }
    
    .dashboard-widgets .news-container .news-icon {
        font-size: 20px;
    }
    
    .dashboard-widgets .news-container .news-refresh-btn {
        font-size: 16px;
        padding: 6px 10px;
        flex-shrink: 0;
    }
    
    .dashboard-widgets .news-container .news-category {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }
    
    .dashboard-widgets .news-container .news-category-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 0 0 auto;
    }
    
    .bottom-widgets .widget-half {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    
    .bottom-widgets .utility-tools-content,
    .bottom-widgets .task-manager-content,
    .bottom-widgets .notepad-content,
    .bottom-widgets .file-upload-content {
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
    }
    
    .notepad-main {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .notepad-list-container {
        width: 100% !important;
        height: auto !important;
        max-height: 150px !important;
        border: 1px solid #ddd !important;
        padding: 8px !important;
    }
    
    .notepad-list-container h4 {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }
    
    .notepad-list-item {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    
    .notepad-list-item-content {
        font-size: 12px !important;
    }
    
    .notepad-list-item-date {
        display: none !important;
    }
    
    #notepadTextarea {
        width: 100% !important;
        min-height: 300px !important;
        height: 300px !important;
    }
    
    .file-upload-content {
        min-height: 400px !important;
        padding: 12px !important;
    }
    
    .file-upload-area {
        padding: 15px !important;
        margin-bottom: 12px !important;
    }
    
    .upload-icon {
        font-size: 28px !important;
    }
    
    .uploaded-files {
        min-height: 250px !important;
        max-height: 250px !important;
    }
    
    .footer {
        padding: 20px 0 15px !important;
    }
    
    .footer-content {
        padding: 0 15px !important;
    }
    
    .social-icons {
        gap: 12px !important;
        margin-bottom: 20px !important;
    }
    
    .social-icon {
        width: 36px !important;
        height: 36px !important;
    }
    
    .qr-codes {
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .qr-item {
        width: calc(50% - 7.5px) !important;
    }
    
    .qr-img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .qr-label {
        font-size: 12px !important;
        margin-top: 6px !important;
    }
    
    .footer-links {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .footer-links a {
        margin: 0 !important;
        font-size: 13px !important;
        flex: 0 0 calc(50% - 5px) !important;
        text-align: center !important;
    }
    
    .copyright p {
        font-size: 12px !important;
    }
}

/* 回到顶部悬浮按钮样式 */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #4169e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* 深色模式适配 */
body.dark-mode .scroll-to-top {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode .scroll-to-top:hover {
    background-color: #4169e1;
}

/* 手机端时事新闻模块样式修复 */
@media (max-width: 480px) {
    .dashboard-widgets .news-container .news-header {
        padding: 8px 10px;
    }

    .dashboard-widgets .news-container .news-header h3 {
        font-size: 14px;
    }

    .news-header {
        padding: 10px 15px;
    }

    .news-header-left {
        gap: 6px;
    }

    .news-header-left h3 {
        font-size: 14px;
    }

    .news-header-right {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .news-search {
        gap: 4px;
    }

    .news-search-input {
        width: 120px;
        padding: 6px 10px;
        font-size: 12px;
        height: 24px;
    }

    .news-search-btn {
        padding: 6px 10px;
        font-size: 12px;
        height: 24px;
    }

    .news-favorite-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
        height: 24px;
    }

    .news-category {
        gap: 4px;
    }

    .news-category-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .news-dropdown-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}