/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green: #39FF14;
  --green-dim: #2bcc10;
  --green-glow: rgba(57, 255, 20, 0.15);
  --green-glow-strong: rgba(57, 255, 20, 0.3);
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --border: #222222;
  --text: #e0e0e0;
  --text-dim: #888888;
  --text-bright: #ffffff;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1100px;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 10, 0.85);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.4rem;
  text-shadow: 0 0 12px var(--green-glow-strong);
}

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

.nav-links a {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-bright); opacity: 1; }

/* ========== HERO ========== */
.hero {
  padding: 140px 24px 80px;
  text-align: center;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 32px;
  background: var(--green-glow);
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-bright);
  margin-bottom: 24px;
}

.glow {
  color: var(--green);
  text-shadow: 0 0 40px var(--green-glow-strong), 0 0 80px var(--green-glow);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ========== INSTALL BOX ========== */
.install-box {
  max-width: 720px;
  margin: 0 auto 56px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.install-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.install-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.install-tab:hover { color: var(--text); }

.install-tab.active {
  color: var(--green);
  background: var(--green-glow);
  border-bottom: 2px solid var(--green);
}

.install-panel {
  display: none;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-panel.active { display: flex; }

.install-panel code {
  color: var(--green);
  font-size: 0.95rem;
  white-space: nowrap;
  min-width: 0;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

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

/* ========== TUI MOCKUP ========== */
.tui-mockup {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
  background: #0c0c0c;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px var(--green-glow);
  text-align: left;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text);
}

/* Title bar */
.tui-titlebar {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
  gap: 10px;
}

.tui-titlebar-icon {
  color: var(--green);
  font-size: 0.9rem;
}

.tui-titlebar-text {
  color: var(--text);
  font-size: 0.8rem;
}

.tui-titlebar-controls {
  margin-left: auto;
  display: flex;
  gap: 12px;
}

.tui-ctrl {
  color: #666;
  font-size: 0.9rem;
  cursor: default;
}

.tui-close { color: #888; }

/* Body layout */
.tui-body {
  display: flex;
  min-height: 340px;
}

.tui-left {
  flex: 7;
  padding: 12px 16px;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.tui-right {
  flex: 3;
  padding: 0;
  min-width: 200px;
}

/* Banner */
.tui-banner {
  color: var(--green);
  font-size: 0.55rem;
  line-height: 1.15;
  text-align: center;
  margin: 4px 0 8px;
  text-shadow: 0 0 8px var(--green-glow);
  letter-spacing: 0.05em;
}

/* Info lines */
.tui-info {
  text-align: center;
  font-size: 0.78rem;
  padding: 2px 0;
}

/* Command palette */
.tui-palette {
  border: 1px solid var(--green);
  border-radius: 4px;
  margin-top: 4px;
  overflow: hidden;
}

.tui-palette-item {
  padding: 3px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tui-palette-item.active {
  background: var(--green);
  color: #000;
}

.tui-palette-item.active .t-dim {
  color: #1a4a10;
}

/* Input area */
.tui-input {
  border: 1px solid #2266cc;
  border-radius: 3px;
  padding: 4px 10px;
  margin-top: 4px;
  min-height: 20px;
}

.tui-cursor {
  color: var(--green);
}

/* Right panel */
.tui-panel {
  border: 1px solid var(--green);
  margin: 8px;
  border-radius: 4px;
  padding: 6px 10px;
  height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tui-panel-header {
  color: var(--green);
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
  padding-bottom: 4px;
}

.tui-panel-label {
  color: var(--green);
  font-weight: 600;
  font-size: 0.76rem;
  display: block;
}

.tui-panel-section {
  font-size: 0.74rem;
  padding: 2px 0;
}

.tui-panel-divider {
  border-top: 1px solid #333;
  margin: 4px 0;
}

/* Status bar */
.tui-statusbar {
  padding: 4px 12px;
  background: #111;
  border-top: 1px solid #333;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Shared helpers */
.t-green { color: var(--green); }
.t-cyan { color: #00d4ff; }
.t-dim { color: #555; }

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* TUI responsive */
@media (max-width: 640px) {
  .tui-right { display: none; }
  .tui-left { border-right: none; }
  .tui-banner { font-size: 0.5rem; }
  .tui-body { min-height: 260px; }
}

/* ========== SECTIONS ========== */
.section {
  padding: 100px 24px;
}

.section-dark {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.7;
}

/* ========== FEATURES GRID ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: rgba(57, 255, 20, 0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px var(--green-glow));
}

.feature-card h4 {
  color: var(--text-bright);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========== COMMANDS GRID ========== */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 40px;
}

.command {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.command:hover {
  border-color: rgba(57, 255, 20, 0.3);
}

.command code {
  color: var(--green);
  font-size: 0.85rem;
  white-space: nowrap;
}

.command span {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ========== PRIVACY ========== */
.privacy-section {
  display: flex;
  align-items: center;
  gap: 80px;
}

.privacy-content {
  flex: 1;
}

.privacy-list {
  list-style: none;
  margin-top: 24px;
}

.privacy-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--text);
  font-size: 0.95rem;
}

.check {
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
}

.privacy-visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-icon {
  font-size: 6rem;
  opacity: 0.15;
  filter: grayscale(1);
}

/* ========== STATS ========== */
.stats-section {
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}

.stat-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ========== FAQ ========== */
.faq-section {
  max-width: 720px;
}

.faq-list {
  margin-top: 40px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-bright);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--green);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-item p {
  padding: 0 0 20px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item p code {
  color: var(--green);
  background: var(--green-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== CTA ========== */
.cta-section {
  text-align: center;
  padding: 100px 24px;
}

.cta-install {
  margin: 32px auto;
  display: inline-block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 28px;
}

.cta-install code {
  color: var(--green);
  font-size: 1rem;
}

.cta-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--green);
  color: #000;
}

.btn-primary:hover {
  opacity: 1;
  box-shadow: 0 0 24px var(--green-glow-strong);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--green);
  color: var(--green);
  opacity: 1;
}

/* ========== FOOTER ========== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-bright); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }

  .hero { padding: 120px 16px 60px; }

  .features-grid { grid-template-columns: 1fr; }

  .commands-grid { grid-template-columns: 1fr; }

  .privacy-section { flex-direction: column; gap: 40px; }

  .privacy-visual { display: none; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .cta-links { flex-direction: column; align-items: center; }

  .footer-inner { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .install-panel code { font-size: 0.8rem; }
  .terminal-body { font-size: 0.72rem; padding: 14px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
