/* SPDX-License-Identifier: Apache-2.0 */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap");

:root {
  --bg: #0f1b2d;
  --panel: #172840;
  --panel-strong: #223756;
  --accent: #ff9b4a;
  --accent-strong: #ff6f3c;
  --text: #f2f5f8;
  --muted: #91a4bb;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, rgba(255, 155, 74, 0.2), transparent 45%),
    linear-gradient(160deg, #0c1526 10%, #0f1b2d 50%, #101f3a 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(130deg, rgba(34, 55, 86, 0.9), rgba(23, 40, 64, 0.95));
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(5, 8, 20, 0.35);
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
}

.hero__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(255, 155, 74, 0.18);
  color: var(--accent);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero__lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero__lead span {
  color: var(--text);
  font-weight: 600;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 30px rgba(6, 10, 24, 0.25);
}

.card.info {
  background: var(--panel-strong);
}

.row {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="number"],
input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #111f32;
  color: var(--text);
  font-family: inherit;
}

input[type="file"] {
  padding: 8px;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--accent);
  color: #1a1512;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255, 111, 60, 0.25);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

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

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.progress {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 20px;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffb86b, #ff6f3c);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress__bar--busy {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #ffb86b, #ff6f3c);
}

.progress__bar--busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  animation: progress-stripes 1.2s linear infinite;
}

pre {
  margin: 0;
  background: #0c1422;
  border-radius: 14px;
  padding: 16px;
  max-height: 280px;
  overflow: auto;
  color: #d6e0ea;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 0.85rem;
}

.console {
  margin-top: 16px;
}

.console pre {
  max-height: 220px;
}

.console__output {
  white-space: pre-wrap;
}

.console__ts {
  color: var(--muted);
  opacity: 0.7;
}

.console__meta {
  color: var(--accent);
}

.console__msg {
  color: #d6e0ea;
}

.console__input {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.console__input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #111f32;
  color: var(--text);
  font-family: "IBM Plex Mono", "Consolas", monospace;
}

ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 10px 0 0;
}

@media (max-width: 720px) {
  .page {
    padding: 32px 18px 48px;
  }

  .hero {
    padding: 24px;
  }

  .toggle {
    padding-top: 0;
  }
}

@keyframes progress-stripes {
  0% {
    transform: translateX(-60%);
  }
  100% {
    transform: translateX(60%);
  }
}
