/* ── dsh-remote Design System 2.0 (High-End Cyber-Clean & Linear Style) ── */

:root {
  /* Surface hierarchy (OKLCH inspired for rich depth) */
  --bg: #090d16;
  --bg-subtle: #0f172a;
  --surface-1: rgba(15, 23, 42, 0.75);
  --surface-2: rgba(30, 41, 59, 0.7);
  --surface-glass: rgba(15, 23, 42, 0.65);
  
  /* Brand & Vibrant Accents: Electric Cyan -> Indigo -> Violet */
  --brand-300: #67e8f9;
  --brand-400: #22d3ee;
  --brand-500: #06b6d4;
  --brand-600: #0891b2;
  --brand-gradient: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
  --primary: #06b6d4;
  --primary-hover: #0891b2;
  
  /* Text & Foreground */
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #020617;

  /* Borders & Glows */
  --border: rgba(51, 65, 85, 0.6);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --glow-brand: 0 0 25px -4px rgba(6, 182, 212, 0.4);
  --glow-success: 0 0 16px -3px rgba(16, 185, 129, 0.5);

  /* Status Colors */
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --danger: #f43f5e;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);

  /* Spacing Scale (4pt Baseline) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Radii */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.65), 0 0 1px 1px rgba(255, 255, 255, 0.06);

  /* Typography Stack (Chinese & System First, Fast & Non-blocking) */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
  /* Mono stack ends with the CJK sans stack: any Chinese glyph that falls
     through the Latin mono fonts (e.g. "在线" / "标准免费版" inside .value)
     renders with PingFang/YaHei instead of falling back to SimSun. */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', Menlo, Consolas, 'PingFang SC', 'HarmonyOS Sans SC', 'Microsoft YaHei', sans-serif;
}

/* ── Reset & Core Styles ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Aurora background + subtle ambient glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    radial-gradient(60% 45% at 18% 8%, rgba(6, 182, 212, 0.12), transparent 70%),
    radial-gradient(50% 40% at 85% 90%, rgba(99, 102, 241, 0.09), transparent 70%);
  pointer-events: none;
}

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-300);
  text-decoration: none;
}

/* ── Layout Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ── Header ── */
header {
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  line-height: 1.1;
}

/* Logo glyph breathing room (SVG icon vs wordmark) */
.logo > svg {
  margin-right: 8px;
  flex-shrink: 0;
}

/* dsh + host = dshost: "DSH" stays solid white, the capital H bridges both
   words — "ost" wears the brand cyan as plain text (no box, no gradient) so
   the fused wordmark reads clean and quiet: DSHost. */
.logo .logo-host {
  color: var(--brand-300);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: -0.03em;
  margin-left: 0;
}

.logo .logo-tld {
  font-size: inherit;
  font-weight: inherit;
  color: var(--brand-300);
  margin-left: 1px;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* Standardized Internationalization Language Switcher Pill (Fixed width, Clean & Compact) */
.lang-switcher-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--text-secondary) !important;
  text-decoration: none;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-sizing: border-box;
}

.lang-switcher-pill svg {
  color: var(--text-muted);
  transition: color 0.15s ease;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

.lang-switcher-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-400);
  color: #fff !important;
}

.lang-switcher-pill:hover svg {
  color: var(--brand-300);
}

/* Specific highlight for our own dshost-plugin badge */
.plugin-badge-primary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(6, 182, 212, 0.14);
  color: var(--brand-300);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.plugin-badge-secondary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.nav-link-item {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-link-item:hover {
  color: var(--brand-300);
}

/* ── Cards (Gradient Border & Glassmorphic) ── */
.card {
  background: linear-gradient(var(--surface-1), var(--surface-1)) padding-box,
              linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(6, 182, 212, 0.05) 50%, rgba(255, 255, 255, 0.02)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.75), 0 0 20px -5px rgba(6, 182, 212, 0.15);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-gradient);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
  font-weight: 700;
}

.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
  color: var(--text-inverse);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--brand-400);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* ── Forms ── */
.form-group {
  margin-bottom: var(--space-4);
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input, select, textarea {
  width: 100%;
  padding: 11px 15px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.925rem;
  outline: none;
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

input::placeholder {
  color: var(--text-muted);
}

/* ── Alerts ── */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-s);
  margin-bottom: var(--space-4);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid transparent;
}

.alert-error {
  background: var(--danger-bg);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.3);
}

.alert-success {
  background: var(--success-bg);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-info {
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.3);
}

/* ── Status Indicator (Breathing Halo Dot) ── */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: relative;
}

.status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-dot.online::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  animation: pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.status-dot.offline {
  background-color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes pulse-ring {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── Hero (Asymmetric Split & Browser Frame) ── */
.hero {
  padding: 80px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-7);
  align-items: center;
}

.hero-content {
  text-align: left;
}

.hero-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.06) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0 !important;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: var(--space-5);
  box-shadow: 0 0 20px -3px rgba(16, 185, 129, 0.25);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 100%;
}

