/* 404页面专用样式 */

/* 字体导入和基础设置 */
:root {
    /* 浅色主题色彩系统 */
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --ai-orange: #FF6A00;
    --aqi-purple: #8A2BE2;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: rgba(0, 0, 0, 0.02);
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glow-orange: rgba(255, 106, 0, 0.15);
    --glow-purple: rgba(138, 43, 226, 0.15);
    --glow-blue: rgba(59, 130, 246, 0.15);
    --error-red: #ef4444;
    --error-red-light: rgba(239, 68, 68, 0.1);
    
    /* 间距系统 - 8px基准倍数 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 40px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    
    /* 动效曲线 */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* 字体 */
    --font-title: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, #f1f5f9 100%);
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* 粒子背景 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 106, 0, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
}

.particles-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(59, 130, 246, 0.2), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(6, 182, 212, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 106, 0, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(138, 43, 226, 0.2), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
}

/* 鼠标跟随光效 */
.mouse-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.nav-logo h2 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--text-dark);
    font-size: 24px;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

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

.nav-primary .nav-link {
    font-weight: 700;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background-color: var(--text-dark);
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* 404主内容样式 */
.error-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0 var(--spacing-3xl);
    position: relative;
    z-index: 10;
}

.error-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* 404动画区域 */
.error-animation {
    position: relative;
    margin-bottom: var(--spacing-3xl);
}

.error-number {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.digit {
    font-size: 120px;
    font-weight: 900;
    color: var(--accent-blue);
    text-shadow: 0 0 30px var(--glow-blue);
    animation: pulse 2s ease-in-out infinite;
    font-family: var(--font-title);
}

.digit.zero {
    color: var(--error-red);
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

/* 浮动元素 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0.6;
}

.dot-1 {
    background: var(--ai-orange);
    top: 20%;
    left: 10%;
    animation: float 3s ease-in-out infinite;
}

.dot-2 {
    background: var(--aqi-purple);
    top: 30%;
    right: 15%;
    animation: float 3s ease-in-out infinite 0.5s;
}

.dot-3 {
    background: var(--accent-cyan);
    bottom: 40%;
    left: 20%;
    animation: float 3s ease-in-out infinite 1s;
}

.dot-4 {
    background: var(--accent-blue);
    bottom: 20%;
    right: 25%;
    animation: float 3s ease-in-out infinite 1.5s;
}

.dot-5 {
    background: var(--error-red);
    top: 50%;
    left: 50%;
    animation: float 3s ease-in-out infinite 2s;
}

/* 错误信息样式 */
.error-info {
    margin-bottom: var(--spacing-3xl);
}

.error-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-title);
}

.error-description {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

/* 快速导航样式 */
.quick-nav {
    margin-bottom: var(--spacing-3xl);
}

.quick-nav-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    font-family: var(--font-title);
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.nav-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

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

.nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.home-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px var(--glow-blue);
}

.services-card:hover {
    border-color: var(--ai-orange);
    box-shadow: 0 20px 40px var(--glow-orange);
}

.cases-card:hover {
    border-color: var(--aqi-purple);
    box-shadow: 0 20px 40px var(--glow-purple);
}

.tech-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 20px 40px rgba(6, 182, 212, 0.15);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.home-card .card-icon {
    background: var(--glow-blue);
    color: var(--accent-blue);
}

.services-card .card-icon {
    background: var(--glow-orange);
    color: var(--ai-orange);
}

.cases-card .card-icon {
    background: var(--glow-purple);
    color: var(--aqi-purple);
}

.tech-card .card-icon {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

.card-icon svg {
    width: 24px;
    height: 24px;
}

.card-content {
    flex: 1;
    text-align: left;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-family: var(--font-title);
}

.card-content p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* 搜索建议样式 */
.search-suggestion {
    text-align: center;
}

.suggestion-text {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.suggestion-actions {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.suggestion-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
    font-size: 14px;
}

.suggestion-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.suggestion-btn.primary {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.suggestion-btn.primary:hover {
    background: #2563eb;
    box-shadow: 0 8px 24px var(--glow-blue);
}

.suggestion-btn svg {
    width: 16px;
    height: 16px;
}

/* 页脚样式 */
.error-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: var(--spacing-xl) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-logo-img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.footer-brand {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 18px;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
}

/* 动画定义 */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(120deg);
    }
    66% {
        transform: translateY(5px) rotate(240deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .error-main {
        padding: 100px 0 var(--spacing-xl);
    }
    
    .digit {
        font-size: 80px;
    }
    
    .error-title {
        font-size: 32px;
    }
    
    .error-description {
        font-size: 16px;
    }
    
    .quick-nav-title {
        font-size: 20px;
    }
    
    .nav-cards {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .nav-card {
        padding: var(--spacing-sm);
    }
    
    .card-content h3 {
        font-size: 16px;
    }
    
    .card-content p {
        font-size: 13px;
    }
    
    .suggestion-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .digit {
        font-size: 60px;
    }
    
    .error-number {
        gap: var(--spacing-xs);
    }
    
    .error-title {
        font-size: 28px;
    }
    
    .nav-card {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
    
    .card-content {
        text-align: center;
    }
}

/* 高对比度和可访问性 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-dot {
        animation: none;
    }
    
    .digit {
        animation: none;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #0f172a;
        --secondary-bg: #1e293b;
        --text-dark: #f1f5f9;
        --text-light: #cbd5e1;
        --text-muted: #64748b;
        --glass-bg: rgba(15, 23, 42, 0.8);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
    
    body {
        background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, #334155 100%);
    }
    
    .particles-container {
        background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255, 106, 0, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 40% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%);
    }
}