* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    /* 更深的渐变蓝色背景 */
    background: linear-gradient(135deg, 
                rgba(37, 102, 176, 0.8) 0%, 
                rgba(78, 173, 205, 0.8) 50%, 
                rgba(115, 157, 215, 0.8) 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10vh;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* 添加动态效果 */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, 
                rgba(255, 255, 255, 0.2) 0%, 
                rgba(255, 255, 255, 0.05) 30%, 
                transparent 70%);
    z-index: -1;
}

/* 当使用Bing壁纸时的样式 */
body.bing-wallpaper::before {
    background-color: rgba(0, 0, 0, 0.3);
    background-image: none;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

/* 修改时间样式，简化悬停动画效果 */
.time {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    padding: 10px 20px;
    border-radius: 15px;
}

.time:hover {
    transform: scale(1.08);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* 移除了背景色、模糊效果和边框 */
}

/* 修改底部诗句样式 */
.footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    padding: 0 20px;
}

#poem-text {
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* 移除背景选择器相关样式 */
/* .background-selector { ... } */
/* .bg-icon { ... } */
/* ... 其他背景选择器相关样式 ... */
.search-container {
    width: 600px;
    max-width: 90%;
    margin-bottom: 3rem;
}

.search-engines {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.engine-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.engine-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.engine-icon.active {
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.engine-icon i {
    font-size: 1.2rem;
    color: white;
}

/* 搜索框动画效果 */
.search-box {
    display: flex;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-box:hover, .search-box:focus-within {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

/* 顶部右侧按钮样式 */
.top-right-buttons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

.theme-toggle, .wallpaper-toggle, .donate-button {
    width: auto;
    height: 40px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-left: 10px;
    padding: 0 15px;
}

.theme-toggle, .wallpaper-toggle {
    width: 40px;
    padding: 0;
}

.theme-toggle:hover, .wallpaper-toggle:hover, .donate-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.theme-toggle i, .wallpaper-toggle i {
    font-size: 1.2rem;
    color: white;
}

.donate-button {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 捐赠模态框样式 */
.donate-modal-content {
    max-width: 400px;
    text-align: center;
}

.donate-image {
    margin: 20px auto;
    max-width: 100%;
}

.donate-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 深色模式样式 */
body.dark-mode {
    background-color: #121212;
}

body.dark-mode::before {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-mode .search-box {
    background-color: rgba(30, 30, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .search-box:hover, 
body.dark-mode .search-box:focus-within {
    background-color: rgba(40, 40, 40, 0.8);
}

body.dark-mode .engine-icon,
body.dark-mode .theme-toggle,
body.dark-mode .donate-button {
    background-color: rgba(50, 50, 50, 0.7);
}

body.dark-mode .engine-icon:hover,
body.dark-mode .theme-toggle:hover,
body.dark-mode .donate-button:hover {
    background-color: rgba(70, 70, 70, 0.8);
}

body.dark-mode .engine-icon.active {
    background-color: rgba(100, 100, 100, 0.8);
}

body.dark-mode .bookmark {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .bookmark:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .bookmark-icon {
    background-color: rgba(70, 70, 70, 0.7);
}

body.dark-mode .modal-content {
    background-color: rgba(30, 30, 30, 0.95);
}
#search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    background: transparent;
    color: white;
    font-size: 1rem;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#search-button {
    background: transparent;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#search-button:hover {
    color: rgba(255, 255, 255, 0.7);
}

.bookmarks-container {
    width: 80%;
    max-width: 1000px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.bookmarks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

.bookmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px 10px;
    border-radius: 10px;
}

.bookmark:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.bookmark-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.5rem;
    overflow: hidden;
}

.bookmark-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bookmark-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 修改添加书签按钮样式 */
.add-bookmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px 10px;
    border-radius: 10px;
}

.add-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.add-bookmark:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.add-bookmark .bookmark-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 背景选择器样式 */
.background-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.bg-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bg-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.bg-icon i {
    font-size: 1.2rem;
    color: white;
}

.bg-options {
    position: absolute;
    top: 50px;
    right: 0;
    width: 280px;
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 101;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.option-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: white;
    text-align: center;
}

.option-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.switch {
    width: 50px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-toggle {
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.switch.active {
    background-color: #0071e3;
}

.switch.active .switch-toggle {
    left: 26px;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-item {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.color-item:hover {
    transform: scale(1.05);
}

.color-item.active {
    border-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 修改footer样式，保留空间但不显示内容 */
.footer {
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100%;
    height: 10px;
}

.copyright {
    font-size: 0.8rem;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.5);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: white;
}

#modal-title {
    margin-bottom: 20px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-save, .btn-delete {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save {
    background-color: #0071e3;
    color: white;
}

.btn-save:hover {
    background-color: #0077ed;
}

.btn-delete {
    background-color: rgba(255, 59, 48, 0.8);
    color: white;
}

.btn-delete:hover {
    background-color: rgba(255, 59, 48, 1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .time {
        font-size: 3.5rem;
    }
    
    .search-container {
        width: 90%;
    }
    
    .bookmarks {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .bookmark-icon,
    .add-icon {  /* 添加add-icon */
        width: 40px;
        height: 40px;
        font-size: 1.2rem;  /* 调整图标大小 */
    }
}

@media (max-width: 480px) {
    .time {
        font-size: 2.5rem;
    }
    
    .bookmarks {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }
    
    .bookmark-icon,
    .add-icon {  /* 添加add-icon */
        width: 35px;
        height: 35px;
        font-size: 1rem;  /* 更小的图标大小 */
    }
    
    .bookmark-name,
    .add-bookmark .bookmark-name {  /* 确保文字大小一致 */
        font-size: 0.8rem;
    }
}