/* ============================================================
   Oupula Web — Modern Tech Theme
   亮色默认 + 暗色自动切换 (prefers-color-scheme)
   全宽度布局 + 科技青/紫渐变
   ============================================================ */

:root {
  /* 亮色主题（默认） */
  --bg-0: #f7f9fc;
  --bg-1: #eef2f8;
  --bg-2: #e3e9f2;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --border: rgba(100, 120, 160, 0.14);
  --border-strong: rgba(100, 120, 160, 0.28);

  --primary: #0099b8;
  --primary-deep: #007a94;
  --violet: #6c5ce7;
  --gradient: linear-gradient(120deg, #0099b8 0%, #3b82f6 50%, #6c5ce7 100%);
  --gradient-soft: linear-gradient(120deg, rgba(0, 153, 184, 0.1), rgba(108, 92, 231, 0.1));

  --text-1: #1a2332;
  --text-2: #5a6a82;
  --text-3: #8a98b0;

  --success: #00b894;
  --warning: #e0922f;
  --danger: #e5484d;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-glow: 0 0 24px rgba(0, 153, 184, 0.18);
  --shadow-card: 0 8px 30px rgba(20, 40, 80, 0.1);

  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --header-h: 72px;
  --container-max: 1440px;
  --container-pad: 32px;
}

/* 手动切换暗色 */
:root[data-theme="dark"] {
  --bg-0: #0a0f1a;
  --bg-1: #0e1422;
  --bg-2: #131b2e;
  --surface: rgba(20, 28, 48, 0.72);
  --surface-solid: #141c30;
  --border: rgba(120, 150, 220, 0.14);
  --border-strong: rgba(120, 150, 220, 0.28);

  --primary: #00d4f0;
  --primary-deep: #00b8d4;
  --violet: #7c6cff;
  --gradient: linear-gradient(120deg, #00d4f0 0%, #4f9cff 50%, #7c6cff 100%);
  --gradient-soft: linear-gradient(120deg, rgba(0, 212, 240, 0.14), rgba(124, 108, 255, 0.14));

  --text-1: #eaf0ff;
  --text-2: #9aa7c7;
  --text-3: #5d6a8c;

  --success: #2ee6a8;
  --warning: #ffc857;
  --danger: #ff6b81;

  --shadow-glow: 0 0 24px rgba(0, 212, 240, 0.22);
  --shadow-card: 0 12px 40px rgba(2, 6, 18, 0.5);
}

/* 系统暗色且用户未显式选择亮色时自动启用暗色 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-0: #0a0f1a;
    --bg-1: #0e1422;
    --bg-2: #131b2e;
    --surface: rgba(20, 28, 48, 0.72);
    --surface-solid: #141c30;
    --border: rgba(120, 150, 220, 0.14);
    --border-strong: rgba(120, 150, 220, 0.28);

    --primary: #00d4f0;
    --primary-deep: #00b8d4;
    --violet: #7c6cff;
    --gradient: linear-gradient(120deg, #00d4f0 0%, #4f9cff 50%, #7c6cff 100%);
    --gradient-soft: linear-gradient(120deg, rgba(0, 212, 240, 0.14), rgba(124, 108, 255, 0.14));

    --text-1: #eaf0ff;
    --text-2: #9aa7c7;
    --text-3: #5d6a8c;

    --success: #2ee6a8;
    --warning: #ffc857;
    --danger: #ff6b81;

    --shadow-glow: 0 0 24px rgba(0, 212, 240, 0.22);
    --shadow-card: 0 12px 40px rgba(2, 6, 18, 0.5);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(0, 153, 184, 0.2); color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.icon { width: 18px; height: 18px; flex: none; }
.icon-caret { width: 14px; height: 14px; opacity: 0.7; transition: transform 0.2s; }

/* ---------- 背景场景 ---------- */
.bg-scene { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(100, 120, 160, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 120, 160, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 40%, transparent 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bg-grid {
    background-image:
      linear-gradient(rgba(90, 120, 200, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(90, 120, 200, 0.05) 1px, transparent 1px);
  }
}
:root[data-theme="dark"] .bg-grid {
  background-image:
    linear-gradient(rgba(90, 120, 200, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 120, 200, 0.05) 1px, transparent 1px);
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4; }
.bg-glow-1 { width: 560px; height: 560px; top: -200px; left: -120px; background: rgba(0, 153, 184, 0.12); }
.bg-glow-2 { width: 640px; height: 640px; top: -160px; right: -180px; background: rgba(108, 92, 231, 0.1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bg-glow { opacity: 0.5; }
  :root:not([data-theme="light"]) .bg-glow-1 { background: rgba(0, 140, 255, 0.16); }
  :root:not([data-theme="light"]) .bg-glow-2 { background: rgba(124, 108, 255, 0.14); }
}
:root[data-theme="dark"] .bg-glow { opacity: 0.5; }
:root[data-theme="dark"] .bg-glow-1 { background: rgba(0, 140, 255, 0.16); }
:root[data-theme="dark"] .bg-glow-2 { background: rgba(124, 108, 255, 0.14); }

/* ---------- 布局 ---------- */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
.main { flex: 1; width: 100%; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; position: relative; }
.brand-logo img { width: 32px; height: 32px; }
.brand-logo .logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo .logo-light { display: none; }
:root[data-theme="dark"] .brand-logo .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo .logo-dark { display: block; }
}
.brand-name {
  font-size: 20px; letter-spacing: 0.5px;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-link {
  position: relative; padding: 8px 16px; border-radius: 10px;
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text-1); background: rgba(120, 150, 220, 0.08); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px;
  background: var(--gradient); border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 153, 184, 0.5);
}

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* ---------- 主题切换 ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); transition: all 0.2s;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); box-shadow: var(--shadow-glow); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- 下拉 ---------- */
.dropdown { position: relative; }
.dropdown-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-2); font-size: 14px;
  transition: all 0.2s;
}
.dropdown-trigger:hover { color: var(--text-1); background: rgba(120, 150, 220, 0.08); }
.dropdown.open .dropdown-trigger { color: var(--text-1); background: rgba(120, 150, 220, 0.1); }
.dropdown.open .icon-caret { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 6px;
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all 0.18s ease;
  backdrop-filter: blur(16px);
  z-index: 110;
}
.dropdown-menu-right { left: auto; right: 0; }
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); white-space: nowrap;
  transition: all 0.15s;
}
.dropdown-item:hover { color: var(--primary); background: rgba(0, 153, 184, 0.08); }
.dropdown-item.active { color: var(--primary); }
.dropdown-divider { height: 1px; margin: 6px 4px; background: var(--border); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 14px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-text { line-height: 1; }

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.3px;
  border: none; outline: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 8px 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 16px 38px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 22px rgba(0, 153, 184, 0.25);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(0, 153, 184, 0.4); transform: translateY(-2px); }

