/* ========================================
   知辰在线工具网 - 主样式文件
   太空舱仪表盘风格 - 深空蓝主题
   ======================================== */

:root {
    /* 主色调 */
    --primary: #0F1C3F;
    --primary-light: #1a2d5a;
    --secondary: #E4E7EB;
    --accent: #00C6FF;
    --accent-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    
    /* 功能色 */
    --success: #00D9A3;
    --warning: #FFB800;
    --error: #FF3B6D;
    --info: #00C6FF;
    
    /* 灰度 */
    --gray-100: #F7F8FA;
    --gray-200: #E4E7EB;
    --gray-300: #CBD2D9;
    --gray-400: #9AA5B1;
    --gray-500: #7B8794;
    --gray-600: #616E7C;
    --gray-700: #52606D;
    --gray-800: #3E4C59;
    --gray-900: #323F4B;
    
    /* 深空色 */
    --space-black: #000000;
    --space-dark: #0A0E1A;
    --space-blue: #0F1C3F;
    --space-purple: #1a0a3e;
    
    /* 光效 */
    --glow-blue: 0 0 20px rgba(0, 198, 255, 0.5);
    --glow-accent: 0 0 30px rgba(0, 198, 255, 0.6);
    --glow-strong: 0 0 40px rgba(0, 198, 255, 0.8);
    
    /* 尺寸 */
    --nav-width: 280px;
    --rank-width: 240px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    
    /* 动画 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   全局重置
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 
                 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--space-dark);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   粒子背景画布
   ======================================== */
#particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========================================
   顶部导航栏
   ======================================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(15, 28, 63, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 198, 255, 0.2);
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.nav-container {
    max-width: 1920px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 32px;
    animation: rotate-glow 4s linear infinite;
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 198, 255, 0.3);
    background: rgba(0, 198, 255, 0.1);
    color: var(--accent);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: rgba(0, 198, 255, 0.2);
    box-shadow: var(--glow-blue);
    transform: rotate(180deg);
}

/* ========================================
   首屏英雄区
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 60px) 40px 60px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(0, 198, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
}

.hero-title {
    font-size: 72px;
    font-weight: 900;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: title-glow 3s ease-in-out infinite;
}

.hero-slogan {
    font-size: 24px;
    color: var(--gray-300);
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 2px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

/* ========================================
   搜索框
   ======================================== */
.search-container {
    margin-bottom: 30px;
    position: relative;
}

.search-box {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    background: rgba(15, 28, 63, 0.6);
    border: 2px solid rgba(0, 198, 255, 0.3);
    border-radius: 50px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

#search-input {
    flex: 1;
    padding: 18px 30px;
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 16px;
    outline: none;
}

#search-input::placeholder {
    color: var(--gray-400);
}

.search-btn {
    padding: 18px 40px;
    background: var(--accent-gradient);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    box-shadow: var(--glow-accent);
    transform: scale(1.05);
}

.search-icon {
    font-size: 20px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(15, 28, 63, 0.98);
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: var(--border-radius);
    margin-top: 10px;
    padding: 10px;
    display: none;
    backdrop-filter: blur(20px);
    z-index: 100;
}

.search-suggestions.show {
    display: block;
}

/* ========================================
   快速分类标签
   ======================================== */
.quick-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-label {
    color: var(--gray-400);
    font-size: 14px;
}

.quick-tag {
    padding: 8px 20px;
    background: rgba(0, 198, 255, 0.1);
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: 20px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.quick-tag:hover {
    background: rgba(0, 198, 255, 0.2);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

/* ========================================
   3D地球仪容器
   ======================================== */
.globe-container {
    position: absolute;
    bottom: 50px;
    right: 10%;
    width: 300px;
    height: 300px;
    z-index: 5;
    opacity: 0.6;
}

/* ========================================
   主仪表盘区域
   ======================================== */
.dashboard {
    position: relative;
    z-index: 10;
    max-width: 1920px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: var(--nav-width) 1fr var(--rank-width);
    gap: 30px;
    min-height: 100vh;
}

/* ========================================
   左侧导航树
   ======================================== */
.nav-tree {
    background: rgba(15, 28, 63, 0.6);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    transition: all var(--transition-normal);
}

.nav-tree-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 198, 255, 0.2);
}

.nav-tree-header h3 {
    font-size: 18px;
    color: var(--accent);
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 18px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.collapse-btn:hover {
    transform: scale(1.2);
}

/* ========================================
   中央工具矩阵
   ======================================== */
.tool-matrix {
    background: rgba(15, 28, 63, 0.4);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    backdrop-filter: blur(20px);
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 198, 255, 0.2);
}

.section-title {
    font-size: 28px;
    color: var(--accent);
    font-weight: 700;
}

.matrix-filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(0, 198, 255, 0.1);
    border: 1px solid rgba(0, 198, 255, 0.3);
    border-radius: 20px;
    color: var(--gray-300);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(0, 198, 255, 0.3);
    color: var(--accent);
    box-shadow: var(--glow-blue);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.load-more-container {
    text-align: center;
}

.load-more-btn {
    padding: 15px 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 30px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.load-more-btn:hover {
    box-shadow: var(--glow-accent);
    transform: translateY(-2px);
}

/* ========================================
   右侧热榜
   ======================================== */
.hot-rank {
    background: rgba(15, 28, 63, 0.6);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.rank-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 198, 255, 0.2);
}

.rank-header h3 {
    font-size: 18px;
    color: var(--accent);
}

/* ========================================
   特色功能区
   ======================================== */
.features-section {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 80px auto;
    padding: 60px 40px;
    text-align: center;
}

.features-section .section-title {
    font-size: 36px;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(15, 28, 63, 0.6);
    border: 1px solid rgba(0, 198, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 40px 30px;
    backdrop-filter: blur(20px);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: var(--glow-blue);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 1.8;
}

/* ========================================
   底部
   ======================================== */
.footer {
    position: relative;
    z-index: 10;
    background: rgba(15, 28, 63, 0.95);
    border-top: 2px solid rgba(0, 198, 255, 0.3);
    padding: 60px 40px 40px;
    margin-top: 80px;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h4 {
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gradient);
}

.footer-section p,
.footer-section a {
    color: var(--gray-300);
    font-size: 14px;
    line-height: 2;
    text-decoration: none;
    display: block;
    transition: all var(--transition-fast);
}

.footer-section a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 198, 255, 0.2);
}

.copyright-info {
    max-width: 1200px;
    margin: 0 auto;
}

.copyright-info p {
    color: var(--gray-300);
    line-height: 1.8;
}

.copyright-info strong {
    color: #fff;
    font-weight: 600;
}

/* ========================================
   返回顶部按钮
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    box-shadow: var(--glow-accent);
    transform: translateY(-5px);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1400px) {
    .dashboard {
        grid-template-columns: 250px 1fr 220px;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .nav-tree,
    .hot-rank {
        display: none;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-slogan {
        font-size: 18px;
    }
    
    .search-box,
    .search-suggestions {
        max-width: 100%;
        width: 100%;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
}
