:root {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #1c2128;
  --text: #e6edf3;
  --text-2: #8b949e;
  --text-3: #484f58;
  --border: #30363d;
  --accent: #22C55E;
  --accent-light: rgba(34, 197, 94, 0.15);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.3;
}

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

a:hover {
  opacity: 0.8;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 197, 94, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.logo {
  margin-bottom: 24px;
  color: var(--accent);
}

.logo svg {
  width: 64px;
  height: 64px;
}

.logo img {
  width: 64px;
  height: 64px;
}

.hero h1 {
  font-size: 56px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 20px;
  color: var(--text-2);
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero-preview {
  margin-top: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.preview-window {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.preview-titlebar {
  background: var(--bg-2);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.preview-dots {
  display: flex;
  gap: 6px;
  margin-right: 12px;
}

.preview-dots .dot {
  width: 10px;
  height: 10px;
}

.preview-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.preview-code {
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.preview-code .prompt {
  color: var(--accent);
  margin-right: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #16a34a;
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

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

.btn-secondary:hover {
  background: var(--border);
  opacity: 1;
  transform: translateY(-2px);
}

.features {
  padding: 100px 0;
  background: var(--bg-2);
}

.features h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: all 0.2s;
  cursor: pointer;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(34, 197, 94, 0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.6;
}

.demo-section {
  padding: 100px 0;
  background: var(--bg);
}

.demo-section h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 12px;
}

.demo-subtitle {
  text-align: center;
  color: var(--text-2);
  margin-bottom: 48px;
  font-size: 16px;
}

.demo-window {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.demo-titlebar {
  background: var(--bg-3);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.titlebar-dots {
  display: flex;
  gap: 8px;
  margin-right: 16px;
}

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

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

.titlebar-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}

.titlebar-actions {
  display: flex;
  gap: 8px;
}

.titlebar-btn {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.titlebar-btn.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.demo-log-viewer {
  height: 400px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px;
}

.log-row {
  display: flex;
  align-items: center;
  height: 26px;
  line-height: 26px;
  padding: 0 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.08s;
  border-radius: 4px;
}

.log-row:hover {
  background: var(--bg-3);
}

.log-row.is-marked {
  background: rgba(100, 210, 255, 0.15);
  box-shadow: inset 3px 0 0 #64d2ff;
}

.col-ts {
  width: 84px;
  min-width: 84px;
  padding-right: 10px;
  color: var(--text-3);
  font-size: 11px;
  flex-shrink: 0;
}

.col-badge {
  width: 52px;
  min-width: 52px;
  padding-right: 14px;
  flex-shrink: 0;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  width: 48px;
  text-align: center;
}

.badge-alert { color: #FF3B30; }
.badge-error { color: #FF453A; }
.badge-warn  { color: #FF9F0A; }
.badge-info  { color: #64D2FF; }
.badge-debug { color: #30D158; }
.badge-trace { color: #BF5AF2; }

.col-msg {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.col-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
  flex-shrink: 0;
  margin-left: 8px;
  align-self: flex-end;
  margin-bottom: 2px;
}

.log-row:hover .col-actions {
  opacity: 1;
}

.action-btn {
  cursor: pointer;
  width: 20px;
  height: 20px;
  color: var(--text-3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.action-btn:hover {
  background: var(--bg-2);
  color: var(--text);
}

.quickstart {
  padding: 100px 0;
  background: var(--bg-2);
}

.quickstart h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 40px;
}

.code-block {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}

.code-block:hover .copy-btn {
  opacity: 1;
}

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

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

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.comment {
  color: var(--text-3);
}

.quickstart-note {
  text-align: center;
  color: var(--text-2);
  margin-top: 24px;
  font-size: 16px;
}

.quickstart-note code {
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.cursor {
  color: var(--accent);
  animation: blink 1s infinite;
}

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

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.footer {
  padding: 40px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}

.footer-logo svg {
  width: 20px;
  height: 20px;
}

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

.footer-links a {
  color: var(--text-2);
  font-size: 14px;
}

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

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .cursor { animation: none; }
  .feature-card { transition: none; }
  .btn { transition: none; }
  .log-row { transition: none; }
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero h1 {
    font-size: 40px;
  }

  .tagline {
    font-size: 18px;
  }

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

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

  .demo-log-viewer {
    height: 300px;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}
