/* ==================== CSS变量 - 主题颜色 ==================== */
:root {
    /* 主色调 - 紫色系（模仿ai-bot.cn） */
    --primary: #7c3aed;
    --primary-color: #7c3aed;  /* 别名,兼容tool-detail.html */
    --primary-light: #a78bfa;
    --primary-dark: #6d28d9;
    --primary-hover: #6d28d9;  /* 别名,兼容tool-detail.html */

    /* 辅助色 */
    --blue: #60a5fa;
    --green: #34d399;
    --yellow: #fbbf24;
    --purple: #a78bfa;
    --pink: #f472b6;

    /* 背景色 - 浅色模式 */
    --bg-primary: #f5f6f8;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;  /* 别名,兼容tool-detail.html */
    --bg-tertiary: #f0f1f3;
    --bg-hover: #e8eaed;

    /* 文字颜色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    /* 边框和阴影 */
    --border-color: #ebedef;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.1);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 侧边栏宽度 */
    --sidebar-width: 240px;

    /* 过渡 */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色模式 */
[data-theme="dark"] {
    --primary: #a78bfa;
    --primary-color: #a78bfa;  /* 别名,兼容tool-detail.html */
    --primary-light: #c4b5fd;
    --primary-dark: #8b5cf6;
    --primary-hover: #8b5cf6;  /* 别名,兼容tool-detail.html */

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --card-bg: #1e293b;  /* 别名,兼容tool-detail.html */
    --bg-tertiary: #334155;
    --bg-hover: #475569;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #F5F7FF 0%, #F8F5FF 50%, #F5F7FF 100%);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 900;
    color: var(--text-primary);
}

.logo svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.15));
}

.sidebar-toggle {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    transition: all var(--transition);
    position: relative;
}

.nav-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    opacity: 0.8;
}

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

.nav-item:hover i {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(167, 139, 250, 0.08) 100%);
    color: var(--primary);
    font-weight: 500;
}

.nav-item.active i {
    opacity: 1;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.theme-toggle-sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
}

.theme-toggle-sidebar:hover {
    background: var(--primary);
    color: white;
}

.theme-toggle-sidebar i {
    font-size: 18px;
}

/* ==================== 主内容区 ==================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== 顶部工具栏 ==================== */
.top-bar {
    height: 60px;
    background: transparent;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* 顶部导航菜单 */
.top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    margin: 0 24px;
}

.top-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    transition: all var(--transition);
    white-space: nowrap;
}

.top-nav .nav-link i {
    font-size: 16px;
}

.top-nav .nav-link:hover {
    color: var(--primary);
}

.top-nav .nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: rotate(180deg);
}

/* ==================== Hero 搜索区 ==================== */
.hero-search {
    background: transparent;
    padding: 16px 32px 24px;
    text-align: center;
}

.hero-brand {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.brand-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-icon svg {
    filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.2));
}

.brand-name {
    font-size: 48px;
    font-weight: 900;
    margin: 0;
    color: #2c3e50;
    letter-spacing: 4px;
    line-height: 1.2;
    font-family: "SimHei", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "STHeiti", sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-slogan {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 2px;
    font-weight: 400;
    text-transform: uppercase;
    opacity: 0.5;
    margin-bottom: 20px;
}

.search-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
}

.search-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition);
    font-weight: 400;
}

.search-tab:hover {
    background: var(--bg-tertiary);
}

.search-tab.active {
    background: #1f2937;
    color: white;
    font-weight: 500;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-box-large {
    position: relative;
    display: flex;
    align-items: center;
    background: #f0f1f3;
    border-radius: var(--radius-xl);
    padding: 4px 4px 4px 20px;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    transition: all var(--transition);
}

.search-box-large:focus-within {
    border-color: var(--primary);
    background: #ffffff;
}

.search-icon {
    color: var(--text-tertiary);
    margin-right: 12px;
}

.search-box-large input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    padding: 14px 0;
    font-weight: 400;
}

.search-box-large input::placeholder {
    color: var(--text-tertiary);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 12px 32px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    transition: all var(--transition);
}

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

.search-engines {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.engine-link {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 14px;
    transition: all var(--transition);
    font-weight: 400;
}

.engine-link:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.engine-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* ==================== 快捷入口卡片 ==================== */
.quick-access {
    padding: 24px 32px;
}

.quick-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.quick-card {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.quick-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.card-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.card-purple {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.card-yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

[data-theme="dark"] .card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
}

[data-theme="dark"] .card-green {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2) 0%, rgba(110, 231, 183, 0.2) 100%);
}

[data-theme="dark"] .card-purple {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(196, 181, 253, 0.2) 100%);
}

[data-theme="dark"] .card-yellow {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(252, 211, 77, 0.2) 100%);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.card-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.card-content p {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-illustration {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
}

.illustration-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
}