.hero-security-pill .pill-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  flex-shrink: 0;
}

.hero-security-pill .pill-text {
  flex: 1;
}

.hero-security-pill .pill-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-security-pill:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(6, 182, 212, 0.12) 100%);
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 0 28px -2px rgba(16, 185, 129, 0.45);
  color: #fff !important;
}

.hero-security-pill .arrow-icon {
  color: var(--brand-300);
  font-size: 1.1rem;
  margin-left: 4px;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.hero-security-pill:hover .arrow-icon {
  transform: translateX(3px);
}

.hero h1 {
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: var(--space-4);
  color: #fff;
}

.hero h1 .highlight {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

/* Browser Frame Preview */
.browser-frame {
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px -5px rgba(6, 182, 212, 0.2);
  transition: transform 0.3s ease;
}

.browser-frame:hover {
  transform: translateY(-4px);
}

.browser-header {
  background: #151d2f;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.browser-dot.red { background: #ef4444; }
.browser-dot.yellow { background: #eab308; }
.browser-dot.green { background: #22c55e; }

.browser-address {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Hero Composition: Overlapping Multi-Device Visual ── */
.hero-visual-overlap {
  position: relative;
  width: 100%;
}

.hero-pc-card {
  width: 100%;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 30px -5px rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1322;
  transition: transform 0.3s ease;
}

.hero-pc-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* Emphasized Pure-R-Corner Mobile Floating Card */
.hero-mobile-floating {
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 35%;
  max-width: 240px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.95), 0 0 25px rgba(6, 182, 212, 0.35);
  border: 2px solid rgba(6, 182, 212, 0.4);
  background: #020617;
  z-index: 10;
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.hero-mobile-floating:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-8px) scale(1.05);
  box-shadow: 0 35px 80px -5px rgba(0, 0, 0, 0.95), 0 0 35px rgba(6, 182, 212, 0.55);
}

.hero-mobile-floating img {
  width: 100%;
  height: auto;
  display: block;
}

.mobile-accent-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--brand-300);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 20;
}

/* ── Dashboard Deep-Dive Spotlight Section ── */
.dashboard-spotlight-section {
  padding: var(--space-8) 0;
  position: relative;
}

.dashboard-spotlight-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-7);
  align-items: center;
}

.spotlight-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.spotlight-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.spotlight-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-s);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--brand-300);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Bento Grid Features (Linear 7:5 / 5:7 Rhythmic Asymmetry) ── */
.features-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-5);
  margin: var(--space-7) 0;
}

.bento-card {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.bento-card.col-7 { grid-column: span 7; }
.bento-card.col-5 { grid-column: span 5; }
.bento-card.col-4 { grid-column: span 4; }
.bento-card.col-6 { grid-column: span 6; }
.bento-card.col-8 { grid-column: span 8; }
.bento-card.col-12 { grid-column: span 12; }

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-300);
  margin-bottom: var(--space-4);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.15);
}

.bento-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
  color: #fff;
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 0.925rem;
  line-height: 1.65;
}

.bento-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--brand-300);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 14px;
}

/* ── Code Block Component with Tabs & Copy ── */
.code-block {
  background: #040711;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  overflow: hidden;
  margin: var(--space-3) 0;
}

.code-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.code-tabs {
  display: flex;
  gap: var(--space-2);
}

.code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-sans);
}

.code-tab.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--brand-300);
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}

.code-copy-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.code-content {
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  overflow-x: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Timeline Steps (Rhythmic Asymmetry: 0.85fr 1.3fr 0.85fr) ── */
.timeline-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.3fr 0.85fr;
  gap: var(--space-5);
  position: relative;
  align-items: stretch;
}

.timeline-step {
  padding: 28px 24px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-m);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.timeline-step:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
}

.timeline-step.featured-step {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 15px -3px rgba(6, 182, 212, 0.15);
}

.timeline-num {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--brand-400);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Auth Page (Split-Screen Modern Layout) ── */
.auth-split-page {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 100dvh;
}

.auth-brand-side {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.auth-box {
  width: 100%;
  max-width: 420px;
}

/* ── Dashboard Layout & Modern Linear Sidebar ── */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100dvh - 65px);
}

.sidebar {
  background: rgba(15, 23, 42, 0.65);
  border-right: 1px solid var(--border-subtle);
  padding: 24px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.sidebar .user-info {
  padding: 12px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-gradient);
  color: var(--text-inverse);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.sidebar .user-info .name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.sidebar .user-info .email {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 14px;
  margin-bottom: 8px;
}

.sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: stretch !important;
}

.sidebar nav a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  color: var(--text-secondary) !important;
  font-size: 0.885rem !important;
  font-weight: 500 !important;
  border-radius: var(--radius-s) !important;
  position: relative !important;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.sidebar nav a svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.sidebar nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar nav a:hover svg {
  color: var(--text);
}

