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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 - 简洁优雅设计 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: transparent;
    border-radius: 16px;
    color: #333;
    position: relative;
    transition: all 0.3s ease;
}

/* 头部内容容器 */
.header-content {
    position: relative;
    z-index: 1;
}

/* 备份按钮容器 */
.backup-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
}

/* 备份按钮样式 */
.backup-button {
    width: 40px;
    height: 40px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.backup-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* 通用主按钮样式 */
.primary-button, .disguise-button, .explore-button {
    padding: 12px 24px;
    border: none;
    background-color: #6366f1;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.primary-button:hover, .disguise-button:hover, .explore-button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.primary-button i, .disguise-button i, .explore-button i {
    margin-right: 8px;
}

.logo-container {
    margin-bottom: 15px;
}

.logo {
    font-size: 56px;
    font-weight: bold;
    display: inline-block;
    position: relative;
    color: #6366f1;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.logo:hover {
    transform: scale(1.03);
}

/*张卫家
/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 拖拽排序相关样式 */
.nav-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
}

.nav-item.over {
    border: 2px dashed #6366f1;
}

/* 创意时间显示样式 */
.creative-time {
    display: inline-block;
    margin-left: 10px;
    position: relative;
}

.creative-clock {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clock-face {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: visible;
}

.time-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.time-dot.hour-dot {
    width: 3px;
    height: 3px;
}

.time-dot.active {
    background-color: #6366f1;
    box-shadow: 0 0 8px #6366f1;
    animation: pulseActive 1.5s infinite;
}

.time-dot.hour-dot.active {
    width: 4px;
    height: 4px;
}

.time-dot.hour-dot {
    transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(10px);
}

.time-dot.minute-dot {
    transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(11px);
}

.clock-center {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* 时间显示样式 - 关键修改：放大时间文本 */
.time-text {
    font-size: 72px !important; /* 进一步放大时间显示 */
    font-weight: bold !important;
    color: #fff !important;
    line-height: 1 !important;
    text-shadow: 0 2px 8px rgba(99, 102, 241, 0.3) !important;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(10px) scale(1);
    }
    50% {
        opacity: 0.9;
        transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(10px) scale(1.1);
    }
}

@keyframes pulseActive {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px #6366f1;
        transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(10px) scale(1);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 12px #6366f1, 0 0 20px rgba(99, 102, 241, 0.5);
        transform: translateX(-50%) translateY(-50%) rotate(var(--angle)) translateX(10px) scale(1.2);
    }
}

/* 设置全局背景图片 */
body {
    background-image: url('https://go.mtab.cc/images/2025/07/23/ZIfwDKIxcpAzcHpFCywUtiNuHFpWTGVn.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
}

/* 容器背景半透明，确保内容清晰可见
.container {
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 30px;
    margin: 40px auto;
    max-width: 1200px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}
 */

/* zwj */






/* 日期格式的logo样式 */
.date-logo {
    font-size: 32px; /* 稍微调整字体大小以适应日期显示 */
    font-weight: bold;
    color: #6fff;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.2;
}

.slogan {
    font-size: 18px;
    color: #fff;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 当前日期样式 */
.current-date {
    font-size: 14px;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.current-date:hover {
    background-color: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 移动端优化 - 确保输入框高度正确显示 */
@media (max-width: 768px) {
    /* 搜索容器样式与PC端保持一致 */
    .search-container {
        border-radius: 16px !important;
        padding: 20px !important;
        margin: 0 auto 30px !important;
        max-width: 100% !important;
        transition: all 0.3s ease !important;
        position: relative !important; /* 确保下拉框能正确定位 */
        z-index: 10 !important;
    }
    
    /* 调整搜索栏容器样式，解决高度问题 */
    .search-bar {
        position: relative !important;
        display: block !important; /* 移除flex布局 */
        border-radius: 36px !important;
        overflow: hidden !important;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        transition: all 0.3s ease !important;
        margin-bottom: 20px !important;
        height: 50px !important; /* 稍大于输入框高度以容纳边框 */
    }
    
    /* 移动端搜索下拉框样式 */
    #suggestion-box, .suggestion-box {
        position: fixed !important; /* 在移动端使用fixed定位 */
        top: 220px !important; /* 固定在搜索框下方 */
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        z-index: 99999 !important;
    }
    
    /* 搜索输入框增大尺寸 */
    #search-input {
        width: 90% !important;
        height: 50px !important; /* 确保高度生效 */
        border: 2px solid #e2e8f0 !important;
        border-right: none !important;
        border-radius: 36px 0 0 36px !important;
        outline: none !important;
        transition: all 0.3s ease !important;
        background-color: #ffffff !important;
        box-shadow: none !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 1 !important;
    }
    
    /* 聚焦状态样式 */
    #search-input:focus {
        border-color: #6366f1 !important;
        border-right-color: transparent !important;
        background-color: #fff !important;
    }
    
    /* 容器聚焦状态 */
    .search-bar:focus-within {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }
    
    /* 搜索按钮样式 */
    .search-button {
        height: 50px !important;
        width: 50px !important;
        font-size: 22px !important;
        border-radius: 0 36px 36px 0 !important;
        position: absolute !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
        z-index: 2 !important;
    }
    
    /* 按钮悬停效果 */
    .search-button:hover {
        background-color: #f9fafb !important;
        color: #6366f1 !important;
    }
}

/* 搜索区域样式 */
.search-container {
    border-radius: 16px;
    padding: 20px;
    margin: 0 auto 30px;
    max-width: 800px; /* 减少宽度 */
    transition: all 0.3s ease;
    position: relative;
}

/* 搜索栏容器样式 - 统一管理 */
.search-bar {
    position: relative !important;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    height: 52px !important; /* 固定高度 */
    border-radius: 26px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    z-index: 1;
}

/* 搜索输入框样式 - 统一管理 */
#search-input {
    flex: 1;
    height: 100%;
    padding: 0 62px 0 20px;
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 26px 0 0 26px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    position: relative;
    box-shadow: none;
}

