/* ═══════════════════════════════════════════════════════
   GoLoveJoy UI Kit v2 · 克制派（Apple/Nike 风）
   橙色 + 米白 + 浅米白底 · 老钱风
   所有 v2 页面引用此文件
═══════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;500&display=swap");

/* ═══ Tokens ═══ */
:root {
  --bg-cream:   #F6EFE2;
  --bg-cream-2: #EFE7D7;
  --bg-paper:   #FCFAF5;
  --bg-dark:    #0A0908;
  --bg-dark-2:  #15130F;
  --orange:     #FF4B12;
  --orange-hi:  #FF6A38;
  --orange-soft:#FFA764;
  --orange-bg:  rgba(255,75,18,0.08);
  --ink-1:      #0A0A0A;
  --ink-2:      #3A3833;
  --ink-3:      #8A857B;
  --ink-4:      #B5AFA3;
  --line:       rgba(10,10,10,0.06);
  --line-2:     rgba(10,10,10,0.12);

  --font-sans:  "Inter", "Noto Sans SC", -apple-system, "PingFang SC", sans-serif;
  --font-mono:  "JetBrains Mono", "SF Mono", Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  --ease:     cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --shadow-sm: 0 2px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --shadow-orange: 0 8px 28px rgba(255,75,18,0.35);

  --green: #5a8859;           /* 成功/在线 */
  --green-bg: #eaf6ec;
  --nav-glass: rgba(246,239,226,0.7);
  --card-solid: #FCFAF5;      /* 实底卡片（原 white） */
}

/* ═══ 暖夜主题（深色）═══
   设计：暖炭底（带棕调，非冷黑）+ 米白文字 + 橙在深底提亮一档。
   由 shared/theme.js 依 localStorage(gl_pref_theme) 在 <html> 打 data-theme="dark"。 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-cream:   #161310;     /* 页面底：深暖炭 */
  --bg-cream-2: #1D1915;     /* 次级底 */
  --bg-paper:   #232019;     /* 卡片纸面 */
  --bg-dark:    #0A0908;     /* 深色段落维持 */
  --bg-dark-2:  #15130F;
  --orange:     #FF5A1F;     /* 深底上提亮一档 */
  --orange-hi:  #FF7B47;
  --orange-soft:#FFB37A;
  --orange-bg:  rgba(255,90,31,0.15);
  --ink-1:      #F2EADB;     /* 主文字：米白 */
  --ink-2:      #CFC6B4;
  --ink-3:      #968D7C;
  --ink-4:      #6E6557;
  --line:       rgba(242,234,219,0.08);
  --line-2:     rgba(242,234,219,0.17);

  --shadow-sm: 0 2px 6px rgba(0,0,0,0.35);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.55);
  --shadow-orange: 0 8px 28px rgba(255,90,31,0.28);

  --green: #7FB47D;
  --green-bg: rgba(127,180,125,0.14);
  --nav-glass: rgba(22,19,16,0.72);
  --card-solid: #232019;
}

/* 暖夜下的通用细节修正 */
:root[data-theme="dark"] body { background: var(--bg-cream); color: var(--ink-1); }
:root[data-theme="dark"] img { opacity: .92; }
:root[data-theme="dark"] ::selection { background: rgba(255,90,31,.35); }

/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-cream);
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--orange-bg); color: var(--orange); }

/* ═══ 滚动进度条 ═══ */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  z-index: 999;
  transition: width 0.15s ease-out;
  pointer-events: none;
}

/* ═══ 鼠标光晕跟随 ═══ */
#cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,75,18,0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  will-change: transform;
  mix-blend-mode: multiply;
}
body.dark-active #cursor-glow {
  background: radial-gradient(circle, rgba(255,107,56,0.12) 0%, transparent 60%);
  mix-blend-mode: screen;
}

