/* ============================================================
   星环集团网站 — 样式表
   Ring Corporation — Three-Body Fan Site
   掩体纪元3年版 · 表层B2B + 深层研究终端
   ============================================================ */

/* --- 暗色主题（默认） --- */
:root {
  --bg: #030810;
  --surface: rgba(10, 18, 45, 0.6);
  --surface-hover: rgba(15, 25, 55, 0.85);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 229, 255, 0.28);
  --cyan: #00d4ee;
  --cyan-dim: rgba(0, 212, 238, 0.1);
  --cyan-glow: rgba(0, 212, 238, 0.18);
  --blue: #4d8fff;
  --purple: #b98aff;
  --orange: #ff8c38;
  --green: #5ce6a8;
  --white: #e2e8f4;
  --text: #8899bb;
  --text-dim: rgba(136, 153, 187, 0.38);
  --text-faint: rgba(136, 153, 187, 0.15);
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", Monaco, Consolas, "Courier New", monospace;
  --shadow: 0 4px 30px rgba(0,0,0,0.4), 0 0 50px rgba(0,212,238,0.02), inset 0 1px 0 rgba(255,255,255,0.015);
  --shadow-hover: 0 8px 44px rgba(0,0,0,0.55), 0 0 70px rgba(0,212,238,0.05), inset 0 1px 0 rgba(255,255,255,0.03);
  --tr: 0.3s cubic-bezier(0.23,1,0.32,1);
}

[data-theme="light"] {
  --bg: #eceff4;
  --surface: rgba(255,255,255,0.8);
  --surface-hover: rgba(255,255,255,0.96);
  --border: rgba(0,0,0,0.07);
  --border-hover: rgba(0,119,153,0.3);
  --cyan: #007799;
  --cyan-dim: rgba(0,119,153,0.08);
  --cyan-glow: rgba(0,119,153,0.12);
  --blue: #1a5fcc; --purple: #7c4dff; --orange: #e65100; --green: #2e7d32;
  --white: #14142b; --text: #556677; --text-dim: rgba(85,102,119,0.35); --text-faint: rgba(85,102,119,0.12);
  --shadow: 0 4px 20px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.7);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--white); background: var(--bg); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; line-height: 1.6; }

/* --- 背景 --- */
.bg-stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
[data-theme="light"] .bg-stars { display: none; }
.bg-stars::before, .bg-stars::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 8% 15%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 22% 50%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 38% 8%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 55% 65%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 68% 28%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 82% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 12% 78%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 58% 88%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 92% 12%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 32% 35%, rgba(0,212,238,0.45), transparent),
    radial-gradient(1px 1px at 72% 58%, rgba(77,143,255,0.45), transparent);
  background-size: 220px 220px;
  animation: twinkle 4s ease-in-out infinite alternate;
}
.bg-stars::after { background-size: 320px 320px; animation: twinkle 7s ease-in-out 1s infinite alternate; opacity: 0.55; }
@keyframes twinkle { 0% { opacity: 0.5; } 100% { opacity: 1; } }

.nebula { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.nebula-1 { width: 550px; height: 550px; background: radial-gradient(circle, rgba(0,212,238,0.05), transparent 70%); top: -180px; left: -100px; animation: drift1 14s ease-in-out infinite; }
.nebula-2 { width: 450px; height: 450px; background: radial-gradient(circle, rgba(185,138,255,0.04), transparent 70%); bottom: -120px; right: -80px; animation: drift2 18s ease-in-out infinite; }
.nebula-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(77,143,255,0.03), transparent 70%); top: 40%; left: 55%; animation: drift3 16s ease-in-out infinite; }
[data-theme="light"] .nebula { display: none; }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(45px,18px) scale(1.04); } 66% { transform: translate(-18px,-8px) scale(0.96); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-25px,-25px) scale(1.06); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(25px,-15px); } }

