/* ===================================
   现代化办公导航 - 全新设计
   =================================== */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 浅色主题（白天模式） */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

[data-theme="dark"] {
    /* 深色主题（晚上模式） */
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent-color: #22d3ee;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --danger-color: #f87171;

    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: #334155;
    --border-light: #334155;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #f8fafc 100%);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e293b 100%);
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================
   主题切换按钮
   =================================== */
.theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(15deg);
}

.theme-toggle i {
    transition: all 0.3s ease;
    position: absolute;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ===================================
   头部样式
   =================================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: var(--shadow-md);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

/* 新的图标按钮样式 */
.nav-icon-btn {
    width: 42px;
    height: 42px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.nav-icon-btn i {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.nav-icon-btn:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-icon-btn:hover::before {
    opacity: 1;
}

.nav-icon-btn:hover i {
    color: white;
    transform: scale(1.1);
}

.nav-icon-btn:active {
    transform: translateY(0);
}

/* ===================================
   主内容区域
   =================================== */
.main-content {
    padding: 40px 0 80px;
}

/* ===================================
   搜索区域
   =================================== */
.search-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

.search-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(37, 99, 235, 0.1));
    border-radius: 50%;
    filter: blur(50px);
    z-index: 0;
}

.search-content {
    position: relative;
    z-index: 1;
}

.search-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.search-title span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box-wrapper {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 6px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.engine-selector {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: 40px;
    margin-right: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.engine-selector:hover {
    box-shadow: var(--shadow-md);
}

.engine-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    margin-right: 10px;
}

.engine-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.engine-dropdown {
    margin-left: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.engine-select {
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    min-width: 120px;
    font-weight: 500;
}

.engine-select:focus {
    outline: none;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.search-btn:active {
    transform: scale(0.95);
}

/* ===================================
   导航区域
   =================================== */
.navigation-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

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

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.edit-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.control-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-color: transparent;
}

.control-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.control-btn.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border-color: transparent;
}

.control-btn.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    border-color: transparent;
}

/* ===================================
   分类标签
   =================================== */
.category-tabs-wrapper {
    background: var(--bg-hover);
    border-radius: var(--radius-xl);
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    border-color: rgba(37, 99, 235, 0.2);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.category-tab-icon {
    font-size: 0.875rem;
}

.delete-tab {
    opacity: 0.7;
    margin-left: 4px;
    font-size: 0.875rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.delete-tab:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.2);
}

.category-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 4px;
    font-weight: normal;
}

