@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:         #05080f;
  --surface:    #0b0f1a;
  --card:       #111827;
  --card-hover: #161f30;
  --border:     #1e2d42;
  --border-light:#253548;
  --text:       #e2e8f0;
  --text-dim:   #64748b;
  --text-mid:   #94a3b8;
  --violet:     #7c5fff;
  --violet-dim: #5a3fd4;
  --violet-glow:rgba(124,95,255,0.18);
  --cyan:       #22d3ee;
  --cyan-dim:   #0e9aaf;
  --danger:     #f43f5e;
  --success:    #22c55e;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, sans-serif;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(5, 8, 15, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 10px var(--violet); display: inline-block; }

.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-email { color: var(--text-dim); font-size: 0.85rem; margin-right: 0.4rem; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { background: var(--surface); text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--violet), var(--violet-dim));
  color: #fff;
  box-shadow: 0 0 20px rgba(124,95,255,0.3);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 0 28px rgba(124,95,255,0.45); }

.btn-full { width: 100%; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: default; pointer-events: none; }
.btn-ghost { border-color: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: var(--danger); background: rgba(244,63,94,0.08); }

/* ─── FORMS ─── */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  resize: vertical;
}
textarea { font-family: var(--mono); font-size: 0.83rem; min-height: 180px; }
input:focus, textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124,95,255,0.15);
}

/* ─── CARDS ─── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-bottom: 1.2rem;
}
.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 1.2rem;
  letter-spacing: -0.02em;
}

/* ─── CODE BOX ─── */
.codebox {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1rem 3.5rem 1rem 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
  word-break: break-all;
  line-height: 1.7;
}
.codebox .copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.72rem;
  font-family: var(--sans);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.15s;
}
.codebox .copy-btn:hover { color: var(--text); border-color: var(--border-light); }

/* ─── ERROR / NOTICE ─── */
.form-error {
  color: var(--danger);
  font-size: 0.82rem;
  margin-top: 0.6rem;
  display: none;
}
.form-error.show { display: block; }

.notice {
  font-size: 0.78rem;
  color: var(--text-dim);
  border-left: 2px solid var(--violet);
  padding-left: 0.8rem;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ─── AUTH LAYOUT ─── */
.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}
.auth-card h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.3rem;
}
.auth-card p.sub { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 1.8rem; }
.auth-footer { text-align: center; font-size: 0.85rem; color: var(--text-dim); margin-top: 1.2rem; }

/* ─── DASHBOARD TABS ─── */
.dash-wrap { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.dash-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  margin: 0;
}
.dash-subtitle { color: var(--text-dim); font-size: 0.88rem; margin: 0.2rem 0 0; }

.tab-bar {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 1.8rem;
}
.tab-btn {
  flex: 1;
  padding: 0.55rem 1rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: 0.15s;
  text-align: center;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  font-weight: 600;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── SCRIPT ENTRIES ─── */
.script-list { display: flex; flex-direction: column; gap: 0.6rem; }
.script-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  transition: border-color 0.15s;
}
.script-entry:hover { border-color: var(--border-light); }
.script-id {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cyan);
}
.script-meta { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.15rem; }
.script-actions { display: flex; gap: 0.4rem; }
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
}
.empty-state svg { opacity: 0.3; margin-bottom: 0.8rem; }
.empty-state p { margin: 0; font-size: 0.9rem; }

/* ─── RESULT BOX ─── */
.result-box {
  margin-top: 1.2rem;
  display: none;
}
.result-box.show { display: block; }
.result-label { font-size: 0.8rem; color: var(--text-mid); font-weight: 500; margin-bottom: 0.4rem; }

/* ─── FOOTER ─── */
footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
}

/* ─── LANDING: HERO ─── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem 5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,95,255,0.1);
  border: 1px solid rgba(124,95,255,0.3);
  border-radius: 100px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  color: var(--violet);
  font-weight: 500;
  margin-bottom: 1.4rem;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 6px var(--violet); }
.hero-title {
  font-family: var(--display);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 1.2rem;
}
.hero-title .hl {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  color: var(--text-mid);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 2rem;
  max-width: 440px;
}
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ─── TERMINAL CARD ─── */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-label { font-size: 0.75rem; color: var(--text-dim); margin-left: auto; font-family: var(--mono); }
.terminal-body { padding: 1.4rem 1.2rem; font-family: var(--mono); font-size: 0.82rem; line-height: 1.8; }
.t-dim { color: var(--text-dim); }
.t-violet { color: var(--violet); }
.t-cyan { color: var(--cyan); }
.t-green { color: #4ade80; }
.t-cursor { display: inline-block; width: 8px; height: 14px; background: var(--violet); vertical-align: middle; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ─── FEATURES ─── */
.features-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.section-label {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: var(--display);
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
.section-sub { text-align: center; color: var(--text-dim); font-size: 0.95rem; max-width: 500px; margin: 0 auto 3rem; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(124,95,255,0.12);
  border: 1px solid rgba(124,95,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.feature-card h3 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.feature-card p { margin: 0; color: var(--text-dim); font-size: 0.875rem; line-height: 1.6; }

/* ─── CTA SECTION ─── */
.cta-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 6rem;
}
.cta-card {
  background: linear-gradient(135deg, rgba(124,95,255,0.12), rgba(34,211,238,0.06));
  border: 1px solid rgba(124,95,255,0.25);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
}
.cta-card h2 {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
}
.cta-card p { color: var(--text-mid); margin: 0 0 2rem; font-size: 1rem; }
.cta-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ─── BG GRID ─── */
.hero-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 60% 40% at 70% 20%, rgba(124,95,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 70%, rgba(34,211,238,0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── DIVIDER ─── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .hero-section { grid-template-columns: 1fr; padding: 3rem 1.2rem 2rem; gap: 2rem; }
  .hero-title { font-size: 2.2rem; }
  .features-grid { grid-template-columns: 1fr; }
  nav { padding: 0 1.2rem; }
  .dash-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .tab-btn { font-size: 0.8rem; padding: 0.5rem 0.6rem; }
}