.btn-ghost {
  background: transparent; color: var(--text-1);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-glow); }

.btn-outline {
  background: rgba(0, 153, 184, 0.06); color: var(--primary);
  border: 1px solid rgba(0, 153, 184, 0.4);
}
.btn-outline:hover { background: rgba(0, 153, 184, 0.14); box-shadow: var(--shadow-glow); }

.btn-danger { background: rgba(255, 107, 129, 0.12); color: var(--danger); border: 1px solid rgba(255, 107, 129, 0.4); }
.btn-danger:hover { background: rgba(255, 107, 129, 0.2); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- 移动端菜单按钮 ---------- */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text-1); border-radius: 2px; transition: all 0.25s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(0, 153, 184, 0.08); border: 1px solid rgba(0, 153, 184, 0.28);
  color: var(--primary); font-size: 13px; font-weight: 600; letter-spacing: 1px;
  margin-bottom: 26px;
}
.hero-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 10px var(--primary);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(32px, 5.6vw, 32px);
  font-weight: 800; line-height: 1.12; letter-spacing: -1px;
  margin-bottom: 22px;
}
.hero-title .grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 18px; color: var(--text-2); max-width: 520px; margin-bottom: 38px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; margin-top: 56px; }
.hero-stat .num {
  font-size: 30px; font-weight: 800; font-family: var(--font-mono);
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stat .label { font-size: 13px; color: var(--text-3); margin-top: 2px; }

/* 终端窗口（科技感视觉） */
.hero-visual { position: relative; }
.terminal {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 60px rgba(0, 150, 255, 0.08);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}
.terminal-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal-dot.r { background: #ff5f57; } .terminal-dot.y { background: #febc2e; } .terminal-dot.g { background: #28c840; }
.terminal-title { margin-left: 10px; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }
.terminal-body { padding: 22px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.9; }
.terminal-body .ln { display: block; white-space: pre-wrap; }
.terminal-body .p { color: var(--primary); }
.terminal-body .c { color: var(--text-1); }
.terminal-body .ok { color: var(--success); }
.terminal-body .dim { color: var(--text-3); }
.terminal-cursor {
  display: inline-block; width: 8px; height: 16px;
  background: var(--primary); vertical-align: -2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-visual::before {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: radial-gradient(circle at 60% 40%, rgba(0, 153, 184, 0.1), transparent 60%);
  filter: blur(30px);
}

/* ---------- 区块 ---------- */
.section { padding: 84px 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--primary); margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.5px; }
.section-desc { margin-top: 14px; color: var(--text-2); font-size: 16px; }
.section-head-left { text-align: left; margin: 0 0 40px; }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 153, 184, 0.4);
  box-shadow: var(--shadow-card), 0 0 30px rgba(0, 153, 184, 0.08);
}