/* ═══ 顶部导航 ═══ */
.gl-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: 76px;
  padding: 0 56px;
  display: flex; align-items: center;
  z-index: 100;
  background: var(--nav-glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.gl-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-1);
}
.gl-brand .mark {
  width: 100px; height: 44px;
  border-radius: 0;
  background: url('../assets/glj-logo-full.png') no-repeat left center;
  background-size: contain;
  display: inline-block;
  color: transparent; font-size: 0;
}
.gl-brand > span:not(.mark) { display: none; }
.gl-nav-links {
  margin-left: 80px;
  display: flex; gap: 40px;
  font-size: 13px;
  color: var(--ink-2);
}
.gl-nav-links a {
  color: var(--ink-2);
  font-weight: 400;
  position: relative;
  transition: color 0.2s;
  padding: 4px 0;
}
.gl-nav-links a:hover { color: var(--ink-1); }
.gl-nav-links a.active { color: var(--ink-1); font-weight: 500; }
.gl-nav-links a.active::after {
  content: ""; position: absolute;
  bottom: -26px; left: 0; right: 0;
  height: 1px;
  background: var(--ink-1);
}
.gl-nav-actions {
  margin-left: auto;
  display: flex; gap: 10px;
  align-items: center;
}

/* ═══ 按钮 ═══ */
.gl-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--ink-1);
  will-change: transform;
}
.gl-btn::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,0.2), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.gl-btn:hover::after { opacity: 1; }
.gl-btn-sm { padding: 8px 16px; font-size: 13px; }
.gl-btn-lg { padding: 16px 32px; font-size: 15px; }
.gl-btn-dark {
  background: var(--ink-1); color: var(--bg-cream);
}
.gl-btn-dark:hover {
  background: var(--orange); color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
}
.gl-btn-primary {
  background: var(--orange); color: white;
  box-shadow: var(--shadow-orange);
}
.gl-btn-primary:hover {
  background: var(--orange-hi);
  transform: translateY(-2px);
}
.gl-btn-outline {
  border-color: var(--line-2); color: var(--ink-1);
}
.gl-btn-outline:hover { border-color: var(--ink-1); }
.gl-btn-ghost { color: var(--ink-2); }
.gl-btn-ghost:hover { background: rgba(0,0,0,0.04); color: var(--ink-1); }

/* ═══ 容器 / 区块 ═══ */
.gl-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 56px;
  position: relative;
  z-index: 10;
}
.gl-section {
  padding: 100px 0;
}
.gl-section-lg { padding: 140px 0; }
.gl-section-xl { padding: 180px 0; }

/* ═══ 标题层级 ═══ */
.gl-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 24px;
  display: inline-block;
}
.gl-h1 {
  font-size: clamp(56px, 9vw, 128px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
}
.gl-h1 strong { font-weight: 800; }
.gl-h1 .orange { color: var(--orange); font-weight: 800; }
.gl-h2 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.gl-h2 strong { font-weight: 800; }
.gl-h2 .orange { color: var(--orange); font-weight: 800; }
.gl-h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.gl-h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.gl-lead {
  font-size: 18px;
  color: var(--ink-2);
  line-height: 1.7;
  font-weight: 400;
}

/* ═══ 卡片 ═══ */
.gl-card {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px;
  transition: all 0.4s var(--ease);
}
.gl-card-hover {
  cursor: pointer;
}
.gl-card-hover:hover {
  border-color: var(--orange);
  background: var(--card-solid);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ═══ 徽章 ═══ */
.gl-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  background: rgba(10,10,10,0.06);
  color: var(--ink-2);
  letter-spacing: 0.5px;
}
.gl-badge-orange {
  background: var(--orange-bg);
  color: var(--orange);
}
.gl-badge-success {
  background: rgba(107,160,104,0.12);
  color: var(--green);
}
.gl-badge-dim {
  background: rgba(10,10,10,0.04);
  color: var(--ink-3);
}
.gl-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ═══ 输入 ═══ */
.gl-input {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  color: var(--ink-1);
}
.gl-input:focus { border-color: var(--orange); }
.gl-label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}

/* ═══ 滚动揭示 ═══ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }
.reveal[data-delay="500"] { transition-delay: 0.5s; }

/* ═══ 分词上滑入场 ═══ */
.gl-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.gl-word > span {
  display: inline-block;
  transform: translateY(100%);
  animation: lineUp 1.2s var(--ease-out) both;
}
@keyframes lineUp { to { transform: translateY(0); } }

/* ═══ 关键词跑马灯 ═══ */
.gl-marquee {
  background: var(--bg-cream);
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.gl-marquee::before, .gl-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; width: 160px;
  z-index: 2; pointer-events: none;
}
.gl-marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-cream), transparent); }
.gl-marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg-cream), transparent); }
.gl-marquee-track {
  display: flex; gap: 56px;
  width: max-content;
  animation: marqueeMove 30s linear infinite;
}
@keyframes marqueeMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.gl-marquee-item {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 700;
  color: var(--ink-1);
  letter-spacing: -0.02em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 28px;
}
.gl-marquee-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--orange);
}
.gl-marquee-item.muted { color: var(--ink-4); font-weight: 300; }

