/* Base & Theme CSS Variables */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-card: #18181b;
  --bg-card-hover: #222226;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.06);

  --text-primary: #ededed;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #ffffff;
  --accent-inverse: #000000;
  --accent-gradient: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-border: rgba(255, 255, 255, 0.15);

  --code-bg: #0d0d0f;
  --code-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-subtle: rgba(0, 0, 0, 0.05);

  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;

  --accent: #000000;
  --accent-inverse: #ffffff;
  --accent-gradient: linear-gradient(135deg, #09090b 0%, #52525b 100%);
  --badge-bg: rgba(0, 0, 0, 0.04);
  --badge-border: rgba(0, 0, 0, 0.1);

  --code-bg: #f4f4f5;
  --code-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography & Links */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--code-bg);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--code-border);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0.75rem 0;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.vercel-logo {
  flex-shrink: 0;
}

.brand-text .highlight {
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.925rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-inverse);
  border-color: var(--accent);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}

.icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-card-hover);
}

/* Hero Section */
.hero {
  padding: 5.5rem 0 3.5rem;
  text-align: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1.25rem;
  max-width: 820px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.copy-badge {
  font-size: 0.725rem;
  text-transform: uppercase;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* Terminal Preview */
.terminal-preview {
  width: 100%;
  max-width: 640px;
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-align: left;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
  padding-right: 32px;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}

.prompt {
  color: #22c55e;
  font-weight: bold;
  margin-right: 6px;
}

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

.term-link {
  color: #38bdf8;
  text-decoration: underline;
}

.term-success {
  color: #4ade80;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--text-muted);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Interactive Demo */
.demo-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
}

.demo-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.counter-display {
  font-size: 3.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.demo-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.demo-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.demo-form input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  font-family: var(--font-sans);
}

.demo-form input:focus {
  border-color: var(--accent);
}

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

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  max-width: 880px;
  margin: 0 auto;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

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

.step-tip {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  color: var(--text-muted);
}

.step-tip a {
  text-decoration: underline;
  color: var(--text-primary);
}

/* Footer */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  background: var(--bg-primary);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-right p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.25s ease forwards;
  max-width: 350px;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.fade-out {
  animation: slideOut 0.25s ease forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
