:root {
  --bg: #0e0f12;
  --surface: #151821;
  --surface-alt: #1c1f2b;
  --text: #f0f1f5;
  --muted: #9aa1b5;
  --accent: #7cf2c7;
  --accent-strong: #61e0d1;
  --border: #242838;
  --danger: #ff6b6b;
  --radius: 14px;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% 20%, rgba(97, 224, 209, 0.12), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(124, 242, 199, 0.1), transparent 22%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 6px 0 10px;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.hero .lede {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}

.badge {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b0c10;
  padding: 12px 16px;
  border-radius: 99px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.eyebrow {
  color: var(--accent);
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 12px;
}

.content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.input-panel textarea {
  width: 100%;
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 14px;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.input-panel textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

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

.primary-btn,
.ghost-btn {
  border-radius: 10px;
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0b0c10;
  box-shadow: 0 10px 40px rgba(97, 224, 209, 0.25);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn:not(:disabled):hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  margin: 4px 0 0;
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  padding: 8px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  min-width: 90px;
  text-align: center;
}

.output-panel {
  min-height: 320px;
}

.output {
  margin: 0;
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  color: #a5f0db;
  overflow: auto;
  max-height: 500px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

.log-panel {
  grid-column: 1 / -1;
}

.log-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.log-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1118;
}

.log-tag {
  background: var(--surface-alt);
  padding: 6px 10px;
  border-radius: 99px;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  border: 1px solid var(--border);
}

.log-time {
  color: var(--muted);
  font-size: 12px;
}

.log-message {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.progress-wrap {
  margin: 10px 0 16px;
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.progress-text {
  display: grid;
  gap: 2px;
}

.progress-note {
  color: var(--muted);
  font-size: 12px;
}

.progress-timer {
  color: var(--text);
  font-weight: 700;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 10px;
  background: #0f1118;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(124, 242, 199, 0.2), var(--accent-strong), rgba(124, 242, 199, 0.2));
  animation: pulse-progress 1.4s ease-in-out infinite;
}

@keyframes pulse-progress {
  0% {
    transform: translateX(-40%);
  }
  50% {
    transform: translateX(10%);
  }
  100% {
    transform: translateX(120%);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
  }

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