.sidebar nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.16) 0%, rgba(99, 102, 241, 0.08) 100%);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(6, 182, 212, 0.25);
}

.sidebar nav a.active svg {
  color: var(--brand-400);
}

.sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-gradient);
  box-shadow: 0 0 10px var(--brand-400);
}

/* Mobile Bottom Tab Bar */
.mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  flex: 1;
  height: 100%;
}

.mobile-tab-item.active {
  color: var(--brand-300);
}

.main-content {
  padding: var(--space-6) var(--space-7);
  max-width: 1300px;
}

.main-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

/* Stats Bento */
.stats-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  padding: var(--space-4) var(--space-5);
  text-align: left;
}

.stat-card .value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  /* Numbers/status stay mono; CJK glyphs (在线/标准免费版) fall through to
     the CJK sans stack in --font-mono instead of Windows SimSun. */
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* Progress Bar Visualizer for Memory/Disk */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-400);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-bar-fill.warning {
  background: var(--warning);
}

.progress-bar-fill.danger {
  background: var(--danger);
}

/* Token Management Items */
.token-list {
  list-style: none;
}

.token-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-s);
  margin-bottom: var(--space-3);
  transition: border-color 0.2s;
}

.token-item:hover {
  border-color: var(--border);
}

.token-item .token-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 17, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: #0d1322;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: var(--space-6);
  min-width: 420px;
  max-width: 90vw;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
}

/* Table Scroll Container */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-s);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

/* Footer */
footer {
  text-align: center;
  padding: var(--space-7) 0 var(--space-5);
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-8);
}

/* ── Motion Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Responsive & Mobile Breakpoints ── */
@media (max-width: 900px) {
  header {
    padding: 12px 0;
  }
  header .container {
    padding: 0 16px;
  }
  nav {
    gap: 8px !important;
  }
  .logo {
    font-size: 1.1rem;
    gap: 0;
  }
  .logo > svg {
    margin-right: 6px !important;
  }
  .logo .logo-host {
    font-size: inherit !important;
    margin-left: 0 !important;
  }
  .logo .logo-tld {
    font-size: inherit !important;
  }
  .btn-sm {
    padding: 5px 10px;
    font-size: 0.78rem;
  }
  .hero-security-pill {
    display: flex !important;
    border-radius: var(--radius-m) !important;
    padding: 12px 14px !important;
    font-size: 0.885rem !important;
    line-height: 1.55 !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .hero-security-pill .pill-icon {
    margin-top: 2px !important;
  }
  .hero-security-pill .arrow-icon {
    align-self: center !important;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
  .hero-mobile-floating {
    position: relative;
    right: auto;
    bottom: auto;
    width: 60%;
    max-width: 220px;
    margin: -40px auto 0;
    transform: none;
  }
  .dashboard-spotlight-card {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .features-bento {
    grid-template-columns: 1fr;
  }
  .bento-card.col-7, .bento-card.col-5, .bento-card.col-4,
  .bento-card.col-6, .bento-card.col-8, .bento-card.col-12 {
    grid-column: span 1 !important;
  }
  .timeline-grid {
    grid-template-columns: 1fr;
  }
  .auth-split-page {
    grid-template-columns: 1fr;
  }
  .auth-brand-side {
    display: none;
  }
  .dashboard {
    grid-template-columns: 1fr;
    padding-bottom: 60px;
  }
  .sidebar {
    display: none;
  }
  .mobile-tab-bar {
    display: flex;
  }
  .main-content {
    padding: var(--space-4) var(--space-4) 80px;
  }
  .stats-bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Mobile Scroll Performance (2026-09) ─────────────────────────────
 * 症状：手机浏览器滚动明显掉帧（首页 / console / 安全白皮书等），PC 正常。
 * 根因：sticky header、fixed 底部 tab bar、每张 .card 均带
 *   backdrop-filter blur(14~16px)；滚动时背后内容逐帧变化，移动 GPU
 *   每帧都要重新计算整片模糊（iOS Safari 尤甚），主线程被合成阻塞。
 * 修法：≤900px 关闭全部 backdrop-filter，用高不透明度底色补回视觉；
 *   桌面端（>900px）玻璃拟态效果保持原样。 */
@media (max-width: 900px) {
  header,
  .mobile-tab-bar,
  .modal-overlay,
  .sidebar,
  .mobile-accent-badge,
  .card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  header {
    background: rgba(9, 13, 22, 0.96);
  }
  .mobile-tab-bar {
    background: rgba(9, 13, 22, 0.98);
  }
  .card {
    background:
      linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)) padding-box,
      linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(6, 182, 212, 0.05) 50%, rgba(255, 255, 255, 0.02)) border-box;
  }
}