.feature-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gradient-soft);
  border: 1px solid rgba(0, 153, 184, 0.25);
  color: var(--primary);
  margin-bottom: 20px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feature-desc { font-size: 14.5px; color: var(--text-2); }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 产品卡片 ---------- */
.product-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.product-cover {
  position: relative; height: 190px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
  display: flex; align-items: center; justify-content: center;
}
.product-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-cover img { transform: scale(1.06); }
.product-cover .product-logo-fallback {
  font-size: 44px; font-weight: 800; font-family: var(--font-mono);
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.product-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product-name { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.product-desc {
  font-size: 14px; color: var(--text-2); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 18px;
}
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: var(--primary); }
.price .currency { font-size: 14px; }
.price-free { color: var(--success); font-weight: 700; font-size: 17px; }

/* ---------- 页头（内页） ---------- */
.page-hero { padding: 72px 0 48px; text-align: center; position: relative; }
.page-hero h1 {
  font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -0.5px;
}
.page-hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.page-hero p { color: var(--text-2); margin-top: 14px; font-size: 16px; }
.page-hero-left { text-align: left; }

/* ---------- 列表布局（侧边栏） ---------- */
.layout-aside { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; padding-bottom: 90px; }
.aside-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.aside-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--text-1); }
.aside-menu { display: flex; flex-direction: column; gap: 4px; }
.aside-link {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px; border-radius: 10px;
  color: var(--text-2); font-size: 14.5px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  border: 1px solid transparent;
  outline: none;
}
.aside-link:hover { color: var(--text-1); background: rgba(120, 150, 220, 0.07); }
.aside-link:focus-visible { box-shadow: 0 0 0 2px rgba(0, 153, 184, 0.3); }
.aside-link.active {
  color: var(--primary);
  background: rgba(0, 153, 184, 0.08);
  border-color: rgba(0, 153, 184, 0.25);
}
.aside-children { margin-left: 14px; padding-left: 12px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }

/* ---------- 新闻/文章列表 ---------- */
.article-list { display: flex; flex-direction: column; gap: 16px; }
.article-item { display: flex; gap: 20px; padding: 24px 26px; align-items: center; }
.article-item-main { flex: 1; min-width: 0; }
.article-item-title { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; transition: color 0.2s; }
.article-item:hover .article-item-title { color: var(--primary); }
.article-item-excerpt {
  font-size: 14px; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-item-meta { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--text-3); }
.article-item-meta .icon { width: 14px; height: 14px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(0, 153, 184, 0.1); color: var(--primary);
  border: 1px solid rgba(0, 153, 184, 0.25);
}
.tag-violet { background: rgba(108, 92, 231, 0.12); color: var(--violet); border-color: rgba(108, 92, 231, 0.3); }
.tag-green { background: rgba(0, 184, 148, 0.1); color: var(--success); border-color: rgba(0, 184, 148, 0.3); }
.tag-orange { background: rgba(224, 146, 47, 0.1); color: var(--warning); border-color: rgba(224, 146, 47, 0.3); }
.tag-red { background: rgba(229, 72, 77, 0.1); color: var(--danger); border-color: rgba(229, 72, 77, 0.3); }
.tag-gray { background: rgba(100, 120, 160, 0.1); color: var(--text-2); border-color: var(--border-strong); }

