@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Sora:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b121f;
  --bg-2: #0a0f1a;
  --card: rgba(16, 25, 40, 0.85);
  --card-strong: rgba(20, 30, 48, 0.95);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #f59e0b;
  --accent-3: #34d399;
  --ring: rgba(34, 211, 238, 0.35);
  --shadow: 0 28px 60px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 45%),
    radial-gradient(circle at 10% 20%, rgba(52, 211, 153, 0.2), transparent 45%),
    radial-gradient(circle at 20% 90%, rgba(245, 158, 11, 0.18), transparent 45%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
}

.backdrop {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.5), rgba(2, 6, 23, 0.2));
  pointer-events: none;
  z-index: 0;
}

.gridlines {
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(148, 163, 184, 0.04) 0 1px, transparent 1px 80px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 28px 96px;
  display: grid;
  gap: 32px;
  animation: fadeUp 0.9s ease both;
}

.hero {
  display: grid;
  gap: 16px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.home-link {
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.35);
}

.pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  font-weight: 600;
  font-size: 0.9rem;
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--accent);
  font-size: 0.8rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4.6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #22d3ee, #f59e0b 70%, #34d399);
  -webkit-background-clip: text;
  color: transparent;
}

.lead {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 50%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.18), transparent 50%);
  opacity: 0.6;
  pointer-events: none;
}

.card-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.card-head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.card-head p {
  margin: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.field span {
  font-weight: 600;
}

textarea,
input[type="text"] {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 12px 14px;
  background: rgba(2, 6, 23, 0.65);
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 220px;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px var(--ring);
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.primary {
  background: linear-gradient(120deg, #22d3ee, #34d399);
  color: #0b121f;
  border: none;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(34, 211, 238, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(34, 211, 238, 0.3);
}

.ghost-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

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

.status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
}

.status[data-state="error"] {
  color: #fb923c;
  font-weight: 600;
}

.status[data-state="success"] {
  color: #22d3ee;
  font-weight: 600;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  z-index: 1;
}

.stat {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: grid;
  gap: 4px;
}

.label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-wrap {
  background: var(--card-strong);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 12px;
  max-height: 420px;
  overflow: auto;
  position: relative;
  z-index: 1;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  background: rgba(12, 18, 31, 0.98);
  color: #67e8f9;
  text-align: left;
  padding: 10px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  font-family: "JetBrains Mono", monospace;
}

.table-wrap tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.9rem;
  color: var(--text);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap tbody tr:hover td {
  background: rgba(34, 211, 238, 0.08);
}

.preview-card {
  animation: fadeUp 0.9s ease both;
  animation-delay: 0.08s;
}

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

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

  .split {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