.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 999; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.01) 2px, rgba(0,0,0,0.01) 4px); }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 998; opacity: 0.018; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* --- 导航 --- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--surface); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; gap: 10px; }
.logo { display: flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; position: relative; flex-shrink: 0; }
.logo svg { width: 24px; height: 24px; color: var(--cyan); transition: transform var(--tr); }
.logo:hover svg { transform: rotate(90deg); }
.logo-text { font-size: 14px; font-weight: 600; letter-spacing: 1px; color: var(--white); }
.logo-hint { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-dim); white-space: nowrap; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.logo-hint.show { opacity: 1; }

.nav-links { display: flex; gap: 1px; flex-wrap: wrap; justify-content: center; }
.nav-links button { background: none; border: none; font: inherit; font-size: 12px; color: var(--text); padding: 5px 10px; border-radius: 5px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.nav-links button:hover, .nav-links button.active { color: var(--cyan); background: var(--cyan-dim); }

.nav-extra { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-back { display: flex; align-items: center; gap: 3px; color: var(--text); text-decoration: none; font-size: 11px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; transition: all 0.3s; }
.nav-back:hover { color: var(--cyan); border-color: var(--cyan); }

.theme-toggle { background: none; border: 1px solid var(--border); color: var(--text); font-size: 14px; padding: 4px 8px; border-radius: 4px; cursor: pointer; transition: all 0.3s; line-height: 1; }
.theme-toggle:hover { color: var(--cyan); border-color: var(--cyan); }

.status { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--text-dim); cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; }
.status:hover { background: var(--surface-hover); color: var(--text); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); animation: sp 2s infinite; }
@keyframes sp { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- 页面 --- */
.main { position: relative; z-index: 1; min-height: 70vh; }
.page { display: none; }
.page.active { display: block; animation: pgIn 0.35s ease; }
@keyframes pgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.wrap { max-width: 920px; margin: 0 auto; padding: 20px 18px 60px; }

/* --- 首页Hero --- */
.hero { text-align: center; padding: 36px 18px 28px; max-width: 860px; margin: 0 auto; position: relative; }
.hero-ring { width: 200px; height: 200px; margin: 0 auto 12px; }
.hero-ring svg { width: 100%; height: 100%; }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; letter-spacing: 2px; color: var(--cyan); border: 1px solid var(--cyan); padding: 5px 16px; border-radius: 16px; margin-bottom: 20px; text-transform: uppercase; animation: bp 3s ease-in-out infinite; }
.hero-badge-dot { width: 4px; height: 4px; background: var(--cyan); border-radius: 50%; animation: db 1.5s ease-in-out infinite; }
@keyframes bp { 0%,100% { box-shadow: 0 0 5px var(--cyan-dim); } 50% { box-shadow: 0 0 18px var(--cyan-glow); } }
@keyframes db { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-title { font-size: 34px; font-weight: 700; letter-spacing: 3px; margin-bottom: 14px; background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 50%, var(--purple) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; cursor: default; }
.hero-desc { font-size: 13px; color: var(--text); line-height: 1.8; max-width: 600px; margin: 0 auto 28px; }
.hero-stats { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; margin-bottom: 22px; }
.hs-val { font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--white); }
.hs-label { font-size: 10px; color: var(--text-dim); margin-top: 3px; letter-spacing: 1px; }
.hero-era { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

/* --- 区块标题 --- */
.sec-title { font-size: 17px; font-weight: 600; letter-spacing: 1.5px; color: var(--white); margin: 34px 0 14px; padding-bottom: 7px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.sec-title::before { content: ''; width: 3px; height: 16px; background: var(--cyan); border-radius: 2px; }

.page-head { text-align: center; padding: 24px 0 30px; }
.page-head h2 { font-size: 26px; font-weight: 600; letter-spacing: 2px; color: var(--white); margin-bottom: 10px; }
.page-head p { font-size: 13px; color: var(--text); max-width: 480px; margin: 0 auto; }
.quote { font-size: 15px; font-style: italic; color: var(--cyan); margin-top: 10px; line-height: 1.7; }
.quote-by { font-size: 11px; color: var(--text-dim); font-style: normal; }
.context-note { font-size: 11px; color: var(--text-dim); text-align: center; max-width: 560px; margin: -12px auto 20px; line-height: 1.6; }

/* --- 卡片 --- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: all var(--tr); }
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); }
.card h3 { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 7px; }
.card p { font-size: 12.5px; color: var(--text); line-height: 1.7; margin-bottom: 6px; }
.card p:last-child { margin-bottom: 0; }
.card-accent { border-color: rgba(0,212,238,0.1); }

/* --- 标签 --- */
.tag { display: inline-block; font-size: 9px; padding: 2px 8px; border-radius: 3px; letter-spacing: 1px; margin-top: 8px; }
.t-cyan { background: rgba(0,212,238,0.1); color: var(--cyan); }
.t-orange { background: rgba(255,140,56,0.1); color: var(--orange); }
.t-purple { background: rgba(185,138,255,0.1); color: var(--purple); }
.t-blue { background: rgba(77,143,255,0.1); color: var(--blue); }
.t-green { color: var(--green); }

/* --- 网格 --- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* --- 新闻卡片 --- */
.ncard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all var(--tr); }
.ncard:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); }
.ncard h3 { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 6px; line-height: 1.4; }
.ncard p { font-size: 12px; color: var(--text); line-height: 1.6; }
.ncard .tag { margin-bottom: 6px; }

