/* ============================================================
   VPN MCP — Shared Styles
   Dark terminal aesthetic, green/cyan accents
   ============================================================ */

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

:root {
  --bg-primary:    #0a0e14;
  --bg-secondary:  #0f1319;
  --bg-card:       #131820;
  --bg-code:       #0d1117;
  --bg-input:      #1a1f2b;
  --border:        #1e2736;
  --border-focus:  #00e5a0;
  --text-primary:  #c5cdd8;
  --text-secondary:#7a8599;
  --text-muted:    #4a5568;
  --accent-green:  #00e5a0;
  --accent-cyan:   #22d3ee;
  --accent-blue:   #3b82f6;
  --accent-red:    #f43f5e;
  --accent-yellow: #fbbf24;
  --accent-orange: #f97316;
  --glow-green:    rgba(0, 229, 160, 0.15);
  --glow-cyan:     rgba(34, 211, 238, 0.12);
  --glow-red:      rgba(244, 63, 94, 0.12);
  --mono:          'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  --sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:        8px;
  --radius-lg:     12px;
  --transition:    0.2s ease;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle scan-line overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--mono);
  color: #e8edf4;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; }

p { color: var(--text-primary); }
a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-green); }

code, .mono { font-family: var(--mono); }

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

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

.nav-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand .prompt {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.3rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-green);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--accent-green); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--accent-green); }
.nav-links a.active::after { width: 100%; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-green);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #00ffb3;
  color: var(--bg-primary);
  box-shadow: 0 0 24px var(--glow-green);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-copy {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--mono);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: rgba(0, 229, 160, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* --- Terminal Block --- */
.terminal {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.terminal-body .prompt-symbol {
  color: var(--accent-green);
  user-select: none;
}

.terminal-body .cmd {
  color: #e8edf4;
}

.terminal-body .output {
  color: var(--text-secondary);
}

.terminal-body .success {
  color: var(--accent-green);
}

.terminal-body .error {
  color: var(--accent-red);
}

.terminal-body .info {
  color: var(--accent-cyan);
}

.terminal-body .warn {
  color: var(--accent-yellow);
}

.terminal-body .dim {
  color: var(--text-muted);
}

/* --- Code Blocks --- */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-primary);
}

pre .key   { color: var(--accent-cyan); }
pre .str   { color: var(--accent-green); }
pre .punct { color: var(--text-muted); }

code {
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent-cyan);
  border: 1px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

tr:hover td {
  background: rgba(0, 229, 160, 0.03);
}

td code {
  font-size: 0.85rem;
  white-space: nowrap;
}

/* --- Comparison Layout --- */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.comparison-panel {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.comparison-panel.without {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.05), transparent);
  border-color: rgba(244, 63, 94, 0.2);
}

.comparison-panel.with {
  background: linear-gradient(135deg, rgba(0, 229, 160, 0.05), transparent);
  border-color: rgba(0, 229, 160, 0.2);
}

.comparison-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comparison-panel.without .comparison-label {
  color: var(--accent-red);
}

.comparison-panel.with .comparison-label {
  color: var(--accent-green);
}

.comparison-panel ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.comparison-panel ul li {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}

.comparison-panel.without ul li::before {
  content: '\00d7';
  position: absolute;
  left: 0;
  color: var(--accent-red);
  font-weight: 700;
}

.comparison-panel.with ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-weight: 700;
}

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.step {
  position: relative;
}

.step-number {
  font-family: var(--mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: rgba(0, 229, 160, 0.1);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.step h3 {
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Use Cases --- */
.use-cases {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.use-case {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
}

.use-case-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.use-case-content h3 {
  margin-bottom: 0.75rem;
  color: #e8edf4;
}

/* --- Pricing --- */
.pricing-card {
  background: linear-gradient(135deg, var(--bg-card), rgba(0, 229, 160, 0.03));
  border: 1px solid rgba(0, 229, 160, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  max-width: 500px;
  margin: 2rem auto 0;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
}

.pricing-amount {
  font-family: var(--mono);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-green);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.pricing-unit {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.pricing-details {
  list-style: none;
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pricing-details li {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pricing-details li span {
  color: var(--accent-green);
  margin-right: 0.3rem;
}

/* --- Node Info --- */
.node-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.node-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.node-info .highlight {
  color: var(--accent-cyan);
  font-family: var(--mono);
}

/* --- Section Headers --- */
.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
  display: block;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 650px;
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer-links a:hover { color: var(--accent-green); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Pay Page --- */
.pay-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.pay-step {
  margin-bottom: 2rem;
}

.payment-address-box {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  margin: 1rem 0;
}

.payment-address {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--accent-cyan);
  word-break: break-all;
  margin-bottom: 0.75rem;
  user-select: all;
}

.payment-amount {
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0.5rem 0;
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.qr-container svg {
  border-radius: var(--radius);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.9rem;
  margin: 1rem 0;
}

.status-indicator.waiting {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: var(--accent-yellow);
}

.status-indicator.success {
  background: rgba(0, 229, 160, 0.08);
  border: 1px solid rgba(0, 229, 160, 0.25);
  color: var(--accent-green);
}

.status-indicator.error {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--accent-red);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.waiting .status-dot {
  background: var(--accent-yellow);
  animation: pulse 2s infinite;
}

.status-indicator.success .status-dot {
  background: var(--accent-green);
}

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

.api-key-box {
  background: var(--bg-code);
  border: 1px solid rgba(0, 229, 160, 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}

.api-key-value {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent-green);
  word-break: break-all;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.api-key-value span {
  flex: 1;
  user-select: all;
}

.countdown {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.countdown.urgent {
  color: var(--accent-red);
}

.config-preview {
  position: relative;
}

.config-preview .btn-copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* --- Setup Page --- */
.setup-content {
  max-width: 800px;
  margin: 0 auto;
}

.setup-section {
  margin-bottom: 3rem;
}

.setup-section h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.setup-section h2 .step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-green);
  color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.setup-section p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.install-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.install-option {
  position: relative;
}

.install-option label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.3rem;
}

/* --- Utility --- */
.text-green  { color: var(--accent-green); }
.text-cyan   { color: var(--accent-cyan); }
.text-red    { color: var(--accent-red); }
.text-yellow { color: var(--accent-yellow); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden { display: none !important; }

.inline-flex {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  section { padding: 3rem 0; }

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

  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .use-case {
    grid-template-columns: 1fr;
  }

  .use-case-icon {
    width: 40px;
    height: 40px;
  }

  .install-options {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .nav-links a {
    font-size: 0.75rem;
  }

  .pricing-amount {
    font-size: 2.2rem;
  }

  .terminal-body {
    font-size: 0.75rem;
  }

  pre {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.35rem; }

  .container { padding: 0 1rem; }

  .nav-brand .prompt { display: none; }

  .pricing-card { padding: 1.5rem; }

  .footer-links { flex-direction: column; gap: 0.75rem; }
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Staggered children */
.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.2s; }
.stagger > *:nth-child(4) { animation-delay: 0.3s; }
