/* ===== AI工具导航 v5.0 - 高级简约设计系统 ===== */

/* 配色方案 - 高级简约 */
:root {
    /* 主色调 */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    
    /* 背景色阶 */
    --bg-primary: #0a0f1c;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --bg-card: rgba(31, 41, 55, 0.6);
    --bg-hover: rgba(55, 65, 81, 0.5);
    
    /* 文字色阶 */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --text-muted: #6b7280;
    
    /* 分类配色 */
    --cat-chat: #8b5cf6;      /* 聊天助手 - 紫色 */
    --cat-writing: #10b981;   /* 写作工具 - 翠绿 */
    --cat-image: #f59e0b;     /* 绘画工具 - 琥珀 */
    --cat-video: #ef4444;     /* 视频工具 - 红色 */
    --cat-audio: #06b6d4;     /* 音频工具 - 青色 */
    --cat-code: #3b82f6;      /* 编程工具 - 蓝色 */
    --cat-search: #f97316;    /* 搜索引擎 - 橙色 */
    --cat-agent: #ec4899;     /* 智能体 - 粉色 */
    --cat-design: #14b8a6;    /* 设计工具 -  teal */
    --cat-office: #64748b;    /* 办公效率 - 灰蓝 */
    --cat-learn: #84cc16;     /* 学习教育 - 柠檬 */
    --cat-detect: #f43f5e;    /* 内容检测 - 玫瑰 */
    
    /* 边框和阴影 */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* 间距 */
    --space-xs: 4px;
    --space-sm: 8px;
    --space: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

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

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow-glow);
}

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

.logo-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 14px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition-fast);
    position: relative;
}

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

.nav-item.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav-item-icon {
    font-size: 16px;
}

/* 导航右侧 */
.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.nav-search {
    position: relative;
    width: 280px;
}

.nav-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-fast);
}

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

.nav-search input:focus {
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.nav-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* 分类快捷筛选 */
.category-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 var(--space-xl);
    gap: var(--space-sm);
    overflow-x: auto;
    scrollbar-width: none;
}

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

.cat-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cat-filter:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.cat-filter.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.cat-filter-icon {
    font-size: 14px;
}

/* ===== 主内容区 ===== */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 140px var(--space-xl) var(--space-2xl);
}

/* Hero区域 */
.hero-section {
    text-align: center;
    margin-bottom: var(--space-2xl);
    padding: var(--space-xl) 0;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: var(--space);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-tertiary);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== 分类区域 ===== */
.section {
    margin-bottom: var(--space-2xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space);
}

.section-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
}

.section-count {
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: var(--radius-lg);
}

.section-more {
    font-size: 14px;
    color: var(--text-tertiary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.section-more:hover {
    color: var(--primary-light);
}

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

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

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-color, var(--primary)), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.tool-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tool-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-tertiary);
}

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

.tool-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-category {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-category-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--card-color, var(--primary));
}

.tool-desc {
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-heat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.heat-bar {
    width: 50px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    overflow: hidden;
}

.heat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
}

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

.tool-tag {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-tertiary);
    border-radius: 4px;
}

/* ===== 工具详情浮窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: var(--space);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space);
    right: var(--space);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-tertiary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

.modal-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg-tertiary);
}

.modal-title-wrapper {
    flex: 1;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: calc(90vh - 180px);
}

.modal-section {
    margin-bottom: var(--space-lg);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

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

/* 优缺点 */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
}

.pros-list, .cons-list {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-radius: var(--radius);
    padding: var(--space);
}

.cons-list {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.1);
}

.pros-title, .cons-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pros-title {
    color: #10b981;
}

.cons-title {
    color: #ef4444;
}

.pros-list ul, .cons-list ul {
    list-style: none;
}

.pros-list li, .cons-list li {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 6px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pros-list li::before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    flex-shrink: 0;
}

.cons-list li::before {
    content: '✗';
    color: #ef4444;
    font-weight: bold;
    flex-shrink: 0;
}

/* 功能特性 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius);
}

.feature-icon {
    font-size: 16px;
}

.feature-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 价格方案 */
.pricing-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 14px;
}

.pricing-type {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.pricing-paid {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.pricing-freemium {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

/* 操作按钮 */
.modal-footer {
    display: flex;
    gap: var(--space);
    padding: var(--space-lg);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    min-width: 120px;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    padding: 10px 16px;
}

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

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 var(--space);
    }
    
    .nav-menu {
        display: none;
    }
    
    .nav-search {
        width: 160px;
    }
    
    .category-nav {
        padding: 0 var(--space);
    }
    
    .main-container {
        padding: 130px var(--space) var(--space-xl);
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-stats {
        gap: var(--space-lg);
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: calc(95vh - 180px);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}