/* ---------- 详情页 ---------- */
.article-detail { max-width: 860px; margin: 0 auto; padding-bottom: 90px; }
.article-detail-head { margin-bottom: 36px; }
.article-detail-title { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.article-detail-meta { display: flex; align-items: center; gap: 16px; color: var(--text-3); font-size: 14px; flex-wrap: wrap; }

/* Markdown 正文 */
.markdown-body { font-size: 16px; line-height: 1.85; color: var(--text-1); word-wrap: break-word; }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 1.6em 0 0.7em; font-weight: 700; line-height: 1.35;
}
.markdown-body h1 { font-size: 1.9em; padding-bottom: 0.3em; border-bottom: 1px solid var(--border); }
.markdown-body h2 { font-size: 1.55em; padding-bottom: 0.25em; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 1.3em; }
.markdown-body h4 { font-size: 1.12em; }
.markdown-body p { margin: 0.9em 0; }
.markdown-body a { color: var(--primary); border-bottom: 1px solid rgba(0, 153, 184, 0.35); }
.markdown-body a:hover { border-bottom-color: var(--primary); }
.markdown-body ul, .markdown-body ol { padding-left: 1.6em; margin: 0.9em 0; }
.markdown-body li { margin: 0.35em 0; }
.markdown-body blockquote {
  margin: 1.1em 0; padding: 12px 20px;
  border-left: 3px solid var(--primary);
  background: rgba(0, 153, 184, 0.06);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
}
.markdown-body code {
  font-family: var(--font-mono); font-size: 0.88em;
  background: rgba(100, 120, 160, 0.12);
  padding: 2px 7px; border-radius: 6px;
  color: var(--primary);
}
.markdown-body pre {
  margin: 1.2em 0; padding: 18px 20px;
  background: var(--bg-1); border: 1px solid var(--border);
  border-radius: 12px; overflow-x: auto;
}
.markdown-body pre code { background: none; padding: 0; color: var(--text-1); font-size: 13.5px; line-height: 1.7; }
.markdown-body img { max-width: 100%; border-radius: 12px; margin: 1em 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14.5px; }
.markdown-body th, .markdown-body td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.markdown-body th { background: var(--bg-1); font-weight: 600; }
.markdown-body hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---------- 版本表格/下载 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.table th {
  text-align: left; padding: 14px 18px;
  background: var(--bg-1);
  color: var(--text-2); font-weight: 600; font-size: 13px;
  letter-spacing: 0.5px; white-space: nowrap;
}
.table td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:hover td { background: rgba(0, 153, 184, 0.03); }
.table .mono { font-family: var(--font-mono); }

.os-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.os-tab {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 15px; font-weight: 600;
  transition: all 0.2s;
}
.os-tab .icon { width: 20px; height: 20px; }
.os-tab:hover { border-color: var(--border-strong); color: var(--text-1); transform: translateY(-2px); }
.os-tab.active {
  background: rgba(0, 153, 184, 0.09);
  border-color: var(--primary); color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.os-panel { display: none; }
.os-panel.active { display: block; animation: fadeUp 0.35s ease; }

.version-card { display: flex; align-items: center; gap: 22px; padding: 22px 26px; flex-wrap: wrap; }
.version-card-main { flex: 1; min-width: 220px; }
.version-num { font-family: var(--font-mono); font-size: 19px; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 10px; }
.version-meta { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.version-notes { margin-top: 10px; font-size: 14px; color: var(--text-2); }

/* ---------- 表单 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 80px 0 100px; }
.auth-card { width: 100%; max-width: 440px; padding: 40px 38px; }
.auth-title { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 32px; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-1); }
.form-hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 6px; display: none; }
.form-group.has-error .form-error { display: block; }
.form-group.has-error .input { border-color: var(--danger); }

.input, .textarea, .select {
  width: 100%; padding: 13px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text-1); font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(0, 153, 184, 0.2);
}
.textarea { min-height: 120px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a98b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.select option { background: var(--surface-solid); color: var(--text-1); }

.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; font-size: 14px; }
.auth-links a { color: var(--primary); }
.auth-links a:hover { text-decoration: underline; }
.auth-alt { text-align: center; margin-top: 26px; font-size: 14px; color: var(--text-2); }
.auth-alt a { color: var(--primary); font-weight: 600; }

/* checkbox */
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-2); user-select: none; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }

/* ---------- 用户中心 ---------- */
.uc-layout { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; padding: 48px 0 90px; }
.uc-user { text-align: center; padding: 30px 20px; }
.uc-avatar {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient); color: #fff;
  font-size: 32px; font-weight: 800; overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 153, 184, 0.25);
}
.uc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.uc-name { font-size: 18px; font-weight: 700; }
.uc-email { font-size: 13px; color: var(--text-3); margin-top: 4px; word-break: break-all; }
.uc-balance { margin-top: 18px; padding: 14px; border-radius: 12px; background: rgba(0, 153, 184, 0.06); border: 1px solid rgba(0, 153, 184, 0.2); }
.uc-balance .num { font-family: var(--font-mono); font-size: 22px; font-weight: 700; color: var(--primary); }
.uc-balance .label { font-size: 12px; color: var(--text-3); }
.uc-menu { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; text-align: left; }
.uc-menu .aside-link { align-items: flex-start; }
.uc-menu .aside-link .icon { margin-top: 2px; }
.uc-content { min-width: 0; }
.uc-panel { padding: 30px; }
.uc-panel-title { font-size: 19px; font-weight: 700; margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.uc-panel-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--gradient); }
.uc-subtitle { font-size: 15px; font-weight: 600; color: var(--text-1); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Sub-tabs within user center content */
.uc-subtabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.uc-subtab { padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--text-3); white-space: nowrap; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.uc-subtab:hover { color: var(--text-1); }
.uc-subtab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* Refined form controls inside user center */
.uc-panel .input, .uc-panel .textarea, .uc-panel .select {
  padding: 8px 12px; font-size: 14px; border-radius: 8px;
}
.uc-panel .select { padding-right: 32px; }
.uc-panel .form-label { font-size: 13px; font-weight: 500; margin-bottom: 5px; }
.uc-panel .form-group { margin-bottom: 14px; }
.uc-panel .textarea { min-height: 90px; }
.uc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.uc-form-action { grid-column: 1 / -1; }
.uc-form-grid .form-group { margin: 0; }

.info-row { display: flex; padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { width: 120px; color: var(--text-3); flex: none; }
.info-row .v { flex: 1; word-break: break-all; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--text-3); }
.empty-icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-1); color: var(--text-3);
}
.empty-icon svg { width: 34px; height: 34px; }
.empty p { font-size: 15px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.page-btn {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 600;
  transition: all 0.18s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--gradient); color: #fff; border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 153, 184, 0.25);
}
.page-btn.disabled { opacity: 0.35; pointer-events: none; }
.page-ellipsis { color: var(--text-3); padding: 0 4px; }

/* ---------- Flash 消息 ---------- */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 12px;
  font-size: 14.5px;
  border: 1px solid;
  animation: fadeUp 0.35s ease;
}
.flash .icon { flex: none; }
.flash-success { background: rgba(0, 184, 148, 0.08); border-color: rgba(0, 184, 148, 0.35); color: var(--success); }
.flash-error { background: rgba(229, 72, 77, 0.08); border-color: rgba(229, 72, 77, 0.35); color: var(--danger); }
.flash-info { background: rgba(0, 153, 184, 0.08); border-color: rgba(0, 153, 184, 0.35); color: var(--primary); }

/* ---------- Toast ---------- */
.toast-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 14px 18px; border-radius: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  font-size: 14px; color: var(--text-1);
  animation: toastIn 0.3s ease;
  backdrop-filter: blur(12px);
}
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--primary); }
@keyframes toastIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: scale(0.9); } }

/* ---------- 订单 ---------- */
.order-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; padding-bottom: 90px; }
.order-product { display: flex; gap: 22px; align-items: center; }
.order-product-img {
  width: 110px; height: 110px; border-radius: 16px; object-fit: cover;
  border: 1px solid var(--border); flex: none;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
}
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; font-size: 15px; border-bottom: 1px dashed var(--border); }
.price-row:last-child { border-bottom: none; }
.price-row .k { color: var(--text-2); }
.price-row .v { font-family: var(--font-mono); font-weight: 600; }
.price-row.total { font-size: 17px; }
.price-row.total .v { font-size: 24px; color: var(--primary); font-weight: 800; }
.price-row .v.discount { color: var(--success); }

.pay-methods { display: flex; flex-direction: column; gap: 14px; }
.pay-method {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  cursor: pointer; transition: all 0.2s;
}
.pay-method:hover { border-color: var(--border-strong); }
.pay-method.active { border-color: var(--primary); background: rgba(0, 153, 184, 0.07); box-shadow: var(--shadow-glow); }
.pay-method-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 20px; font-weight: 800;
}
.pay-method-name { font-size: 16px; font-weight: 700; }
.pay-method-desc { font-size: 13px; color: var(--text-3); }
.pay-method-radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; position: relative; }
.pay-method.active .pay-method-radio { border-color: var(--primary); }
.pay-method.active .pay-method-radio::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}

.qr-wrap { text-align: center; padding: 30px 0 10px; }
.qr-box {
  display: inline-block; padding: 16px; border-radius: 16px;
  background: #fff; box-shadow: 0 0 40px rgba(0, 153, 184, 0.15);
}
.qr-box img, .qr-box canvas { display: block; width: 220px; height: 220px; }
.qr-hint { margin-top: 18px; color: var(--text-2); font-size: 14px; }

