/* ============================================
   道法自然 — 全局样式
   自适应多终端：PC / 平板 / 手机 / 小程序 / APP
   ============================================ */

/* === CSS Variables === */
:root {
    --gold: #d4a853;
    --gold-light: #e8d5a3;
    --gold-dim: rgba(212, 168, 83, 0.3);
    --ink: #0f0f1a;
    --ink-card: rgba(15, 15, 26, 0.85);
    --ink-light: #1a1a30;
    --text: #c8c8d4;
    --text-muted: #7a7a8a;
    --text-dim: #555566;
    --radius: 6px;
    --radius-lg: 12px;
    --nav-height: 56px;
    --transition: 0.3s ease;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
    font-family: "Noto Serif SC", "STSong", "Songti SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--ink);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
em { font-style: normal; color: var(--gold-light); font-weight: 600; }

/* === Background === */
.bg-pattern {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; opacity: 0.025; pointer-events: none;
    background-image:
        radial-gradient(circle at 15% 80%, var(--gold) 1px, transparent 1px),
        radial-gradient(circle at 85% 15%, var(--gold) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--gold) 2px, transparent 2px);
    background-size: 100px 100px, 140px 140px, 240px 240px;
    animation: bgDrift 40s linear infinite;
}
@keyframes bgDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}
canvas#bg-canvas {
    position: fixed; top: 0; left: 0; z-index: 0; pointer-events: none;
}

/* === Navigation === */
.top-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    height: var(--nav-height);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.1rem; font-weight: 600; color: var(--gold);
    letter-spacing: 0.15em;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
    padding: 6px 16px; font-size: 0.88rem; color: var(--text-muted);
    border-radius: var(--radius); transition: all var(--transition);
    letter-spacing: 0.05em;
}
.nav-link:hover { color: var(--gold-light); background: rgba(255,255,255,0.03); }
.nav-platform-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-muted); margin-left: 8px;
    transition: all var(--transition);
}
.nav-platform-btn:hover { color: var(--gold); background: rgba(255,255,255,0.05); }
.mobile-menu-btn {
    display: none; flex-direction: column; gap: 5px;
    width: 28px; height: 20px; padding: 0;
}
.mobile-menu-btn span {
    display: block; height: 2px; background: var(--text);
    border-radius: 1px; transition: all var(--transition);
}