#search-input:focus {
    border-color: #6366f1;
    border-right-color: transparent;
    background-color: #fff;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#search-input::placeholder {
    color: #9ca3af;
    font-style: normal;
    transition: all 0.3s ease;
}



/* 按钮悬停效果 */
.search-button:hover {
    background-color: #f9fafb;
    color: #6366f1;
}

/* 搜索联想下拉框样式 - 统一版本 */
#suggestion-box, .suggestion-box {
    position: absolute !important;
    top: calc(52px + 18px) !important; /* 搜索框高度 + 外边距 */
    left: 41px !important; /* 与search-container的padding一致 */
    right: 20px !important; /* 与search-container的padding一致 */
    width: calc(100% - 113px) !important; /* 考虑左右padding */
    background: white !important;
    border: 8px solid white !important;
    border-radius:0 0 12px 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    display: none !important;
    pointer-events: none !important;
}

/* 搜索联想下拉框显示样式 */
#suggestion-box.show, .suggestion-box.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
    pointer-events: auto !important;
}

/* 联想项样式 */
.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

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

.suggestion-item:hover {
    background-color: #f9fafb;
    color: #6366f1;
}

.suggestion-item i {
    margin-right: 10px;
    color: #9ca3af;
}

#search-input:focus::placeholder {
    color: #d1d5db;
    transform: translateX(5px);
}

.search-button {
    position: absolute;
    right: 0;
    height: 52px;
    width: 52px;
    border: none;
    background-color: #6366f1;
    color: white;
    border-radius: 0 26px 26px 0; /* 只设置右侧圆角 */
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border-left: none; /* 移除左侧边框以便与输入框融合 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.search-button:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}



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

.suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 6px;
    margin: 4px;
}

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

.suggestion-item:hover {
    background-color: #f0f4ff;
    color: #6366f1;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.suggestion-item i {
    margin-right: 12px;
    color: #94a3b8;
}

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

.suggestion-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.suggestion-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.suggestion-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 搜索引擎选择区域 */
.search-engines {
    position: relative;
    margin-top: 16px;
    opacity: 0.5; /* 默认透明度50% */
    transition: opacity 0.3s ease;
}

.search-engines:hover {
    opacity: 1; /* 鼠标指向时恢复完全不透明 */
}

/* 确保active状态的按钮始终可见 */
.search-engines .engine-btn.active {
    opacity: 1;
}

.engine-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
}

.engine-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0;
    margin-bottom: 8px;
    padding: 1px;
    border-radius: 8px;
}

.engine-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    margin: 5px;
    min-height: 36px;
}

.engine-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.engine-btn.active {
    background-color: #6366f1;
    color: white;
    border-color: #6366f1;
}