.result-icon {
  width: 96px; height: 96px; margin: 0 auto 26px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.result-icon svg { width: 48px; height: 48px; }
.result-icon.success { background: rgba(0, 184, 148, 0.1); color: var(--success); box-shadow: 0 0 50px rgba(0, 184, 148, 0.2); }
.result-icon.fail { background: rgba(229, 72, 77, 0.1); color: var(--danger); box-shadow: 0 0 50px rgba(229, 72, 77, 0.2); }
.result-icon.pending { background: rgba(224, 146, 47, 0.1); color: var(--warning); box-shadow: 0 0 50px rgba(224, 146, 47, 0.2); }

/* ---------- 公告条（首页） ---------- */
.notice-list { display: flex; flex-direction: column; gap: 14px; }
.notice-item {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 26px;
}
.notice-item .n-title { flex: 1; font-weight: 600; font-size: 15.5px; transition: color 0.2s; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-item:hover .n-title { color: var(--primary); }
.notice-item .n-date { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); flex: none; }

/* ---------- CTA 区块 ---------- */
.cta-section { padding: 90px 0; }
.cta-box {
  position: relative; overflow: hidden;
  border-radius: 26px; padding: 70px 50px;
  text-align: center;
  background: linear-gradient(120deg, rgba(0, 120, 200, 0.1), rgba(108, 92, 231, 0.1));
  border: 1px solid rgba(0, 153, 184, 0.2);
}
.cta-box::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 153, 184, 0.1), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(108, 92, 231, 0.1), transparent 40%);
}
.cta-box > * { position: relative; }
.cta-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin-bottom: 16px; }
.cta-desc { color: var(--text-2); margin-bottom: 34px; font-size: 16px; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  padding: 60px 0 0;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 46px; }
.footer-slogan { color: var(--text-2); font-size: 14px; margin-top: 16px; max-width: 300px; }
.footer-contact { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 13.5px; margin-top: 14px; }
.footer-contact .email-img { height: 18px; width: auto; vertical-align: middle; }
.footer-title { font-size: 15px; font-weight: 700; margin-bottom: 18px; color: var(--text-1); }
.footer-link { display: block; color: var(--text-2); font-size: 14px; padding: 5px 0; transition: color 0.2s; }
.footer-link:hover { color: var(--primary); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 20px 0; border-top: 1px solid var(--border);
  color: var(--text-3); font-size: 13px;
}

/* ---------- 404 ---------- */
.error-wrap { text-align: center; padding: 110px 0 130px; }
.error-code {
  font-size: clamp(100px, 18vw, 180px); font-weight: 800; line-height: 1;
  font-family: var(--font-mono);
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 153, 184, 0.2));
}
.error-title { font-size: 24px; font-weight: 700; margin: 18px 0 10px; }
.error-desc { color: var(--text-2); margin-bottom: 36px; }

/* ---------- 动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp 0.55s ease both; }
.fade-up-d1 { animation-delay: 0.08s; }
.fade-up-d2 { animation-delay: 0.16s; }
.fade-up-d3 { animation-delay: 0.24s; }

/* 滚动显示 */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 加载 ---------- */
.spinner {
  width: 36px; height: 36px; margin: 40px auto;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, rgba(100,120,160,0.06) 25%, rgba(100,120,160,0.14) 50%, rgba(100,120,160,0.06) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { max-width: 620px; }
  .terminal { transform: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .order-layout { grid-template-columns: 1fr; }
  .order-layout > div:last-child .card { position: static !important; }

  /* Tablet/iPad: switch to hamburger menu */
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border-strong);
    padding: 12px 20px 18px;
    display: none;
    backdrop-filter: blur(18px);
    z-index: 99;
  }
  .nav.open { display: flex; }
  .nav-link { padding: 12px 14px; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .dropdown-label { display: none; }
  .header-actions { gap: 8px; }
  .header-actions .btn-sm { padding: 6px 12px; font-size: 13px; }
  .header-inner { gap: 10px; }
}