/* === Hero Section === */
.hero-section {
    display: flex; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--nav-height));
    padding: 60px 20px; position: relative; z-index: 1;
}
.hero-inner {
    max-width: 680px; text-align: center;
    padding: 60px 50px; position: relative;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
}
.taichi-container {
    width: 80px; height: 80px; margin: 0 auto 36px;
    animation: taichiSpin 20s linear infinite;
}
@keyframes taichiSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.hero-title {
    font-size: 3rem; font-weight: 700; color: var(--gold);
    letter-spacing: 0.3em; margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(212, 168, 83, 0.15);
}
.hero-title span { display: inline-block; animation: charIn 0.6s ease-out both; }
.hero-title span:nth-child(1) { animation-delay: 0.1s; }
.hero-title span:nth-child(2) { animation-delay: 0.2s; }
.hero-title span:nth-child(3) { animation-delay: 0.3s; }
.hero-title span:nth-child(4) { animation-delay: 0.4s; }
@keyframes charIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-subtitle {
    font-size: 0.95rem; color: var(--text-muted); letter-spacing: 0.25em;
}
.hero-domain {
    font-family: "SF Mono", "Consolas", monospace;
    font-size: 0.8rem; color: rgba(212, 168, 83, 0.35);
    letter-spacing: 0.15em; margin-top: 4px;
}
.hero-divider {
    display: flex; align-items: center; gap: 14px;
    justify-content: center; margin: 30px 0; opacity: 0.4;
}
.hero-divider span {
    flex: 0 0 60px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hero-divider i {
    width: 5px; height: 5px; background: var(--gold); border-radius: 50%;
    box-shadow: 0 0 8px var(--gold);
}
.hero-desc { font-size: 0.95rem; color: var(--text); line-height: 2.2; margin-bottom: 32px; }
.platform-badges {
    display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.badge {
    padding: 5px 14px; font-size: 0.75rem; border-radius: 100px;
    letter-spacing: 0.08em; transition: all var(--transition);
}
.badge-pc { background: rgba(100,149,237,0.15); color: #7ba4f0; }
.badge-mobile { background: rgba(76,175,80,0.15); color: #81c784; }
.badge-miniapp { background: rgba(255,152,0,0.15); color: #ffb74d; }
.badge-app { background: rgba(156,39,176,0.15); color: #ce93d8; }

/* === Section Common === */
.platforms-section, .research-section {
    padding: 80px 20px; position: relative; z-index: 1;
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
    font-size: 1.8rem; color: var(--gold); letter-spacing: 0.2em; margin-bottom: 8px;
}
.section-header p { font-size: 0.9rem; color: var(--text-muted); letter-spacing: 0.08em; }
.section-divider {
    display: flex; justify-content: center; margin-top: 20px;
}
.section-divider span {
    width: 40px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 1px;
}

/* === Platform Grid === */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px; max-width: 1100px; margin: 0 auto;
}
.platform-card {
    background: rgba(26, 26, 48, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg); padding: 32px 24px;
    text-align: center; transition: all var(--transition);
    backdrop-filter: blur(8px);
}
.platform-card:hover {
    border-color: rgba(212,168,83,0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.card-icon {
    width: 52px; height: 52px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.04);
    color: var(--text-muted);
}
.card-icon svg { width: 24px; height: 24px; }
.card-icon.wechat svg { color: #07c160; }
.card-icon.alipay svg { color: #1677ff; }
.card-icon.ios svg { color: #a0a0a0; }
.card-icon.android svg { color: #3ddc84; }
.platform-card h3 { font-size: 1.1rem; color: #e0e0e0; margin-bottom: 6px; letter-spacing: 0.05em; }
.platform-card p { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.card-status {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 16px;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot.on { background: #4caf50; box-shadow: 0 0 6px #4caf50; }
.status-dot.off { background: #666; }
.status-dot.pulse {
    background: #ff9800; box-shadow: 0 0 6px #ff9800;
    animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.card-link {
    font-size: 0.82rem; color: var(--gold); opacity: 0.7;
    transition: all var(--transition);
}
.card-link:hover { opacity: 1; }

/* === Research Grid === */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px; max-width: 1100px; margin: 0 auto;
}
.research-card {
    background: rgba(26, 26, 48, 0.5);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-lg); padding: 36px 28px;
    text-align: center; transition: all var(--transition);
}
.research-card:hover {
    border-color: rgba(212,168,83,0.15);
    background: rgba(26, 26, 48, 0.7);
}
.research-icon { font-size: 2.5rem; margin-bottom: 16px; opacity: 0.5; }
.research-card h3 { font-size: 1.05rem; color: var(--gold-light); margin-bottom: 10px; letter-spacing: 0.05em; }
.research-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; }

/* === Site Footer === */
.site-footer {
    position: relative; z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 48px 20px;
}
.footer-inner { max-width: 700px; margin: 0 auto; text-align: center; }
.footer-brand {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 1.1rem; font-weight: 600; color: var(--gold);
    letter-spacing: 0.15em; margin-bottom: 8px;
}
.footer-logo { font-size: 1.4rem; }
.footer-desc { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 24px; }
.footer-links {
    display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px;
}
.footer-links a {
    font-size: 0.82rem; color: var(--text-muted);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-light); }
.footer-copy { font-size: 0.75rem; color: var(--text-dim); }

/* === Platform Panel === */
.platform-panel {
    position: fixed; z-index: 200; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: flex-end; justify-content: center;
    pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
}
.platform-panel.open { opacity: 1; pointer-events: auto; }
.panel-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
}
.panel-body {
    position: relative; z-index: 1;
    background: var(--ink-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 28px 20px 40px; width: 100%; max-width: 480px;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.platform-panel.open .panel-body { transform: translateY(0); }
.panel-body h3 {
    text-align: center; font-size: 1rem; color: var(--text);
    letter-spacing: 0.1em; margin-bottom: 20px;
}
.panel-list { display: flex; flex-direction: column; gap: 4px; }
.panel-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-radius: var(--radius);
    transition: all var(--transition);
}
.panel-item:hover { background: rgba(255,255,255,0.03); }
.panel-item.active { background: rgba(212,168,83,0.08); }
.panel-icon { font-size: 1.2rem; width: 28px; text-align: center; }
.panel-name { flex: 1; font-size: 0.92rem; color: var(--text); }
.panel-badge {
    font-size: 0.72rem; padding: 2px 10px; border-radius: 100px;
    background: rgba(76,175,80,0.15); color: #81c784;
}
.panel-tip {
    font-size: 0.72rem; padding: 2px 10px; border-radius: 100px;
    background: rgba(255,152,0,0.1); color: var(--text-dim);
}

/* ============================================
   子页面通用样式
   ============================================ */
.page-container {
    max-width: 800px; margin: 0 auto;
    padding: 60px 24px; position: relative; z-index: 1;
}
.page-card {
    background: rgba(26, 26, 48, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-lg); padding: 48px 40px;
    backdrop-filter: blur(10px);
}
.page-card h2 {
    font-size: 1.6rem; color: var(--gold); letter-spacing: 0.15em;
    text-align: center; margin-bottom: 12px;
}
.page-card .subtitle {
    text-align: center; color: var(--text-muted); font-size: 0.9rem;
    margin-bottom: 30px;
}
.page-card p { font-size: 0.92rem; color: var(--text); line-height: 2; margin-bottom: 16px; }
.page-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 30px; font-size: 0.85rem; color: var(--text-muted);
    transition: color var(--transition);
}
.page-back:hover { color: var(--gold-light); }

/* 小程序 / APP 二维码区域 */
.qr-section {
    text-align: center; margin: 32px 0;
}
.qr-placeholder {
    display: inline-block; width: 180px; height: 180px;
    border: 1px dashed rgba(212,168,83,0.2);
    border-radius: var(--radius-lg);
    display: inline-flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 8px;
    color: var(--text-dim); font-size: 0.82rem;
}
.qr-placeholder svg { width: 48px; height: 48px; opacity: 0.3; }

/* 信息列表 */
.info-list { margin: 24px 0; }
.info-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
}
.info-label { flex-shrink: 0; font-size: 0.82rem; color: var(--gold-light); min-width: 80px; }
.info-value { font-size: 0.9rem; color: var(--text); }

/* 特性标签列表 */
.feature-tags {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px;
}
.feature-tags span {
    padding: 5px 14px; font-size: 0.78rem; border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted);
}

/* === 响应式 === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: var(--nav-height); left: 0;
        width: 100%; background: var(--ink-card);
        backdrop-filter: blur(16px); padding: 12px 20px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }
    .nav-links.open .nav-link { padding: 10px 0; }
    .hero-inner { padding: 40px 24px; }
    .hero-title { font-size: 2.2rem; letter-spacing: 0.2em; }
    .platform-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .platform-card { padding: 24px 16px; }
    .page-card { padding: 32px 24px; }
}
@media (max-width: 400px) {
    .platform-grid { grid-template-columns: 1fr; }
}
