:root {
  --bg: #0e0f14;
  --fg: #f4f4f6;
  --muted: #a7a8b3;
  --accent: #ff7a18;
  --accent-2: #21d4fd;
  --panel: rgba(18, 20, 28, 0.85);
  --panel-border: rgba(255, 255, 255, 0.08);
  --shadow: rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--fg);
  background: radial-gradient(1200px 600px at 20% -10%, #1c2a3a 0%, transparent 60%),
              radial-gradient(900px 700px at 110% 10%, #2a1f3d 0%, transparent 55%),
              var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Syne", sans-serif;
  margin: 0 0 12px 0;
  letter-spacing: 0.5px;
}

p {
  margin: 6px 0 0 0;
  color: var(--muted);
}

.hero {
  padding: 28px 32px 10px 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  background: linear-gradient(120deg, var(--accent), #ffd36b);
  color: #101114;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.hero-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.grid {
  padding: 12px 32px 48px 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 60px var(--shadow);
  backdrop-filter: blur(10px);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.action {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

input, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  padding: 10px 12px;
  font-family: inherit;
}

.primary {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent), #ffb347);
  color: #101114;
  font-weight: 700;
  cursor: pointer;
}

.ghost {
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  cursor: pointer;
}

#log {
  min-height: 260px;
  white-space: pre-wrap;
  color: #d8e2f3;
}

.hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.footer {
  padding: 16px 32px 32px;
  text-align: center;
  color: var(--muted);
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.6;
  z-index: 0;
}

.orb-1 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, #21d4fd 0%, transparent 70%);
  top: -80px;
  left: -40px;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #ff7a18 0%, transparent 70%);
  bottom: -120px;
  right: -60px;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="120" height="120" viewBox="0 0 120 120"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/></filter><rect width="120" height="120" filter="url(%23n)" opacity="0.04"/></svg>');
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 24px 20px 8px;
  }
}
