/* 基准与变量 (Variables & Defaults) */
:root {
    /* 默认: 宇宙深渊黑 (Deep cosmic midnight canvas) */
    --bg-primary: #05060A;
    --text-primary: #ffffff;
    --text-secondary: #94A3B8;
    
    /* 星云渐变 (Nebula Mesh Gradients) */
    --accent-indigo: #6366F1;
    --accent-cyan: #06B6D4;
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    /* 磨砂玻璃材质 (Premium Frosted Glass) */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(30px);
    
    /* 其他 */
    --nav-bg: rgba(5, 6, 10, 0.7);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --btn-text: #ffffff;
}

[data-theme="light"] {
    /* 浅色模式适配 */
    --bg-primary: #F4F4F9;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    
    --accent-glow: rgba(99, 102, 241, 0.2);
    
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    --nav-bg: rgba(244, 244, 249, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 0.9);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 锚点平滑过渡动态效果 */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offset for sticky header */
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    position: relative;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* 宇宙星云背景背景 (Ambient Mesh Gradients) */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.blob {
    position: absolute;
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}
.blob.indigo {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
}
.blob.cyan {
    bottom: -20%; right: -10%;
    width: 50vw; height: 50vw;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
    animation-delay: -10s;
}
@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10vw, 5vh) scale(1.1); }
}

/* 通用玻璃拟物卡片样式 (Glassmorphism Core) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: background 0.3s ease, transform 0.1s ease, border-color 0.3s ease;
    padding: 2.5rem;
}

/* 字体排印细节 (Typography) */
.telemetry {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 6px;
    display: inline-block;
}

/* 悬浮岛屿导航栏 (Floating Island Header) */
.floating-header {
    position: sticky;
    top: 1rem;
    max-width: 1200px;
    margin: 1rem auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--nav-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--accent-indigo), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--accent-cyan);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; width: 0; height: 2px;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
}
nav a:hover::after { width: 100%; }

nav .nav-highlight {
    color: var(--accent-indigo);
    font-weight: 700;
}
[data-theme="dark"] nav .nav-highlight {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.network-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    color: #10B981;
}
.status-dot {
    width: 6px; height: 6px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10B981;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0% { opacity: 0.5; box-shadow: 0 0 5px #10B981;} 50% { opacity: 1; box-shadow: 0 0 15px #10B981;} 100% { opacity: 0.5; box-shadow: 0 0 5px #10B981;} }

.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}
.theme-toggle:hover { background: rgba(255,255,255,0.1); }
.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* 主体布局 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
section { padding: 6rem 0; }
h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 主视觉区 (Hero Section) */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding-top: 4rem;
}
.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 10;
}
.glitch-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}
.gradient-text {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}
.cta-group {
    display: flex;
    gap: 1rem;
}

/* 按钮样式与磁性效果容器 (Magnetic CTAs) */
.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.1s; /* JS handles magnetic effect */
}
.primary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}
.primary-btn::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
    z-index: -1;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.primary-btn:hover::before { opacity: 1; }
.btn-border-glow {
    position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 12px;
    z-index: -2;
    background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan), var(--accent-indigo));
    background-size: 200% 100%;
    animation: gradient-shift 3s linear infinite;
    filter: blur(8px);
    opacity: 0.5;
}
@keyframes gradient-shift { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.outline-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}
.outline-btn:hover { background: var(--card-hover-bg); }

/* 3D 节点星团互动区 (CSS Node Cluster Simulation) */
.hero-3d-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}
.node-cluster {
    position: relative;
    width: 400px; height: 400px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-out; /* For mouse movement interaction in JS */
}
.orbit {
    position: absolute;
    top: 50%; left: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform-style: preserve-3d;
}
.orbit-1 { width: 350px; height: 350px; margin: -175px 0 0 -175px; animation: spin-1 25s linear infinite; }
.orbit-2 { width: 250px; height: 250px; margin: -125px 0 0 -125px; animation: spin-2 20s linear infinite reverse; }
.orbit-3 { width: 150px; height: 150px; margin: -75px 0 0 -75px; animation: spin-3 15s linear infinite; }
@keyframes spin-1 { 100% { transform: rotateX(60deg) rotateY(20deg) rotateZ(360deg); } }
@keyframes spin-2 { 100% { transform: rotateX(40deg) rotateY(-30deg) rotateZ(360deg); } }
@keyframes spin-3 { 100% { transform: rotateX(70deg) rotateY(40deg) rotateZ(360deg); } }
.node {
    width: 14px; height: 14px;
    background: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    top: -7px; left: 50%;
    margin-left: -7px;
    box-shadow: 0 0 20px var(--accent-cyan);
    /* Reverse rotation to keep node facing viewer */
    animation: counter-spin 20s linear infinite reverse;
}
.center-core {
    position: absolute;
    top: 50%; left: 50%;
    width: 40px; height: 40px;
    margin: -20px 0 0 -20px;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 80%);
    border-radius: 50%;
    box-shadow: 0 0 50px var(--accent-indigo);
    animation: core-pulse 3s infinite alternate ease-in-out;
}
@keyframes core-pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 80px var(--accent-indigo); } }