@media (max-width: 768px) {
  :root { --header-h: 62px; --container-pad: 20px; }
  .hero { padding: 70px 0 60px; }
  .hero-stats { gap: 26px; flex-wrap: wrap; }
  .hero-stat .num { font-size: 24px; }
  .section { padding: 60px 0; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .layout-aside { grid-template-columns: 1fr; }
  .aside-panel { position: static; }
  .uc-layout { grid-template-columns: 1fr; }
  .uc-form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .auth-card { padding: 32px 24px; }
  .btn-lg { padding: 14px 28px; font-size: 16px; }
  .version-card { flex-direction: column; align-items: flex-start; }

  /* Notice items: stack vertically */
  .notice-item { flex-direction: row; gap: 12px; padding: 16px 18px; }
  .notice-item .n-title { font-size: 14.5px; }

  /* Article items: stack vertically */
  .article-item { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
  .article-item > .icon { display: none; }

  /* Order product: stack vertically */
  .order-product { flex-direction: column; align-items: flex-start; gap: 16px; }
  .order-product-img { width: 90px; height: 90px; }

  /* Info rows: narrower label */
  .info-row .k { width: 90px; font-size: 13px; }
  .info-row .v { font-size: 14px; }

  /* CTA box: reduce padding */
  .cta-box { padding: 44px 24px; border-radius: 18px; }
  .cta-section { padding: 60px 0; }

  /* UC panel: reduce padding */
  .uc-panel { padding: 20px; }
  .uc-user { padding: 24px 16px; }

  /* Page hero: reduce padding */
  .page-hero { padding: 48px 0 32px; }

  /* Terminal: smaller text */
  .terminal-body { padding: 16px; font-size: 12.5px; line-height: 1.8; }

  /* Section head with flex (announcements) */
  .section-head[style*="flex"] { flex-direction: column; gap: 16px; align-items: flex-start !important; }

  /* Toast: full width on mobile */
  .toast-container { left: 12px; right: 12px; transform: none; top: 50%; }
  .toast { min-width: 0; max-width: none; width: 100%; }

  /* Product cover in detail page */
  .product-cover { height: 240px !important; }

  /* Pay method: smaller padding */
  .pay-method { padding: 14px 16px; gap: 12px; }
  .pay-method-icon { width: 40px; height: 40px; font-size: 18px; }

  /* QR code: smaller */
  .qr-box img, .qr-box canvas { width: 180px; height: 180px; }

  /* Auth wrap: reduce padding */
  .auth-wrap { padding: 40px 0 60px; }

  /* Error wrap */
  .error-wrap { padding: 80px 0 100px; }

  /* Article detail card: reduce inline padding */
  .article-detail .card[style*="padding"] { padding: 28px !important; }

  /* Input group: button text shrink */
  .input-group .btn { white-space: nowrap; flex: none; }

  /* Order result card: reduce inline padding */
  .card[style*="padding: 60px"] { padding: 40px 24px !important; }

  /* Markdown body: smaller font on mobile */
  .markdown-body { font-size: 15px; }
  .markdown-body pre { padding: 14px 16px; }
  .markdown-body table { font-size: 13px; }
}

@media (max-width: 480px) {
  :root { --container-pad: 14px; --header-h: 56px; }

  /* Header: hide brand name, keep logo */
  .brand-name { display: none; }
  .header-inner { gap: 8px; }

  /* Header actions: hide login/register text on very small screens */
  .header-actions .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* Hero: smaller padding and font */
  .hero { padding: 48px 0 44px; }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 15px; margin-bottom: 28px; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 20px; }
  .hero-stat .label { font-size: 11px; }

  /* Section: smaller padding */
  .section { padding: 44px 0; }
  .section-title { font-size: 22px; }
  .section-head { margin-bottom: 36px; }

  /* Cards: smaller padding */
  .card { padding: 18px; border-radius: 14px; }

  /* Page hero */
  .page-hero { padding: 36px 0 24px; }
  .page-hero h1 { font-size: 24px; }
  .page-hero p { font-size: 14px; }

  /* Terminal: hide on very small screens to save space */
  .hero-visual { display: none; }

  /* CTA box */
  .cta-box { padding: 32px 18px; border-radius: 14px; }
  .cta-title { font-size: 22px; }
  .cta-desc { font-size: 14px; margin-bottom: 24px; }

  /* Auth card */
  .auth-card { padding: 24px 18px; }
  .auth-title { font-size: 22px; }
  .auth-wrap { padding: 24px 0 40px; }

  /* UC panel */
  .uc-panel { padding: 16px; }
  .uc-panel-title { font-size: 17px; }

  /* Info row: stack vertically */
  .info-row { flex-direction: column; gap: 4px; padding: 12px 0; }
  .info-row .k { width: auto; font-size: 12px; }
  .info-row .v { font-size: 14px; }

  /* Notice item: tighter */
  .notice-item { padding: 14px 16px; gap: 10px; }
  .notice-item .n-title { font-size: 14px; }
  .notice-item .n-date { font-size: 12px; }

  /* Article item */
  .article-item { padding: 16px; }
  .article-item-title { font-size: 16px; }

  /* Version card */
  .version-card { padding: 16px 18px; gap: 14px; }
  .version-num { font-size: 17px; }

  /* OS tabs: scrollable */
  .os-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 8px; padding-bottom: 6px; }
  .os-tab { padding: 10px 16px; font-size: 14px; flex: none; }

  /* Table: smaller padding */
  .table th, .table td { padding: 10px 12px; font-size: 13px; }
  .table { min-width: 480px; }

  /* Footer */
  .site-footer { padding: 40px 0 0; }
  .footer-grid { gap: 24px; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Pay method */
  .pay-method { padding: 12px 14px; }
  .pay-method-name { font-size: 15px; }
  .pay-method-desc { font-size: 12px; }

  /* QR code */
  .qr-box img, .qr-box canvas { width: 160px; height: 160px; }

  /* Error wrap */
  .error-code { font-size: 80px; }
  .error-title { font-size: 20px; }

  /* Buttons */
  .btn { padding: 10px 20px; font-size: 14px; }
  .btn-lg { padding: 12px 24px; font-size: 15px; }
  .btn-sm { padding: 7px 14px; font-size: 13px; }

  /* Pagination */
  .page-btn { min-width: 36px; height: 36px; font-size: 13px; }

  /* Flash message */
  .flash { padding: 12px 14px; font-size: 13.5px; }

  /* Product cover */
  .product-cover { height: 180px !important; }
  .product-body { padding: 16px; }
  .product-name { font-size: 17px; }
  .product-desc { font-size: 13px; }

  /* Form inputs */
  .input, .textarea, .select { padding: 11px 14px; font-size: 14px; }
  .form-group { margin-bottom: 16px; }

  /* Article detail card: even smaller padding */
  .article-detail .card[style*="padding"] { padding: 18px !important; }

  /* Input group: stack vertically on very small screens */
  .input-group { flex-direction: column; gap: 8px; }
  .input-group .btn { width: 100%; }

  /* Markdown body: smaller font */
  .markdown-body { font-size: 14.5px; line-height: 1.75; }
  .markdown-body pre { padding: 12px 14px; font-size: 12.5px; }
  .markdown-body table { font-size: 12px; }
  .markdown-body th, .markdown-body td { padding: 8px 10px; }

  /* Order result card: even smaller */
  .card[style*="padding: 60px"] { padding: 28px 16px !important; }
  .card[style*="padding: 60px"] h2 { font-size: 20px !important; }

  /* Auth links: stack on very small screens */
  .auth-links { flex-direction: column; gap: 10px; text-align: center; }

  /* Product detail grid gap */
  .grid[style*="gap:44px"] { gap: 20px !important; }
}

/* Captcha popup */
.captcha-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.captcha-popup.show {
  display: flex;
}
.captcha-popup-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.captcha-popup-body {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  margin: auto;
  max-width: 100%;
}
#captcha-container .go-captcha {
  border-radius: 12px;
}
#captcha-container .gc-header {
  height: auto;
  min-height: 36px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  padding: 6px 0;
}
#captcha-btn-wrap .go-captcha.gc-button-mode {
  border-radius: 12px !important;
  border: 1px solid var(--border-strong) !important;
  height:48px !important;
  width: 100%;
}
[data-theme="dark"] .captcha-popup-body {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Markdown Editor (feedback) */
.md-editor-wrap { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.md-toolbar { display: flex; gap: 4px; padding: 6px 8px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.md-btn { background: none; border: 1px solid transparent; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 14px; color: var(--text-2); transition: all 0.15s; }
.md-btn:hover { background: var(--bg-3); border-color: var(--border); }
.md-textarea { border: none; border-radius: 0; resize: vertical; min-height: 120px; }

/* Feedback Attachments */
.fb-attachments { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fb-att-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--bg-2); border-radius: 6px; font-size: 13px; }
.fb-att-link { color: var(--primary); text-decoration: none; }
.fb-att-link:hover { text-decoration: underline; }
.fb-att-size { color: var(--text-3); font-size: 12px; }
.fb-att-remove { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 18px; padding: 0 4px; line-height: 1; }
.fb-att-remove:hover { opacity: 0.7; }
.fb-att-list { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-att-list .fb-att-link { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: var(--bg-2); border-radius: 6px; font-size: 13px; }