/* --- 元信息 --- */
.meta { font-size: 10px; color: var(--text-dim); margin-top: 8px; }

/* --- 时间线 --- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); }
.tl-item.hl::before { border-color: var(--cyan); background: var(--cyan); }
.tl-year { font-size: 10px; color: var(--cyan); margin-bottom: 2px; letter-spacing: 1px; }
.tl-text { font-size: 12.5px; color: var(--text); line-height: 1.6; }

/* --- 人物 --- */
.person { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; transition: all var(--tr); }
.person:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); }
.person h4 { font-size: 13px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.person-role { font-size: 10px; color: var(--text-dim); margin-bottom: 7px; }
.person-bio { font-size: 11px; color: var(--text); line-height: 1.5; }
.person-av { width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #fff; }
.av-cyan { background: linear-gradient(135deg, #006980, #00d4ee); }
.av-orange { background: linear-gradient(135deg, #994500, #ff8c38); }
.av-purple { background: linear-gradient(135deg, #5533aa, #b98aff); }
.av-blue { background: linear-gradient(135deg, #1a3d80, #4d8fff); }

/* --- 服务卡片 --- */
.svc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; transition: all var(--tr); }
.svc-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.svc-card h3 { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 7px; }
.svc-card p { font-size: 12px; color: var(--text); line-height: 1.6; }
.svc-icon { width: 40px; height: 40px; margin-bottom: 10px; }
.svc-icon svg { width: 100%; height: 100%; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.svc-tags span { font-size: 10px; color: var(--text); padding: 2px 7px; border: 1px solid var(--text-faint); border-radius: 3px; }

/* --- 项目 --- */
.proj-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.proj-head h3 { margin-bottom: 0 !important; }
.spec2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.spec2 dl dt { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1px; }
.spec2 dl dd { font-size: 12px; color: var(--white); }

/* --- 进度条 --- */
.bar { width: 100%; height: 3px; background: var(--text-faint); border-radius: 2px; margin: 8px 0 5px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); border-radius: 2px; transition: width 0.8s ease; }

/* --- 图表 --- */
.chart { height: 100px; margin-bottom: 12px; }
.chart svg { width: 100%; height: 100%; }

/* --- 投资者指标 --- */
.inv-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.inv-m { text-align: center; }
.inv-v { font-size: 22px; font-weight: 600; color: var(--white); }
.inv-l { font-size: 10px; color: var(--text-dim); margin-top: 2px; }

/* --- 表格 --- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th, .tbl td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--text-dim); font-weight: 400; font-size: 10px; letter-spacing: 1px; }
.tbl td { color: var(--text); }
.tbl tr:hover td { color: var(--white); background: var(--cyan-dim); }

/* --- 签名 --- */
.sign { margin-top: 14px; color: var(--white); font-size: 13px; line-height: 1.8; }

/* --- 页脚 --- */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--surface); padding: 22px 16px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--white); margin-bottom: 6px; letter-spacing: 1px; }
.footer-col p { font-size: 11px; color: var(--text-dim); line-height: 1.6; }

/* ============================================================
   深层 — 研究终端
   ============================================================ */
.deep { position: fixed; inset: 0; background: #02060f; z-index: 200; display: none; flex-direction: column; overflow: hidden; font-family: var(--font); }
.deep.active { display: flex; }
.deep-close { position: absolute; top: 10px; right: 16px; background: none; border: none; color: var(--text-dim); font-size: 30px; cursor: pointer; z-index: 10; transition: color 0.2s; line-height: 1; }
.deep-close:hover { color: var(--cyan); }

/* 终端动画 */
.deep-term { flex: 1; padding: 36px 24px; font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--cyan); overflow: auto; }
.deep-term .t-line { margin-bottom: 2px; opacity: 0; animation: tlIn 0.1s forwards; }
@keyframes tlIn { to { opacity: 1; } }
.deep-term .t-prompt { color: var(--green); }
.deep-term .t-cmd { color: var(--white); }
.deep-term .t-out { color: var(--text); }
.deep-term .t-warn { color: var(--orange); }

/* 深层内容 */
.deep-main { flex: 1; overflow: auto; padding: 10px 20px 80px; }
.deep-page { display: none; max-width: 720px; margin: 0 auto; }
.deep-page.active { display: block; animation: pgIn 0.3s ease; }
.deep-page h2 { font-size: 19px; color: var(--cyan); margin: 18px 0 12px; font-weight: 600; letter-spacing: 1.5px; }
.deep-page h3 { font-size: 14px; color: var(--white); margin: 16px 0 8px; font-weight: 500; }
.deep-page p { font-size: 12.5px; color: var(--text); line-height: 1.8; margin-bottom: 8px; }
.deep-box { background: rgba(0,212,238,0.03); border: 1px solid rgba(0,212,238,0.12); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.deep-box p { margin-bottom: 6px; }
.deep-dl { display: grid; grid-template-columns: 140px 1fr; gap: 5px 14px; font-size: 11.5px; }
.deep-dl dt { color: var(--text-dim); }
.deep-dl dd { color: var(--white); }

/* 备忘录 */
.memo { background: rgba(255,140,56,0.03); border: 1px solid rgba(255,140,56,0.1); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.memo-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--orange); margin-bottom: 4px; font-weight: 500; }
.memo-meta { font-size: 10px; color: var(--text-dim); margin-bottom: 8px; }
.memo p { font-size: 12px; color: var(--text); line-height: 1.7; }

/* 深层导航 */
.deep-nav { display: flex; gap: 3px; padding: 8px 16px; border-top: 1px solid rgba(0,212,238,0.1); background: rgba(2,6,15,0.96); overflow-x: auto; flex-shrink: 0; }
.deep-nav button { background: transparent; border: 1px solid rgba(0,212,238,0.12); color: var(--text); font: inherit; font-size: 11px; padding: 5px 12px; border-radius: 4px; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.deep-nav button:hover, .deep-nav button.active { color: var(--cyan); background: rgba(0,212,238,0.06); border-color: rgba(0,212,238,0.25); }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 22px; letter-spacing: 1px; }
  .hero-ring { width: 140px; height: 140px; }
  .hero-stats { gap: 16px; } .hs-val { font-size: 22px; }
  .grid2, .spec2 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .inv-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .deep-dl { grid-template-columns: 100px 1fr; }
}

@media (max-width: 480px) {
  .grid4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-coords { flex-direction: column; align-items: center; }
}