/* 悬浮倾斜卡片 (Tilt Cards) */
.card-container, .special-cards, .pricing-table {
    display: grid;
    gap: 2rem;
}
.card-container, .pricing-table { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.special-cards { grid-template-columns: 1fr 1fr; margin-top: 2rem; }

.tilt-card {
    /* JS applied transform handles the 3D effect. The transition smooths the return */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.3s, border-color 0.3s;
    transform-style: preserve-3d;
}
.tilt-card:hover {
    border-color: rgba(255,255,255,0.3);
    background: var(--card-hover-bg);
}

.glass-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    transform: translateZ(30px); /* 3D layer effect */
}
.glass-card p {
    color: var(--text-secondary);
    transform: translateZ(20px);
}
.telemetry { transform: translateZ(25px); }

/* 交互式服务矩阵卡片 (Interactive Service Cards) */
.interactive-service-card {
    position: relative;
    overflow: hidden;
    cursor: default;
}
.card-bg-glow {
    position: absolute;
    width: 100%; height: 100%; top: 0; left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}
.streaming-card .card-bg-glow { background: radial-gradient(circle at 50% 50%, rgba(229, 9, 20, 0.15), transparent 60%); }
.ai-card .card-bg-glow { background: radial-gradient(circle at 50% 50%, rgba(16, 163, 127, 0.15), transparent 60%); }
.interactive-service-card:hover .card-bg-glow { opacity: 1; }
.card-content { position: relative; z-index: 1; }

.service-badges {
    display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.service-badges span {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}
.interactive-service-card:hover .service-badges span {
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* 套餐价格表 */
.price-card {
    text-align: center;
    display: flex; flex-direction: column;
}
.price-card .price {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transform: translateZ(40px);
}
.price-card .period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}
.price-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
    transform: translateZ(20px);
}
.price-card li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.8rem;
    color: var(--text-secondary);
}
.price-card li::before {
    content: '';
    position: absolute; left: 0; top: 6px;
    width: 12px; height: 12px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2306B6D4"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
}
.price-card.featured {
    border-color: var(--accent-indigo);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, rgba(255,255,255,0.02) 100%);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
}
.featured-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%) translateZ(30px);
    background: var(--accent-indigo);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Testimonials */
.testimonial-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.testimonial p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.testimonial .author { display: block; text-align: right; color: var(--accent-cyan); font-family: 'JetBrains Mono', monospace; font-size: 0.9rem;}

/* FAQ */
.faq-container { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.faq-item { padding: 1.5rem 2.5rem; }
.faq-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.faq-item p { color: var(--text-secondary); margin: 0; }

/* Subpages Content Style */
.page-content {
    max-width: 800px;
    margin: 6rem auto;
    padding: 3rem;
}
.page-content h1 { text-align: center; margin-bottom: 3rem; font-size: 2.5rem; }
.page-content section { margin-bottom: 2.5rem; }
.page-content h2 { text-align: left; font-size: 1.5rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--glass-border); }
.page-content p { color: var(--text-secondary); margin-bottom: 1rem; font-size: 1.05rem; }
.page-content ul { color: var(--text-secondary); padding-left: 2rem; margin-bottom: 1rem; }
.page-content li { margin-bottom: 0.5rem; }
.page-content a { color: var(--accent-cyan); text-decoration: none; }
.page-content a:hover { text-decoration: underline; }

/* Footer */
footer { padding: 0 2rem 4rem; }
.footer-glass {
    max-width: 1200px; margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
}
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent-cyan); }
footer p { color: var(--text-secondary); font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; }
.footer-url { color: var(--text-secondary); text-decoration: none; }
.footer-url:hover { color: var(--text-primary); }

/* Responsive */
@media (max-width: 900px) {
    .special-cards, .testimonial-container { grid-template-columns: 1fr; }
    .hero { flex-direction: column; text-align: center; margin-top: 2rem; }
    .hero-content { margin-bottom: 4rem; }
    .cta-group { justify-content: center; }
    .hero-3d-visual { display: none; /* Hide complex 3D on small screens for performance */ }
}
@media (max-width: 768px) {
    .floating-header { flex-direction: column; padding: 1rem; gap: 1rem; border-radius: 20px;}
    nav { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .header-controls { justify-content: center; width: 100%; border-top: 1px solid var(--glass-border); padding-top: 1rem;}
    .glitch-title { font-size: 2.5rem; }
    section { padding: 4rem 0; }
    .page-content { margin: 2rem 1rem; padding: 2rem 1.5rem; }
}
