body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #f0f0f0;
    font-family: Arial, sans-serif;
    color: var(--text-color, #333);
    overflow-y: auto;
}

.main-content {
    padding: 20px;
}

.sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 10px;
    border-radius: 10px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    width: auto;
    overflow: hidden;
}

/* 收起状态的侧边栏 */
.sidebar.collapsed {
    width: 40px; /* 更小的宽度 */
    height: 40px; /* 更小的高度 */
    padding: 5px; /* 减少内边距 */
    background: rgba(255, 255, 255, 0.05); /* 更透明的背景 */
    border: 1px solid rgba(255, 255, 255, 0.1); /* 更淡的边框 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* 更轻的阴影 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 收起按钮样式 */
.collapse-icon {
    margin-top: 10px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed .collapse-icon {
    transform: rotate(180deg);
    margin: 0; /* 收起时移除边距 */
    position: relative;
    z-index: 1001;
    /* 确保按钮可以点击 */
    pointer-events: auto;
    cursor: pointer;
    /* 收起状态下更小更低调 */
    width: 30px;
    height: 30px;
    opacity: 0.6; /* 降低透明度 */
    background: none; /* 移除背景 */
}

.sidebar.collapsed .collapse-icon img {
    width: 18px; /* 更小的图标 */
    height: 18px;
    opacity: 0.7; /* 图标也更透明 */
}

.sidebar.collapsed .collapse-icon:hover {
    opacity: 1; /* 悬停时恢复完全不透明 */
}

.sidebar.collapsed .collapse-icon:hover img {
    opacity: 1;
}

.sidebar.collapsed .collapse-icon .icon-title {
    display: none !important;
}

/* 收起状态时完全隐藏其他所有内容 */
.sidebar.collapsed .icon:not(.collapse-icon),
.sidebar.collapsed .divider {
    display: none !important;
}

/* 收起状态下的侧边栏图标容器 */
.sidebar.collapsed .sidebar-icons {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 展开状态时显示所有图标 */
.sidebar:not(.collapsed) .icon {
    opacity: 0.7;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-icons .icon {
    width: 40px;
    height: 40px;
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
}

.icon-title {
    display: none;
    position: absolute;
    left: 45px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1001;
    font-weight: 500;
    letter-spacing: 0.5px;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.sidebar-icons {
    position: relative;
    z-index: 1;
}

.sidebar-icons .icon img {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.sidebar-icons .icon:hover .icon-title {
    display: block;
}

.sidebar-icons .icon.sortable-ghost {
    opacity: 0.2;
}

.sidebar-icons .icon.sortable-chosen {
    opacity: 1;
}

.divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 10px 0;
}

/* 顶部时间/日期 */
.hero-clock {
    width: 800px;
    max-width: 90vw;
    margin: 60px auto 0;
    text-align: center;
    color: #fff; /* 固定为白色，不受 --text-color 影响 */
    user-select: none;
}
.hero-clock.hidden { display: none; }
.hero-time {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #000; /* 改为黑色文字 */
    text-shadow: 0 2px 12px rgba(0,0,0,0.15),
                 0 0 2px rgba(255,255,255,0.9),
                 0 0 6px rgba(255,255,255,0.6);
    -webkit-text-stroke: 1px rgba(255,255,255,0.9);
}
.hero-date {
    margin-top: 8px;
    font-size: 16px;
    opacity: 0.9;
    color: #000; /* 改为黑色文字 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 0 2px rgba(255,255,255,0.8);
}

/* 搜索容器：默认距顶部 150px，可在显示时间时减少间距 */
.search-container { width: 800px; max-width: 90vw; margin: 150px auto 50px; transition: margin-top .25s ease; }
.search-container.shifted { margin-top: 40px; }

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

/* 透明搜索框样式 */
.search-box.transparent {
    background: transparent; /* 完全透明背景 */
    backdrop-filter: none; /* 去掉毛玻璃效果 */
    -webkit-backdrop-filter: none; /* 去掉WebKit毛玻璃效果 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* 保留淡边框 */
    box-shadow: none; /* 去掉阴影 */
}

/* 透明模式下搜索引擎选择器样式 */
.search-box.transparent .search-engine-selector:hover {
    background: rgba(255, 255, 255, 0.1); /* 更淡的悬停效果 */
}

.search-box.transparent .search-engine-selector.active {
    background: rgba(255, 255, 255, 0.15); /* 更淡的激活效果 */
}

/* 透明模式下搜索按钮样式 */
.search-box.transparent .search-button:hover {
    background: rgba(255, 255, 255, 0.1); /* 更淡的悬停效果 */
}

/* 搜索引擎选择器 */
.search-engine-selector {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    min-width: 70px;
    border-radius: 24px 0 0 24px;
    /* 确保为下拉菜单创建定位上下文 */
    z-index: 1;
}

.search-engine-selector:hover {
    background: rgba(255, 255, 255, 0.15);
}

.search-engine-selector.active {
    background: rgba(255, 255, 255, 0.2);
}

.search-engine-selector img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.dropdown-arrow {
    margin-left: 10px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.dropdown-arrow img {
    width: 18px;
    height: 18px;
    opacity: 0.8;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.search-engine-selector.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* 下拉菜单 */
.engine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 999999 !important; /* 设置为最高层级，高于所有对话框 */
    overflow: hidden;
    margin-top: 8px;
    /* 确保在所有上下文中都显示在最顶层 */
    isolation: isolate;
    /* 保证渲染层级 */
    will-change: transform;
    transform: translateZ(0);
}

.engine-dropdown.hidden {
    display: none;
}

.engine-option {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    white-space: nowrap;
    min-height: 44px;
    box-sizing: border-box;
}

.engine-option:hover {
    background: rgba(66, 133, 244, 0.12);
    color: #1a73e8;
}

.engine-option:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.engine-option:first-child {
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
}

.engine-option:last-child {
    border-bottom-left-radius: 9px;
    border-bottom-right-radius: 9px;
}

.engine-option img {
    width: 20px;
    height: 20px;
    margin-right: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.engine-option span {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
}

#searchInput {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
    color: var(--text-color, #333);
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 搜索按钮 */
.search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    cursor: pointer;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0 24px 24px 0; /* 右侧圆角，与搜索框整体风格一致 */
    transition: all 0.3s ease;
}

.search-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-button img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 20px;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    max-width: 800px;
    margin: 20px auto;
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color, #333);
    transition: all 0.3s ease;
    opacity: 0.9;
    padding: 15px;
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.grid-item:hover {
    transform: translateY(-5px);
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.grid-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    border-radius: 8px;
}

.grid-item span {
    text-align: center;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    font-weight: bold;
}

.dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000; /* 提升层级，确保覆盖其他固定元素 */
}

.dialog.hidden {
    display: none;
}

.dialog-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative; /* 为 z-index 生效创建层叠上下文 */
    z-index: 12001;     /* 高于遮罩层，确保按钮可点 */
}

.dialog h3 {
    margin: 0 0 20px 0;
    color: #333;
    display: flex;
    align-items: center;
}

.bg-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bg-option {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bg-option label {
    color: #666;
}

.bg-option input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dialog-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.dialog-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dialog-buttons button:hover {
    opacity: 0.8;
}

#saveBgSettings, #saveBookmark {
    background: #4285f4;
    color: white;
}

#deleteBookmark {
    background: #dc3545;
    color: white;
}

#cancelBgSettings, #cancelBookmark {
    background: #f1f3f4;
    color: #333;
}

/* 对话框内文字颜色固定（背景设置 / 全局设置） */
#bgSettingsDialog .dialog-content,
#settingsDialog .dialog-content {
    color: #333 !important;
}
#bgSettingsDialog .dialog-content *,
#settingsDialog .dialog-content * {
    color: inherit;
}

.context-menu {
    position: absolute;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 5px 0;
    z-index: 1000;
    min-width: 120px;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.context-menu-item:hover {
    background: #f1f3f4;
}

.context-menu-item:hover img {
    opacity: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}



.dialog-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.3));
}

