:root {
  --bg: #0e0e10;
  --surface: #1a1a1f;
  --border: #2e2e35;
  --accent: #f5a623;
  --accent-secondary: #4ec994;
  --text-primary: #e8e8e8;
  --text-secondary: #888892;
  --error: #e05c5c;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius: 8px;
  --transition: 200ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 50 0 L 0 0 0 50' fill='none' stroke='rgba(255,255,255,0.20)' stroke-width='1.2' stroke-dasharray='4 6'/%3E%3C/svg%3E");
  background-size: 50px 50px;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--accent);
  color: var(--bg);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14, 14, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-docs {
  color: var(--text-primary);
  font-size: 14px;
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: color var(--transition);
}

.nav-github:hover {
  color: var(--text-primary);
  opacity: 1;
}

.nav-github svg {
  width: 20px;
  height: 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
}

.section-title::before {
  background: linear-gradient(270deg, var(--border) 0%, transparent 100%);
}

.section-title::after {
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

.hero {
  padding-top: 144px;
  padding-bottom: 80px;
  text-align: center;
}

.hero-title {
  font-size: clamp(36px, 8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.5;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 650px;
  margin: 0 auto 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  justify-content: flex-end;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.terminal-toggle {
  display: flex;
  background: var(--bg);
  border-radius: 4px;
  padding: 2px;
  border: 1px solid var(--border);
}

.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-btn:hover {
  color: var(--text-primary);
}

.toggle-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.terminal-body {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.terminal-prompt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
  flex-shrink: 0;
  user-select: none;
}

.terminal-command {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 2px;
  flex-shrink: 0;
}

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

.terminal-copy {
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

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

.terminal-copy svg {
  width: 16px;
  height: 16px;
}

.terminal-copy.copied {
  color: var(--accent-secondary);
  border-color: var(--accent-secondary);
}

/* Demo disclaimer */
.demo-disclaimer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  text-align: center;
}

.demo-disclaimer svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--accent);
  opacity: 0.7;
}

/* Interactive Terminal Demo */
.demo-terminal-wrapper {
  max-width: 100%;
  width: fit-content;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0e0e10;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.demo-terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.demo-terminal-dots {
  display: flex;
  gap: 6px;
}

.demo-terminal-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

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

.demo-terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  text-align: center;
  margin-right: 48px; /* offset the dots for visual centering */
}

#terminal-container {
  width: 100%;
  height: 384px; /* 16 rows × 24px (fontSize:20 × lineHeight:1.2) */
  padding: 0;
  box-sizing: border-box;
  text-align: left;
  overflow: hidden;
}

#terminal-container .xterm-viewport::-webkit-scrollbar {
  width: 4px;
}
#terminal-container .xterm-viewport::-webkit-scrollbar-track {
  background: transparent;
}
#terminal-container .xterm-viewport::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  transition: background var(--transition), box-shadow var(--transition);
}
#terminal-container .xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(245, 166, 35, 0.35);
}
.demo-terminal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.connected {
  background: var(--accent-secondary);
  animation: none;
}

.status-dot.error {
  background: var(--error);
  animation: none;
}

.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

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

.features {
  background: transparent;
  position: relative;
  overflow: hidden;
}


.section-heading {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  text-align: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 20px;
}

.feature-card {
  background: rgba(26, 26, 31, 0.3);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: rgba(26, 26, 31, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bento-main {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(245, 166, 35, 0.05) 0%, rgba(26, 26, 31, 0.4) 100%);
}

.bento-tall {
  grid-row: span 2;
  justify-content: center;
}

.feature-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 24px;
  color: var(--accent);
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

@media (max-width: 992px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-main {
    grid-column: span 2;
  }
  .bento-tall {
    grid-row: span 1;
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .bento-main, .bento-tall {
    grid-column: span 1;
  }
}

.how-it-works {
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.66% + 20px);
  right: calc(16.66% + 20px);
  height: 1px;
  background: var(--border);
}

.step {
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  max-width: 240px;
  margin: 0 auto;
}

.step-command {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--accent);
  margin-top: 12px;
  display: inline-block;
}

.contact {
  text-align: center;
}

.footer {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-link svg {
  width: 18px;
  height: 18px;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Docs Pages */
.docs-header {
  padding-top: 120px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.docs-container {
  max-width: 800px;
}

.docs-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
}

.docs-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
}

.docs-content {
  padding-top: 40px;
  padding-bottom: 80px;
}

.docs-content h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--accent);
}

.docs-content h3 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.docs-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.docs-content ul {
  margin-bottom: 24px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.docs-content li {
  margin-bottom: 8px;
}

.docs-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  margin: 24px 0;
}

.docs-content code {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
}

.docs-content p code, .docs-content li code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--accent);
}

.docs-content a {
  color: var(--accent);
  text-decoration: underline;
}

.docs-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.docs-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.docs-tab:hover {
  color: var(--text-primary);
  background: var(--surface);
}

.docs-tab.active {
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
}

.docs-tab-content {
  display: none;
}

.docs-tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

.docs-content hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .nav-links {
    gap: 16px;
  }

  .github-text {
    display: none;
  }

  .hero {
    padding-top: 104px;
    padding-bottom: 60px;
  }

  .hero-subtitle {
    margin-bottom: 36px;
  }

  .terminal-body {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
  }

  .terminal-prompt {
    flex-shrink: 0;
    display: block;
    margin: 0;
  }

  .terminal-command {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    display: block;
  }

  .terminal-cursor {
    flex-shrink: 0;
    display: block;
    margin: 0;
  }

  .terminal-copy {
    flex-shrink: 0;
    margin: 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps::before {
    display: none;
  }

  .docs-tabs {
    gap: 8px;
  }

  .docs-tab {
    font-size: 13px;
    padding: 8px 12px;
    flex: 1;
    text-align: center;
  }

  .footer {
    padding: 32px 0;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 20px;
  }
}