.category-tab.active .category-count {
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   网站网格
   =================================== */
.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.website-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.website-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.website-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.website-item:hover::before {
    opacity: 1;
}

.website-icon-wrapper {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--bg-hover), #e0e7ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.75rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.website-icon-wrapper img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.website-item:hover .website-icon-wrapper {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.website-name {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.website-desc {
    position: relative;
    z-index: 1;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.website-actions {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.website-item:hover .website-actions {
    opacity: 1;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.action-icon-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.action-icon-btn.active {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.action-icon-btn.active:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.action-icon-btn.active i {
    animation: pulse 0.3s ease;
}

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

.delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.edit-mode .delete-btn {
    opacity: 1;
    transform: scale(1);
}

.delete-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* ===================================
   分页控件
   =================================== */
.website-grid > .pagination-container {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0;
    flex-wrap: nowrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-card);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.pagination-btn:active {
    transform: translateY(0);
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

/* ===================================
   收藏/主页按钮
   =================================== */
.website-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.website-item:hover .website-actions {
    opacity: 1;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.action-icon-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.action-icon-btn.active {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.action-icon-btn.home-active {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

/* 收藏/主页管理弹窗 */
.collection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.collection-modal.active {
    display: flex;
}

.collection-modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    animation: modalSlideIn 0.3s ease;
}

.collection-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.collection-modal-header h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.collection-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 180px);
}

.collection-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.collection-tab {
    padding: 10px 20px;
    background: var(--bg-hover);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.collection-tab:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.collection-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.collection-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.collection-item {
    background: var(--bg-hover);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.collection-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.collection-item.is-home {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.05);
}

.collection-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-item-url {
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.collection-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.collection-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.collection-action-btn:hover {
    background: var(--danger-color);
    color: white;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--success-color);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.empty-collection {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-collection-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ===================================
   网站网格
   =================================== */

.empty-category {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-category-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-category-text {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ===================================
   介绍区域
   =================================== */
.intro-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-top: 32px;
    box-shadow: var(--shadow-xl);
}

.intro-header {
    text-align: center;
    margin-bottom: 32px;
}

.intro-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.intro-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.feature-card {
    padding: 32px;
    background: var(--bg-hover);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================
   页脚
   =================================== */
.footer {
    background: var(--bg-card);
    padding: 32px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===================================
   友情链接区域
   =================================== */
.friends-links-section {
    margin-top: 32px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    border: 2px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.friends-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.friends-link-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: var(--bg-hover);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.friends-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.friends-link-card:hover::before {
    left: 100%;
}

.friends-link-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(6, 182, 212, 0.05));
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
    background-image: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.friends-link-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.friends-link-card:hover .friends-link-name {
    color: white;
}

@media (max-width: 768px) {
    .friends-links-section {
        padding: 20px;
        margin-top: 24px;
    }

    .friends-links-grid {
        gap: 8px;
        grid-template-columns: repeat(2, 1fr);
    }

    .friends-link-card {
        padding: 12px 16px;
    }

    .friends-link-name {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .friends-links-grid {
        gap: 8px;
    }

    .friends-link-card {
        padding: 8px 16px;
    }

    .friends-link-name {
        font-size: 0.875rem;
    }
}

/* ===================================
   模态框
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: modalSlideIn 0.3s ease;
}

@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: 28px 32px;
    border-bottom: 1px solid var(--border-light);
}

.modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: var(--bg-hover);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 28px 32px;
    border-top: 1px solid var(--border-light);
}

/* ===================================
   表单样式
   =================================== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===================================
   按钮
   =================================== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   复选框组
   =================================== */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: var(--border-color);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    flex: 1;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.hint-box {
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
}

.hint-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.hint-list {
    list-style: none;
    padding: 0;
}

.hint-list li {
    padding: 6px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hint-list li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

/* ===================================
   响应式设计
   =================================== */
@media (max-width: 1024px) {
    .website-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        height: 60px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .tagline {
        display: none;
    }
    
    .main-content {
        padding: 24px 0 48px;
    }
    
    .search-section {
        padding: 32px 24px;
    }
    
    .search-title {
        font-size: 1.5rem;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: var(--radius-xl);
        padding: 8px;
    }
    
    .engine-selector {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        padding: 12px 16px;
    }
    
    .search-btn {
        width: 100%;
        height: 48px;
        margin-top: 8px;
    }
    
    .navigation-section {
        padding: 24px 16px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .edit-controls {
        width: 100%;
    }
    
    .control-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 16px;
    }
    
    .category-tabs-wrapper {
        padding: 8px;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .website-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .website-item {
        padding: 20px 12px;
    }
    
    .website-icon-wrapper {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .website-name {
        font-size: 0.875rem;
    }
    
    .intro-section {
        padding: 24px;
    }
    
    .intro-title {
        font-size: 1.375rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.125rem;
    }
    
    .nav-item {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
    
    .search-section {
        padding: 24px 16px;
    }
    
    .search-title {
        font-size: 1.25rem;
    }
    
    .website-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .website-item {
        padding: 16px 8px;
    }

    .website-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .website-name {
        font-size: 0.8125rem;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }
}

/* ===================================
   响应式设计优化
   =================================== */

/* 移动端导航栏优化 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .nav-menu {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 8px;
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        padding: 8px 16px;
        font-size: 0.875rem;
        min-width: fit-content;
    }

    .nav-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    /* 搜索框优化 */
    .search-section {
        padding: 20px 0;
    }

    .search-box-wrapper {
        padding: 0 16px;
    }

    .search-container {
        flex-direction: row;
    }

    .engine-select {
        flex-shrink: 0;
        border-radius: 8px 0 0 8px;
        min-width: 80px;
    }

    .search-input {
        border-radius: 0 8px 8px 0;
    }

    .search-btn {
        border-radius: 8px 0 0 8px;
        padding: 12px 20px;
    }

    /* 分类标签优化 */
    .category-tabs-wrapper {
        padding: 0 16px;
        gap: 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .category-tabs-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-tab {
        padding: 10px 16px;
        font-size: 0.875rem;
        min-width: fit-content;
    }

    /* 网站网格优化 */
    .website-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 12px 16px;
    }

    /* 功能卡片优化 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    /* 弹窗优化 */
    .modal {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
    }

    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    /* 超小屏幕网站网格 */
    .website-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .website-item {
        padding: 12px 8px;
    }

    .website-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .website-name {
        font-size: 0.75rem;
    }

    /* 搜索按钮文字隐藏 */
    .search-btn {
        padding: 12px 16px;
    }

    .search-btn i {
        margin-right: 0;
    }

    .search-btn span {
        display: none;
    }

    /* 导航按钮图标只显示 */
    .nav-item {
        padding: 10px 12px;
    }

    .nav-item span:not(.fas) {
        display: none;
    }

    /* 功能卡片单列 */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* 模态框更大 */
    .modal {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0;
    }
}

/* ===================================
   图标显示样式
   =================================== */

.website-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.collection-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

@media (max-width: 480px) {
    .collection-icon-img {
        width: 24px;
        height: 24px;
    }
}

/* ===================================
   收藏/主页列表样式
   =================================== */

.collection-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.collection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.collection-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.collection-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.collection-item-name {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.collection-item-url {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.collection-item-url:hover {
    color: var(--primary-color);
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--success-color);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .collection-item {
        flex-wrap: wrap;
    }

    .collection-item-url {
        width: 100%;
        margin-top: 8px;
    }
}

