/* tsrun site styles */

:root {
  /* Dark theme (default) */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --border: #30363d;
  --code-bg: #161b22;
  --success: #3fb950;
  --warning: #d29922;
  --error: #f85149;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;

  --max-width: 1200px;
  --nav-height: 60px;
  --radius: 8px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a:hover {
  color: var(--accent-hover);
}

code, pre {
  font-family: var(--font-mono);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.github-link {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

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

/* Main content */
main {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero section */
.hero {
  padding: 80px 0;
  text-align: center;
}

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

.hero .tagline {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero .description {
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

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

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

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

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

/* Feature cards */
.features {
  padding: 60px 0;
}

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

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

/* Code blocks */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-header .lang {
  font-weight: 500;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: all var(--transition);
}

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

.code-content {
  padding: 16px;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
}

.code-content code {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Install section */
.install {
  padding: 60px 0;
  background: var(--bg-secondary);
}

.install-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.install-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.install-card h3 {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Example gallery */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.example-card {
  display: block;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.example-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.example-card h4 {
  margin-bottom: 8px;
  color: var(--text-primary);
}

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

/* Documentation */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 48px 0;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  height: fit-content;
}

.docs-sidebar h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  margin-top: 24px;
}

.docs-sidebar h4:first-child {
  margin-top: 0;
}

.docs-sidebar ul {
  list-style: none;
}

.docs-sidebar li {
  margin-bottom: 4px;
}

.docs-sidebar a {
  display: block;
  padding: 6px 12px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

.docs-content h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.docs-content h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

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

.docs-content p {
  margin-bottom: 16px;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

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

.docs-content code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}

.docs-content pre code {
  background: none;
  padding: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 0.875rem;
}

td {
  font-size: 0.9rem;
}

/* Footer */
.footer {
  padding: 48px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

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

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-copy {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero .tagline {
    font-size: 1.2rem;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    display: none;
  }

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

/* Syntax highlighting - minimal theme */
.hljs-keyword { color: #ff7b72; }
.hljs-string { color: #a5d6ff; }
.hljs-number { color: #79c0ff; }
.hljs-function { color: #d2a8ff; }
.hljs-class { color: #7ee787; }
.hljs-comment { color: var(--text-muted); font-style: italic; }
.hljs-built_in { color: #ffa657; }
.hljs-type { color: #7ee787; }
.hljs-variable { color: #ffa657; }
.hljs-attr { color: #79c0ff; }
.hljs-property { color: #79c0ff; }
.hljs-title { color: #d2a8ff; }

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  background: var(--accent);
  color: white;
}

/* Use Cases section with tabs */
.use-cases {
  padding: 60px 0;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  display: none;
}

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

.example-desc {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .tabs {
    gap: 0;
  }

  .tab {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
}

/* CTA Section */
.cta {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  margin: 60px 0;
}

.cta h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.cta p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}
