:root {
  --bg-color: #0f1115;
  --text-primary: #ffffff;
  --text-secondary: #a0a5b0;
  --accent-color: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.4);
  --card-bg: rgba(30, 33, 40, 0.6);
  --card-border: rgba(255, 255, 255, 0.1);
  --success-color: #10b981;
  --code-bg: #1a1d24;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1000px;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
}

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

/* Header & Hero */
header {
  text-align: center;
  padding: 4rem 0 3rem;
  animation: fadeIn 0.8s ease-out;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.05rem;
  background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* display: inline-block; Removed to allow badge to wrap below */
  width: fit-content;
  margin: 0;
  /* Reset margin since we are using flex gap */
}

.header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0.5rem;
  flex-wrap: nowrap;
}

.highlight {
  color: #4299e1;
  background: none;
  -webkit-text-fill-color: #4299e1;
}

.beta-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  margin-left: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: center;
}

.logo {
  width: 64px;
  height: 64px;
  margin-right: -12px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-top: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-color);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-color);
  animation: pulse 2s infinite;
}

.hero-text {
  color: var(--text-secondary);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
}

/* Sections */
section {
  margin-bottom: 4rem;
  animation: slideUp 0.8s ease-out;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

/* Configuration Box */
.config-box {
  background: var(--code-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.config-box:last-child {
  margin-bottom: 0;
}

.url-display {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-color);
  word-break: break-all;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.code-display {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  word-break: break-all;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.code-display code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

.endpoints-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.endpoint-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-family: monospace;
}

.method {
  font-weight: bold;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.method.get {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.method.post {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-top: 1px solid var(--card-border);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-secondary);
  transition: all 0.2s;
}

.footer-link:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Tools Table */
.tools-table-container {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.tools-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.tools-table th {
  background: rgba(255, 255, 255, 0.05);
  padding: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.tools-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
  vertical-align: top;
}

.tools-table tr:last-child td {
  border-bottom: none;
}

.tools-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.tool-name-cell {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-color);
  font-weight: 600;
}

.tool-args-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #e2e8f0;
}

.capsule {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

.platform-badges {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-badge.supported {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.platform-badge.experimental {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }

  .header-title {
    flex-wrap: nowrap;
    gap: 0;
  }

  h1 {
    font-size: 1.5rem;
    white-space: nowrap;
  }

  .logo {
    width: 32px;
    height: 32px;
    margin-right: -4px;
  }

  .beta-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
    margin-left: 0.2rem;
  }
}