.engine-btn i {
    margin-right: 6px;
}

/* 搜索引擎删除按钮样式 */
.engine-delete-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 20px;
    height: 20px;
    border: none;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.engine-delete-btn:hover {
    background-color: #dc2626;
    transform: scale(1.1);
    opacity: 1;
}

/* 编辑模式下的搜索引擎按钮 */
.is-edit-mode .engine-btn {
    position: relative;
}

/* 在编辑模式下，删除按钮一直显示 */
.is-edit-mode .engine-btn .engine-delete-btn {
    opacity: 1;
    transform: scale(1);
}

/* 拖拽排序时的幽灵元素样式 */
.engine-btn-over {
    background-color: rgba(99, 102, 241, 0.1);
    border: 2px dashed #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

/* 拖拽过程中允许放置的区域样式 */
.sortable-ghost {
    opacity: 0.4;
    transform: rotate(-2deg);
}

/* 搜索热词开关 */
.search-tags-toggle {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #64748b;
    margin-top: 10px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin-right: 8px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #6366f1;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 网址导航区域 */
.nav-container {
    display: block;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

/* 分类标签样式 */
.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background-color: #fafbfc21;
    padding: 8px 12px;
    border-radius: 12px;

}

.category-tab {
    padding: 6px 16px;
    border: 1px solid #e2e8f0;
    background-color: #ffffffad;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.category-tab:hover {
    border-color: #6366f1;
    color: #6366f1;
    background-color: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-tab.active {
    background-color: #6366f1;
    color: white;
    border-color: #6366f1;
}

.nav-actions {
    display: flex;
    gap: 12px;
}

/* 通用次要按钮样式 */
.secondary-button, .edit-button, .add-button {
    padding: 8px 16px;
    background-color: #fafbfc21;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.secondary-button:hover, .edit-button:hover, .add-button:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.edit-button.active {
    background-color: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* 网址项容器 - 自适应布局 */
.nav-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding-bottom: 40px;
    background-color: #fafbfc21;
    border-radius: 12px;
    padding: 20px;
}

/* 网址项 */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 16px;
    background-color: #ffffffad;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-item:hover {
    background-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.nav-item.editing {
    animation: shake 0.5s;
    box-shadow: 0 0 0 2px #6366f1;
}

/* 拖拽排序相关样式 */
.nav-item-dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 1000;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.nav-item-over {
    background-color: #e0f2fe;
    border: 2px dashed #3b82f6;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* 网址图标 */
.nav-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-weight: bold;
    color: white;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 网址标题 */
.nav-title {
    font-size: 14px;
    color: #334155;
    text-align: center;
    word-break: break-all;
}

/* 编辑模式下的操作按钮 */
.nav-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none; /* 默认隐藏 */
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item.editing .nav-item-actions {
 display: flex; /* 编辑模式下显示 */
    opacity: 1;
}

/* 推荐按钮样式 */
.nav-recommend-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
    color: #6b7280;
}

.nav-recommend-btn:hover {
    background-color: #6366f1;
    color: white;
}

.edit-nav-item,
.delete-nav-item {
    width: 24px;
    height: 24px;
    border: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
}

.edit-nav-item:hover {
    background-color: #34d399;
    color: white;
}

.delete-nav-item:hover {
    background-color: #f87171;
    color: white;
}

/* 开始探索按钮 */
.explore-container {
    text-align: center;
    margin-bottom: 40px;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* explore-button 继承 primary-button 样式 */
.explore-button {
    font-size: 16px;
    display: inline-flex;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.modal-header h3 {
    font-size: 18px;
    color: #1e293b;
}

.close-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s;
}

.close-button:hover {
    background-color: #f1f5f9;
    color: #334155;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

/* 表单组样式 */
.form-group {
    padding: 8px;
    border-radius: 8px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

/* 行内表单组容器 */
.form-group-inline {
    display: flex;
    gap: 20px;
    background-color: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    margin-bottom: 20px;
}

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

/* 图标相关字段的容器 - 用于将颜色选择和预览放在同一行 */
.icon-fields-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.icon-fields-container .form-group {
    flex: 1;
    margin-bottom: 0;
}

.icon-fields-container .icon-preview-group {
    margin-bottom: 0;
}

.form-group input[type="text"],
.form-group input[type="url"] {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group input[type="color"] {
    width: 60px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 美化选择框样式 */
.form-group select {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    appearance: none;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 12a.5.5 0 0 0 .5-.5V5.707l2.146 2.147a.5.5 0 0 0 .708-.708l-3-3a.5.5 0 0 0-.708 0l-3 3a.5.5 0 1 0 .708.708L7.5 5.707V11.5a.5.5 0 0 0 .5.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.form-group select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group select:hover {
    border-color: #cbd5e1;
}

/* 图标预览 */
.icon-preview-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-preview-group label {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

.icon-preview {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 24px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* 按钮样式 */
.cancel-button,
.confirm-button,
.delete-button,
.edit-button,
.add-button,
.search-button,
.engine-btn,
.explore-button,
.close-button {
    padding: 10px 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

/* 按钮通用悬停效果 */
.cancel-button:hover,
.confirm-button:hover,
.delete-button:hover,
.edit-button:hover,
.add-button:hover,
.search-button:hover,
.engine-btn:hover,
.explore-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 通用模态框按钮样式 */
.modal-button, .cancel-button, .confirm-button, .delete-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

/* 模态框按钮具体样式 */
.cancel-button {
    background-color: #f1f5f9;
    color: #334155;
}

.cancel-button:hover {
    background-color: #e2e8f0;
}

.confirm-button {
    background-color: #6366f1;
    color: white;
}

.confirm-button:hover {
    background-color: #4f46e5;
}

.delete-button {
    background-color: #f87171;
    color: white;
}

.delete-button:hover {
    background-color: #ef4444;
}

/* 删除确认弹窗特殊样式 */
.delete-modal-content .modal-body {
    text-align: center;
    padding: 32px 24px;
}

.delete-modal-content .modal-body p {
    font-size: 16px;
    color: #334155;
}

/* 备份选项按钮样式 */
.backup-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
}

.backup-option-button {
    flex: 1;
    padding: 12px 24px;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.backup-option-button:hover {
    border-color: #6366f1;
    color: #6366f1;
    background-color: #f0f4ff;
}

.backup-option-button.active {
    background-color: #6366f1;
    color: white;
    border-color: #6366f1;
}

.backup-option-button i {
    margin-right: 8px;
}

/* 备份部分样式 */
.backup-section {
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.backup-section p {
    margin-bottom: 12px;
    color: #64748b;
}

.backup-section input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.backup-section input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 密码提示样式 */
.password-tip {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-top: 8px !important;
}

/* 探索页面样式 */
.page-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.page-overlay.show {
    display: flex;
}

.page-content {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: modalSlideIn 0.3s ease-out;
}

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

.page-header h2 {
    font-size: 20px;
    color: #1e293b;
}

.page-body {
    padding: 24px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 0px;
    }
.nav-container
{
        padding: 0px;
    }

    .container {
        padding: 0px;
    }

    .logo {
        font-size: 36px;
    }

    .cn {
        font-size: 14px;
    }

    .search-bar {
        flex-direction: column;
    }

    #search-input {
        width: 100%;
        margin-bottom: 12px;
    }

    .search-button {
        margin-left: 0;
        width: 100%;
    }



    .nav-items {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .page-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .nav-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .nav-actions {
        justify-content: center;
    }

    .nav-items {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .cancel-button,
    .confirm-button,
    .delete-button {
        width: 100%;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 记事本侧边栏按钮样式 */
.notepad-toggle {
    position: fixed;
    top: 5%;
    right: 15px;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background-color: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    font-size: 24px;
}

.notepad-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 计算器侧边栏按钮样式 */
.calculator-toggle {
    top: 15% !important;
    background-color: #10b981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* 热榜侧边栏按钮样式 */
.hotlist-toggle {
    top: 35% !important;
    background-color: #f59e0b;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* 画板侧边栏按钮样式 */
.whiteboard-toggle {
    top: 25% !important;
    background-color: #8b5cf6;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.calculator-toggle:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 记事本页面样式 */
.notepad-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.notepad-overlay.show {
    display: flex;
    justify-content: flex-end;
}

.notepad-content {
    background-color: #fff;
    width: 90%;
    max-width: 600px;
    height: 100%;
    overflow-y: auto;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notepad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.notepad-header h2 {
    font-size: 20px;
    color: #1e293b;
    margin: 0;
}

.notepad-actions {
    display: flex;
    gap: 12px;
}

.save-button {
    padding: 8px 16px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.save-button:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
}

.close-button {
    width: 36px;
    height: 36px;
    background-color: transparent;
    color: #6b7280;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.close-button:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.notepad-body {
    padding: 24px;
}

#notepad-text {
    width: 100%;
    min-height: calc(100vh - 160px);
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

#notepad-text:focus {
    border-color: #6366f1;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 保存通知样式 */
.save-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.save-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .notepad-toggle {
        width: 35px;
        height: 35px;
        right: 8px;
        font-size: 14px;
    }
    
    .hotlist-toggle {
        top: 25% !important;
    }
    
    .calculator-toggle {
        top: 15% !important;
    }
    
    .whiteboard-toggle {
     display: none !important;
    }
    
    .notepad-content {
        width: 100%;
        max-width: none;
    }
    
    .notepad-header {
        padding: 16px 20px;
    }
    
    .notepad-body {
        padding: 20px;
    }
    
    #notepad-text {
        padding: 16px;
        font-size: 14px;
    }
}

/* 保存通知样式 */
.save-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.save-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* 清空缓存按钮样式 */
.reset-cache {
    bottom: 30px;
    left: 30px;
    border: none;
    background-color: #f59e0b;
    color: white;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 1000;
    gap: 6px;
}

.reset-cache:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.reset-cache i {
    font-size: 16px;
}

/* 首次访问弹窗样式 */
.first-visit-popup {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.first-visit-popup.show {
    opacity: 1;
    visibility: visible;
}

.first-visit-content {
    width: 90%;
    max-width: 450px;
    background-color: white;
    border-radius: 0 0 0 10px;
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    animation: slideDown 0.5s ease-out forwards;
    margin-top: 0;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.first-visit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-radius: 0 0 0 0;
}

.first-visit-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.first-visit-body {
    padding: 20px;
    line-height: 1.6;
    color: #555;
}

.first-visit-body p {
    margin: 0;
}

.first-visit-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background-color: #f8f9fa;
    border-radius: 0 0 0 10px;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
    font-size: 24px;
    opacity: 0;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* 热榜窗口样式 */
.hotlist-window {
    position: fixed;
    right: 100px;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    max-height: 80vh;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* 热榜窗口头部样式 */
.hotlist-window-header {
    padding: 16px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hotlist-window-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

/* 热榜关闭按钮样式 */
.hotlist-close-button {
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.hotlist-close-button:hover {
    background-color: #e2e8f0;
}

/* 热榜标签容器样式 */
.hotlist-tabs {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* 热榜标签按钮样式 */
.hotlist-tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background-color: transparent;
    color: #64748b;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.hotlist-tab-button.active,
.hotlist-tab-button:hover {
    border-bottom: 3px solid #f59e0b;
    color: #1e293b;
}

/* 热榜内容区域样式 */
.hotlist-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* 热榜加载指示器样式 */
.hotlist-loading {
    display: none;
    padding: 40px;
    text-align: center;
}

/* 热榜列表样式 */
.hotlist-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 热榜列表项样式 */
.hotlist-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.hotlist-item:hover {
    background-color: #f8fafc;
}

/* 热榜排名样式 */
.hotlist-item-rank {
    width: 24px;
    height: 24px;
    background-color: #f59e0b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

/* 前三名特殊样式 */
.hotlist-item:nth-child(1) .hotlist-item-rank {
    background-color: #ef4444;
}

.hotlist-item:nth-child(2) .hotlist-item-rank {
    background-color: #f97316;
}

.hotlist-item:nth-child(3) .hotlist-item-rank {
    background-color: #f59e0b;
}

/* 热榜内容样式 */
.hotlist-item-content {
    flex: 1;
    min-width: 0;
}

/* 热榜标题样式 */
.hotlist-item-title {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 热榜描述样式 */
.hotlist-item-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 热榜热度样式 */
.hotlist-item-hot {
    font-size: 12px;
    color: #ef4444;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 热榜淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hotlist-window.show {
    display: flex !important;
    animation: fadeIn 0.3s ease-out;
}

/* 热榜响应式设计 */
@media (max-width: 768px) {
    .hotlist-window {
        width: 90% !important;
        right: 5% !important;
        max-height: 90vh !important;
    }
}

/* 热榜按钮悬浮效果 */
.hotlist-toggle:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* 加载动画样式 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f59e0b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .back-to-top {
        width: 48px;
        height: 48px;
        bottom: 70px;
        right: 10px;
        font-size: 20px;
    }
}

