:root {
  --bg: #050505;
  --panel: #0b0b0f;
  --panel-alt: #101018;
  --text: #f7f7f2;
  --muted: #a7a7a7;
  --accent: #ffde4d;
  --accent-strong: #ffd000;
  --danger: #ff5f5f;
  --border: #1f1f24;
  --glow: 0 0 25px rgba(255, 222, 77, 0.35);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 10%, rgba(255, 222, 77, 0.04), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(255, 222, 77, 0.06), transparent 25%),
    var(--bg);
}

body.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(5, 5, 5, 0.85);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  text-transform: uppercase;
  color: var(--accent);
  box-shadow: var(--glow);
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-weight: 700;
  color: var(--muted);
}

.nav-link {
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.nav-link--accent {
  border: 1px solid rgba(255, 222, 77, 0.4);
}

.nav-link:hover {
  background: rgba(255, 222, 77, 0.08);
  color: var(--text);
  box-shadow: var(--glow);
}


.home-hero {
  position: relative;
  padding: 140px 28px 120px;
  overflow: hidden;
  flex: 1;
  display: grid;
  place-items: center;
}

.home-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 222, 77, 0.12), transparent 30%),
    radial-gradient(circle at 70% 10%, rgba(255, 222, 77, 0.08), transparent 35%),
    radial-gradient(circle at 50% 70%, rgba(255, 222, 77, 0.08), transparent 40%);
  filter: blur(12px);
  pointer-events: none;
}

.home-hero__content {
  position: relative;
  text-align: center;
  z-index: 1;
  max-width: 720px;
}

.home-hero h1 {
  font-size: 64px;
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 222, 77, 0.35);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
  box-shadow: var(--glow);
}

.lede {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
  max-width: 680px;
  text-align: center;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  background: linear-gradient(120deg, #ffd000, #ffde4d);
  color: #0a0a0a;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 222, 77, 0.4);
  font-weight: 800;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 140ms ease;
  box-shadow: var(--glow);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(255, 222, 77, 0.45);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(255, 222, 77, 0.4);
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px dashed rgba(255, 222, 77, 0.35);
  box-shadow: none;
}

main {
  padding: 0 28px 80px;
}

.panel {
  background: linear-gradient(145deg, rgba(255, 222, 77, 0.04), rgba(255, 222, 77, 0.01))
      padding-box,
    linear-gradient(145deg, rgba(255, 222, 77, 0.25), rgba(255, 222, 77, 0.05)) border-box;
  border: 1px solid rgba(255, 222, 77, 0.15);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  max-width: 1100px;
  margin: 0 auto;
}

.panel.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.panel--blocked {
  border-color: rgba(255, 96, 96, 0.6);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.panel__header h2 {
  margin: 6px 0;
  font-size: 32px;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 222, 77, 0.05);
}

.field span {
  font-weight: 700;
}

.field input {
  background: transparent;
  border: 1px solid rgba(255, 222, 77, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  font-size: 16px;
}

.description-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.description-row textarea {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255, 222, 77, 0.2);
  border-radius: 10px;
  padding: 10px;
  color: var(--text);
  font-size: 16px;
  min-height: 200px;
  resize: vertical;
}

.field small {
  color: var(--muted);
}

.segmented {
  display: inline-flex;
  background: #0a0a0f;
  border: 1px solid rgba(255, 222, 77, 0.3);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 222, 77, 0.05);
}

.segmented__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.segmented__btn + .segmented__btn {
  border-left: 1px solid rgba(255, 222, 77, 0.15);
}

.segmented__btn.is-active {
  background: linear-gradient(120deg, rgba(255, 222, 77, 0.25), rgba(255, 222, 77, 0.05));
  color: var(--text);
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.status-card {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 222, 77, 0.05);
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--accent);
  font-size: 12px;
  margin: 0 0 6px;
}

.status {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.status--idle {
  color: var(--muted);
}

.status--live {
  color: var(--accent);
}

.key-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.key-line code {
  background: #0a0a0f;
  border: 1px dashed rgba(255, 222, 77, 0.3);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--accent);
  font-weight: 700;
}

.hint {
  color: var(--muted);
}

.alert {
  margin-top: 14px;
  min-height: 24px;
  color: var(--muted);
}

.alert--success {
  color: var(--accent);
}

.alert--warning {
  color: #ffd966;
}

.alert--error {
  color: var(--danger);
}

.helper {
  margin-top: 1.5rem;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.debug {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: linear-gradient(145deg, rgba(255, 222, 77, 0.08), rgba(255, 222, 77, 0.02));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.debug__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.debug__log {
  margin-top: 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  font-family: "SFMono-Regular", "Roboto Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 222, 77, 0.25);
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
}

.debug__line {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 222, 77, 0.1);
  color: var(--muted);
}

.debug__line:first-child {
  color: var(--text);
}

.debug__line:last-child {
  border-bottom: none;
}

.helper__title {
  font-weight: 700;
  color: #ffd700;
  margin-bottom: 0.5rem;
}

.helper ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: #d8e4ff;
  line-height: 1.6;
  margin: 0;
}

.helper li + li {
  margin-top: 0.35rem;
}

.footer {
  padding: 28px;
  border-top: 1px solid var(--border);
  background: #070709;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 38px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
  }
} 