.color-options {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.color-radio {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.color-box.white {
    background: white;
}

.color-box.black {
    background: black;
}

.custom-color {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.add-section {
    margin-top: auto;
}

.add-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.add-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.add-link img {
    width: 32px;
    height: 32px;
}

.sidebar-icons .icon.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-icons .icon:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.custom-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* 移除所有组件相关的样式 */

/* 版权提示框样式 */
.copyright-content {
    margin: 20px 0;
    line-height: 1.6;
}

/* 信息容器样式 */
.info-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color, #333);
    min-width: 200px;
}

.info-container.hidden {
    display: none;
}

.time-display {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

/* 清理了旧的announcement样式 */

/* 已移除旧的announcement-container和announcement-link样式，改为使用version-info-card */

.copyright-content {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 确保图标本身不受毛玻璃效果影响 */
.sidebar-icons .icon img {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.icon-selector {
    margin-top: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.icon-option {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.icon-option:hover {
    background: #f5f5f5;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-option.selected {
    border-color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.icon-option img {
    width: 22px;
    height: 22px;
}

/* 移除所有可能影响标题显示的毛玻璃效果 */
.sidebar *, .sidebar-icons *, .icon-title * {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 添加视频背景样式 */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* 壁纸库对话框样式 */
.wallpaper-dialog {
    max-width: 900px;
    max-height: 80vh;
    height: 80vh; /* 明确设置高度 */
    width: 90vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

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

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f5f5f5;
}

.close-btn img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.wallpaper-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
    background-color: #f9f9f9;
}

.tab-btn.active {
    color: #4285f4;
    border-bottom-color: #4285f4;
    font-weight: 500;
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* 关键：允许flex子元素收缩 */
}

.tab-pane {
    display: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 20px 20px 20px;
    /* 确保滚动在所有浏览器中都工作 */
    -webkit-overflow-scrolling: touch;
    /* 为滚动内容创建新的层叠上下文 */
    position: relative;
    /* 强制显示滚动条，确保用户知道可以滚动 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

/* WebKit浏览器的滚动条样式 */
.tab-pane::-webkit-scrollbar {
    width: 8px;
}

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

.tab-pane::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.tab-pane::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}



.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    /* 确保网格可以正常滚动 */
    width: 100%;
    overflow: visible;
}

.wallpaper-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.wallpaper-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background-color: #f5f5f5;
    display: block;
}



.dynamic-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(66, 133, 244, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.load-more-container {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* 自定义设置样式 */
.custom-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex: 1;
}

.custom-section {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.custom-section-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.custom-section-row .custom-section {
    flex: 1;
    margin-bottom: 0;
}

.custom-section h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.test-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.test-btn:hover {
    background: #3367d6;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: white;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.file-label:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.file-label img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

.tip {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
    line-height: 1.4;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 8px;
    transition: background-color 0.3s;
    display: inline-block;
    width: auto;
    min-width: 80px;
}

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

.save-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wallpaper-dialog {
        width: 95vw;
        max-height: 90vh;
    }
    
    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

/* 设置列表与开关 */
.settings-list { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 12px; }
.setting-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
}
.setting-info { display: flex; flex-direction: column; gap: 4px; }
.setting-title { font-weight: 600; color: #333; }
.setting-desc { font-size: 12px; color: #666; }

/* iOS-like switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #cfd8dc; transition: .2s; border-radius: 26px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2);} 
.switch input:checked + .slider { background: #4CAF50; }
.switch input:checked + .slider:before { transform: translateX(20px); }
.slider.round { border-radius: 26px; }

@media (max-width: 1100px) { .settings-list { grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 700px) { .settings-list { grid-template-columns: 1fr; } }

/* 首页公告信息卡片 */
.announcement-card {
    /* 宽度由网格控制 */
    max-width: 100%;
    margin: 0; /* 在网格中由容器控制间距 */
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    color: var(--text-color, #333);
}
/* 旧的响应式宽度清理：不再需要 .announcement-card.hidden 保留 */
.announcement-card.hidden { display: none; }
.announcement-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.announcement-card-content { font-size: 14px; line-height: 1.6; max-height: 90px; overflow: hidden; text-overflow: ellipsis; }
.announcement-card-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    margin-top: 12px; 
    padding: 8px 16px; /* 比文字稍宽 */
    background: #1a73e8; 
    color: #fff !important; 
    text-decoration: none; 
    border-radius: 8px; 
    box-shadow: 0 2px 6px rgba(26,115,232,.3); 
    border: none; 
    font-size: 14px; 
    line-height: 1; 
    white-space: nowrap; 
    transition: background .2s ease, transform .1s ease; 
}
.announcement-card-btn:hover { background: #1669c1; transform: translateY(-1px); }
.announcement-card-btn:active { transform: translateY(0); }
.announcement-card-link { display: inline-block; margin-top: 10px; color: #1a73e8; text-decoration: none; }
.announcement-card-link:hover { text-decoration: underline; }

/* 公告卡片网格容器 - 动态适应卡片数量 */
.announcement-card-grid { 
    width: 800px; 
    max-width: 90vw; 
    margin: 12px auto 20px; 
    display: grid; 
    gap: 12px; 
    /* 默认3列，根据卡片数量和屏幕尺寸调整 */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.announcement-card-grid.hidden { display: none; }

/* 根据卡片数量调整列数 */
.announcement-card-grid:has(.announcement-card:nth-child(1):nth-last-child(1)) { 
    /* 1个卡片：1列 */ 
    grid-template-columns: minmax(300px, 400px); 
    justify-content: center;
}
.announcement-card-grid:has(.announcement-card:nth-child(2):nth-last-child(1)) { 
    /* 2个卡片：2列 */ 
    grid-template-columns: repeat(2, minmax(240px, 1fr)); 
}
.announcement-card-grid:has(.announcement-card:nth-child(3):nth-last-child(1)) { 
    /* 3个卡片：3列 */ 
    grid-template-columns: repeat(3, minmax(240px, 1fr)); 
}

/* 卡片样式 */
.announcement-card { 
    aspect-ratio: 1 / 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    min-height: 200px;
}
.announcement-card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.announcement-card-content { 
    font-size: 13px; 
    line-height: 1.5; 
    flex-grow: 1;
    overflow: hidden; 
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

/* 响应式断点 */
@media (max-width: 900px) { 
    .announcement-card-grid { 
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; 
        max-width: 95vw;
    }
}
@media (max-width: 600px) { 
    .announcement-card-grid { 
        grid-template-columns: 1fr !important; 
        width: 100%;
        padding: 0 10px;
    }
    .announcement-card { min-height: 180px; }
}

/* 版本信息卡片 - 长方形，显示在公告卡片下方 */
.version-info-card {
    width: 800px;
    max-width: 90vw;
    margin: 8px auto 20px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    color: var(--text-color, #333);
    min-height: 20px;
}

.version-info-card.hidden { display: none; }

.version-info-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.version-text {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.8;
    flex-grow: 1;
}

.version-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #1a73e8;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    transition: background .2s ease, transform .1s ease;
    box-shadow: 0 2px 4px rgba(26,115,232,.2);
}

.version-link:hover {
    background: #1669c1;
    transform: translateY(-1px);
}

.version-link:active {
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 600px) {
    .version-info-card {
        width: 100%;
        padding: 10px 15px;
        margin: 8px 10px 20px;
    }
    
    .version-info-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .version-text {
        font-size: 12px;
    }
}

/* 调整壁纸网格底部留白，便于滚动加载 */
.wallpaper-grid { padding-bottom: 40px; }

/* 搜索历史下拉列表样式 */
.search-history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 999999;
    overflow: hidden;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.search-history-dropdown.hidden {
    display: none;
}

.search-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.clear-history-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    opacity: 0.7;
}

.clear-history-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    opacity: 1;
}

.clear-history-btn img {
    width: 16px;
    height: 16px;
}

.search-history-list {
    max-height: 240px;
    overflow-y: auto;
}

.search-history-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-history-item:hover {
    background: rgba(66, 133, 244, 0.1);
}

.search-history-item:last-child {
    border-bottom: none;
}

.search-history-icon {
    margin-right: 12px;
    opacity: 0.7;
}

.search-history-icon img {
    width: 16px;
    height: 16px;
}

.search-history-text {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-history-time {
    font-size: 12px;
    opacity: 0.6;
    margin-left: 12px;
}