/* ═══ 浮动粒子（深色区） ═══ */
.gl-particles {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.gl-particles .p {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--orange-soft);
  border-radius: 50%;
  opacity: 0;
  animation: pFloat 12s linear infinite;
  box-shadow: 0 0 8px var(--orange-soft);
}
@keyframes pFloat {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { transform: translate(var(--dx, 0), -100vh); opacity: 0; }
}

/* ═══ 兔子 fab ═══ */
.gl-rabbit-fab {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 50;
  width: 110px;
  pointer-events: auto;
}
/* 暖夜模式切换按钮：浮在兔子上方的小月亮（兔子保持「助手」定位） */
.gl-theme-fab {
  position: fixed;
  bottom: 160px; right: 52px;
  z-index: 50;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--card-solid, #fff);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.12));
  cursor: pointer;
  font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.gl-theme-fab:hover { transform: scale(1.12); }
.gl-theme-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.gl-theme-fab .bubble {
  position: absolute;
  bottom: 115%; right: 0;
  white-space: nowrap;
  background: var(--card-solid, #fff);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md, 8px);
  padding: 4px 10px;
  font-size: 11px; color: var(--ink-2);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.gl-theme-fab:hover .bubble, .gl-theme-fab:focus-visible .bubble { opacity: 1; }
.gl-theme-fab .ico::before { content: "🌙"; }
:root[data-theme="dark"] .gl-theme-fab .ico::before { content: "☀️"; }
.gl-rabbit-fab img {
  width: 100%;
  filter: drop-shadow(0 12px 30px rgba(255,75,18,0.4));
  animation: rabbitFloat 4s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.3s;
}
.gl-rabbit-fab img:hover { transform: scale(1.1) rotate(-5deg); }
.gl-rabbit-fab .bubble {
  position: absolute;
  bottom: 110%; right: 30%;
  background: var(--card-solid);
  backdrop-filter: blur(16px);
  color: var(--ink-1);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s;
}
.gl-rabbit-fab:hover .bubble {
  opacity: 1;
  transform: translateY(0);
}
@keyframes rabbitFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}

/* ═══ Footer ═══ */
.gl-footer {
  background: var(--bg-dark);
  padding: 80px 56px 60px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}
.gl-footer .container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
}
.gl-footer .brand-block .gl-brand { color: white; margin-bottom: 16px; }
.gl-footer .brand-block p {
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  font-size: 13px;
  max-width: 320px;
}
.gl-footer .col h4 {
  color: white;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.gl-footer .col a {
  display: block;
  color: rgba(255,255,255,0.55);
  padding: 6px 0;
  transition: color 0.2s;
}
.gl-footer .col a:hover { color: var(--orange-soft); }
.gl-footer .bottom {
  max-width: 1320px;
  margin: 60px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between;
  color: rgba(255,255,255,0.3);
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* ═══ 滚动条 ═══ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* ═══ 工具类 ═══ */
.gl-flex { display: flex; }
.gl-flex-col { display: flex; flex-direction: column; }
.gl-items-center { align-items: center; }
.gl-justify-between { justify-content: space-between; }
.gl-gap-2 { gap: 8px; }
.gl-gap-3 { gap: 12px; }
.gl-gap-4 { gap: 16px; }
.gl-gap-6 { gap: 32px; }
.gl-mt-3 { margin-top: 12px; }
.gl-mt-4 { margin-top: 16px; }
.gl-mt-6 { margin-top: 32px; }
.gl-mt-8 { margin-top: 64px; }
.gl-text-dim { color: var(--ink-3); }
.gl-text-orange { color: var(--orange); }
.gl-mono { font-family: var(--font-mono); }

/* 暖夜下徽章/浅底修正 */
:root[data-theme="dark"] .gl-badge { background: rgba(242,234,219,0.08); }
:root[data-theme="dark"] .gl-badge-dim { background: rgba(242,234,219,0.05); }
:root[data-theme="dark"] .gl-badge-success { background: rgba(127,180,125,0.15); }
