/* ═══════════════════════════════════════
   AtomCode UI — 赛博朋克风格界面
   ═══════════════════════════════════════ */

:root {
  --bg: #0a0e17;
  --bg2: #111827;
  --card: #1a1f2e;
  --border: rgba(0, 240, 255, 0.12);
  --text: #e2e8f0;
  --muted: #6b7a8f;
  --cyan: #00f0ff;
  --blue: #3b82f6;
  --purple: #a855f7;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #fbbf24;
  --pink: #ec4899;
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ══ Canvas BG ══ */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ══ Navbar ══ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: .3s;
}

#navbar.scrolled {
  background: rgba(10, 14, 23, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #000;
}

.logo-text {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--cyan);
  -webkit-text-fill-color: var(--cyan);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  transition: .2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: .3s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); }

.btn-glow {
  padding: 8px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: .3s;
}

.btn-glow:hover {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(59, 130, 246, 0.15));
  box-shadow: var(--glow-cyan);
}

/* ══ Hero ══ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 24px 60px;
  text-align: center;
}

.hero-bg-shapes { position: absolute; inset: 0; overflow: hidden; z-index: 0; }

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.08;
  animation: float 12s infinite alternate;
}

.s1 { width: 500px; height: 500px; background: var(--cyan); top: -100px; left: -100px; }
.s2 { width: 400px; height: 400px; background: var(--purple); bottom: -80px; right: -80px; animation-delay: -4s; }
.s3 { width: 300px; height: 300px; background: var(--blue); bottom: 40%; left: 60%; animation-delay: -8s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-chip {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: var(--cyan);
  font-size: 13px;
  margin-bottom: 24px;
  letter-spacing: 1px;
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--blue) 40%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeUp 0.8s ease;
}

.hero-sub {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn-hero {
  padding: 14px 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: .3s;
  box-shadow: 0 4px 25px rgba(0, 240, 255, 0.2);
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 240, 255, 0.35);
}

.btn-hero-secondary {
  padding: 14px 32px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
  transition: .3s;
  background: rgba(255,255,255,0.03);
}

.btn-hero-secondary:hover {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
  box-shadow: var(--glow-cyan);
}

.hero-stats-mini {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.mini-stat { text-align: center; }

.mini-val {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.mini-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* ══ Section Common ══ */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header p {
  color: var(--muted);
  font-size: 15px;
}

/* ══ Features ══ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: .3s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.4;
}

.feature-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.fc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ══ Terminal ══ */
.terminal-section {
  padding-top: 40px;
  padding-bottom: 40px;
}

.terminal-box {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1117;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.term-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.term-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.term-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
}

.term-clear {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
}

.term-clear:hover { color: var(--text); border-color: var(--text); }

.term-body {
  padding: 16px;
  min-height: 280px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
}

.term-line { margin-bottom: 4px; word-break: break-all; }

.term-line .prompt { color: var(--green); }
.term-line .cmd { color: var(--text); }
.term-line.output .out { display: block; color: var(--muted); }

.typing { opacity: 0.7; }
.cursor-blink { animation: cursorBlink 0.8s infinite; color: var(--cyan); }

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.term-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #0d1117;
}

.term-input-line .prompt-sm {
  color: var(--green);
  font-family: monospace;
  font-size: 14px;
  font-weight: bold;
}

#term-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 14px;
  outline: none;
}

#term-input::placeholder { color: #4a4a5a; }

/* ══ Stats ══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card-big {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  transition: .3s;
}

.stat-card-big:hover {
  border-color: rgba(0, 240, 255, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.stat-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.stat-ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: #1e293b; stroke-width: 8; }
.ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.cpu-ring .ring-fg { stroke: var(--cyan); filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3)); }
.mem-ring .ring-fg { stroke: var(--purple); filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.3)); }
.disk-ring .ring-fg { stroke: var(--green); filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.3)); }

.ring-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-card-big h4 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-sub { font-size: 12px; color: #4a5a6a; }

.stat-icon-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.load-icon { font-size: 42px; margin-bottom: 8px; }
.load-num { font-size: 32px; font-weight: 700; color: var(--blue); }

/* ══ About ══ */
.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 20px;
}

.about-text p strong {
  color: var(--text);
}

.about-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tag {
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.1);
  font-size: 12px;
  color: var(--cyan);
}

.about-info {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { color: var(--text); }

/* ══ Footer ══ */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-inner p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.footer-inner a {
  color: var(--cyan);
  text-decoration: none;
}

.footer-links .sep {
  color: #3a4a5a;
  margin: 0 8px;
}

/* ══ Language Switcher ══ */
.nav-lang {
  display: flex;
  gap: 4px;
  margin-right: 12px;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: .2s;
  font-family: inherit;
  font-weight: 600;
}

.lang-btn:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.lang-btn.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ══ Plugin Carousel ══ */
.plugin-section {
  padding-top: 60px;
  padding-bottom: 40px;
}

.plugin-carousel {
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.plugin-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s ease;
  padding: 8px 0;
}

.plugin-card {
  min-width: calc(33.333% - 12px);
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  transition: .3s;
}

.plugin-card:hover {
  border-color: rgba(0, 240, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.plugin-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.plugin-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.plugin-card p {
  font-size: 12px;
  color: var(--muted);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.carousel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.carousel-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.05);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a3a4a;
  transition: .3s;
  cursor: pointer;
}

.carousel-dots span.dot-active {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

/* ══ AI Demo ══ */
.ai-demo-section {
  padding-top: 40px;
  padding-bottom: 60px;
}

.ai-demo-box {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0d1117;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.ai-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid var(--border);
}

.ai-demo-title {
  font-size: 13px;
  color: var(--muted);
  font-family: monospace;
}

.btn-ai-demo {
  padding: 6px 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  font-weight: 700;
  font-size: 12px;
  border: none;
  cursor: pointer;
  transition: .3s;
  font-family: inherit;
}

.btn-ai-demo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.ai-demo-body {
  padding: 20px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
}

.ai-demo-placeholder {
  color: #4a4a5a;
  text-align: center;
  padding: 60px 20px;
  font-size: 14px;
}

.ai-demo-file {
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 12px;
  padding: 4px 10px;
  background: rgba(0, 240, 255, 0.04);
  border-radius: 4px;
  display: inline-block;
}

.ai-demo-body pre {
  background: #0a0e17;
  border: 1px solid rgba(0, 240, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
}

.ai-demo-body code {
  color: #c9d1d9;
  white-space: pre;
}

/* ══ Terminal Copy Button ══ */
.term-copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: .2s;
  line-height: 1;
}

.term-copy-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ══ Animations ══ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══ Responsive ══ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-content h1 { font-size: clamp(2.5rem, 10vw, 3.5rem); }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats-mini { gap: 24px; }
  .mini-val { font-size: 22px; }

  /* ══ Language Switcher ══ */
  .lang-btn { font-size: 13px; padding: 4px 10px; }

  /* ══ Copy Button ══ */
  .term-copy-btn { font-size: 11px; padding: 3px 8px; }

  /* ══ AI Demo Section ══ */
  #ai-demo.ai-demo-section { padding: 40px 16px; }

  /* ══ Plugin Carousel ══ */
  .plugin-section { padding: 40px 16px; }
  .plugin-track { gap: 12px; }
  .carousel-btn { width: 32px; height: 32px; font-size: 14px; }

  /* ══ i18n / Data Attributes ══ */
  [data-i18n] { font-size: 13px; }
}