/* ==================== 工具列表区 ==================== */
.tools-section {
    flex: 1;
    padding: 32px 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

.section-title {
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.section-title i {
    color: var(--primary);
}

.view-options {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

.view-mode {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.view-btn:hover {
    background: var(--bg-hover);
}

.view-btn.active {
    background: var(--bg-secondary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ==================== 工具卡片 ==================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.tool-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tool-icon i {
    font-size: 28px;
    color: var(--primary);
}

.tool-info {
    flex: 1;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.tool-category {
    font-size: 12px;
    color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
}

.tool-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
}

.tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.tool-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 11px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    border-radius: 6px;
}

.tool-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

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

.action-btn.favorited {
    background: #ef4444;
    color: white;
}

.featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 加载和空状态 ==================== */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 32px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.footer-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 4px 0;
}

.footer-info .beian-info {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-info .beian-info a {
    color: var(--text-tertiary);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-info .beian-info a:hover {
    color: var(--primary);
}

.footer-info .beian-info img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 2px;
}

.footer-info .beian-separator {
    color: var(--text-tertiary);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* ==================== 返回顶部 ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ==================== 模态框 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all var(--transition);
}

.modal-close:hover {
    background: #ef4444;
    color: white;
}

.modal-body {
    padding: 40px;
}

/* 模态框头部 */
.modal-header-section {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.modal-tool-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.modal-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-tool-info {
    flex: 1;
}

.modal-tool-info h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 800;
}

.modal-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.modal-category {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.modal-likes {
    color: var(--text-tertiary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 15px;
}

/* 操作按钮 */
.modal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-secondary.favorited {
    background: #ef4444;
    color: white;
}

.btn-secondary.liked {
    background: #3b82f6;
    color: white;
}

.btn-secondary.liked:hover {
    background: #2563eb;
}

.btn-large {
    flex: 1;
    justify-content: center;
}

/* 广告位 */
.modal-ad-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
    border: 2px dashed #f59e0b;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer !important;
    user-select: none;
}

.modal-ad-section * {
    cursor: pointer !important;
}

.modal-ad-section:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .modal-ad-section {
    background: linear-gradient(135deg, #422006 0%, #78350f 100%);
    border-color: #f59e0b;
}

[data-theme="dark"] .modal-ad-section:hover {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.ad-label {
    display: inline-block;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ad-content {
    color: #78350f;
}

[data-theme="dark"] .ad-content {
    color: #fde68a;
}

.ad-content p {
    margin: 4px 0;
}

.ad-content strong {
    transition: color 0.2s ease;
}

.modal-ad-section:hover .ad-content strong {
    color: #92400e;
}

[data-theme="dark"] .modal-ad-section:hover .ad-content strong {
    color: #fef3c7;
}

/* 详细信息 */
.modal-details {
    margin-bottom: 24px;
}

.modal-details h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-details h3 i {
    color: var(--primary);
}

.modal-detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-detail-content ul {
    padding-left: 24px;
    margin: 12px 0;
}

.modal-detail-content li {
    margin: 8px 0;
}

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

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

/* 标签 */
.modal-tags {
    margin-bottom: 24px;
}

.modal-tags h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-tags h3 i {
    color: var(--primary);
}

.tags-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 相关推荐 */
.modal-related {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.modal-related h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-related h3 i {
    color: var(--primary);
}

.related-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-tool-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.related-tool-item:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.related-tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.related-tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-tool-icon i {
    font-size: 24px;
    color: var(--primary);
}

.related-tool-info {
    flex: 1;
    min-width: 0;
}

.related-tool-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.related-tool-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .top-bar {
        padding: 0 16px;
    }

    /* 移动端隐藏导航菜单，只显示第一个 */
    .top-nav {
        display: none;
    }

    .hero-search {
        padding: 24px 16px 32px;
    }

    .brand-name {
        font-size: 28px;
    }

    .brand-icon {
        width: 60px;
        height: 60px;
    }

    .brand-icon svg {
        width: 60px;
        height: 60px;
    }

    .quick-cards {
        grid-template-columns: 1fr;
    }

    .tools-section {
        padding: 20px 16px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .search-box-large {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
    }

    .search-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 24px;
    }

    .brand-icon {
        width: 56px;
        height: 56px;
    }

    .brand-icon svg {
        width: 56px;
        height: 56px;
    }

    .search-tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .quick-card {
        padding: 16px;
    }

    .section-title {
        font-size: 18px;
    }
}


/* ==================== 关于页面样式 ==================== */
.about-section {
    padding: 40px 32px;
    max-width: 900px;
    margin: 0 auto;
}

.about-container {
    width: 100%;
}

.about-header {
    text-align: center;
    margin-bottom: 48px;
}

.about-icon {
    margin-bottom: 24px;
}

.about-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.about-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.about-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-card h2 i {
    color: var(--primary);
    font-size: 24px;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-card ul {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 24px;
    margin: 12px 0;
}

.about-card li {
    margin: 8px 0;
}

.about-card a {
    color: var(--primary);
    text-decoration: none;
}

.about-card a:hover {
    text-decoration: underline;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.contact-info {
    margin-top: 16px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.contact-info i {
    color: var(--primary);
    width: 20px;
}

@media (max-width: 768px) {
    .about-section {
        padding: 24px 16px;
    }

    .about-header h1 {
        font-size: 28px;
    }

    .about-card {
        padding: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==================== 内容区块通用样式 ==================== */
.content-section {
    padding: 40px 32px;
}

/* ==================== AI应用集样式 ==================== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.app-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-card-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.app-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.app-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.app-platforms {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.platform-tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.app-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b;
}

.app-downloads {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ==================== AI资讯样式 ==================== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
    display: flex;
    gap: 20px;
}

.news-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.news-image {
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    padding: 20px 20px 20px 0;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.news-category {
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.news-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ==================== AI项目样式 ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.project-stars {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f59e0b;
    font-size: 14px;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-tertiary);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.project-language {
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

/* ==================== AI教程资源样式 ==================== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.resource-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.resource-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.resource-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.resource-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.resource-tag {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .content-section {
        padding: 24px 16px;
    }

    .apps-grid,
    .projects-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        height: 180px;
    }

    .news-content {
        padding: 16px;
    }
}

/* 资讯图标样式 */
.news-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
