:root {
  --bg-dark: #080c14;
  --bg-card: #0f172a;
  --border-color: #1e293b;
  --border-glow: #38bdf8;
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --cyan-glow: #06b6d4;
  --purple-glow: #818cf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 450px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(129, 140, 248, 0.08) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(8, 12, 20, 0.8);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  font-size: 1.5rem;
}

.highlight {
  color: var(--primary);
}

.highlight-cyan {
  color: var(--cyan-glow);
}

.tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.08em;
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 600;
}

.pulse {
  color: var(--success);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan-glow) 100%);
  color: #020817;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #1e293b;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #334155;
}

.btn-large {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  width: 100%;
}

/* Main */
.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 4rem;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.85rem;
  background: rgba(129, 140, 248, 0.12);
  color: var(--purple-glow);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.arrow {
  color: var(--text-muted);
  font-weight: 300;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 1.75rem;
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

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

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Playground */
.playground-section {
  margin-bottom: 5rem;
}

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

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
}

.playground-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 1rem 1.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(56, 189, 248, 0.05);
}

.tab-content {
  display: none;
  padding: 1.5rem;
}

.tab-content.active {
  display: block;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

.pane {
  display: flex;
  flex-direction: column;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #0d1320;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-price {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.status-tag {
  background: #1e293b;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.code-editor {
  flex: 1;
  min-height: 280px;
  background: transparent;
  border: none;
  color: #e2e8f0;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  padding: 1rem;
  resize: vertical;
  outline: none;
}

.terminal-log {
  flex: 1;
  min-height: 180px;
  max-height: 240px;
  overflow-y: auto;
  background: #05070c;
  color: #38bdf8;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  padding: 1rem;
  white-space: pre-wrap;
  line-height: 1.6;
}

.action-row {
  padding: 1rem;
  background: #0d1320;
  border-top: 1px solid var(--border-color);
}

.result-box {
  padding: 1rem;
  background: #090d16;
  border-top: 1px solid var(--border-color);
}

.result-box.hidden {
  display: none;
}

.result-title {
  color: var(--success);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.result-url a {
  color: var(--primary);
  font-weight: 600;
  word-break: break-all;
}

.preview-frame {
  width: 100%;
  height: 200px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 0.75rem;
  background: #fff;
}

/* Tab 2: API Form */
.api-form-box {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-row input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #090d16;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

.form-row input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Tab 3: MCP & Code */
.code-display pre, .code-box pre {
  background: #05070c;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.tool-list {
  margin-top: 1rem;
  padding-left: 1.5rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.tool-list code {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
}
