@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0d14;
  --panel: #111722;
  --card: #151c29;
  --text: #e6ecf5;
  --muted: #98a2b3;
  --accent: #5fd4ff;
  --accent-strong: #38bdf8;
  --border: #1f2937;
  --success: #34d399;
  --warning: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, #0f172a, #030712 55%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 2rem;
  padding: 3rem 3.5rem 2rem;
  align-items: center;
}

.hero__content h1 {
  margin: 0.3rem 0 0.8rem;
  font-size: 2.8rem;
}

.hero__content .lede {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(95, 212, 255, 0.12);
  border: 1px solid rgba(95, 212, 255, 0.2);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.hero__preview {
  display: flex;
  justify-content: flex-end;
}

.preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}

.preview-card img {
  display: block;
  width: 100%;
  max-width: 420px;
}

.preview-card__overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.85), rgba(59, 130, 246, 0.85));
  font-weight: 700;
  letter-spacing: 0.6px;
}

.layout {
  padding: 0 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.solve-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row.inline {
  flex-direction: row;
  gap: 1rem;
}

.form-row select,
.form-row input[type='file'] {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.75rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.primary {
  background: linear-gradient(120deg, #22d3ee, #3b82f6);
  border: none;
  color: #041019;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-strong);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.job-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.job-list.empty {
  grid-template-columns: 1fr;
}

.job-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.status[data-state='PENDING'] {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.status[data-state='RUNNING'] {
  background: rgba(95, 212, 255, 0.15);
  color: var(--accent);
}

.status[data-state='SUCCEEDED'] {
  background: rgba(52, 211, 153, 0.15);
  color: var(--success);
}

.status[data-state='FAILED'] {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.two-cols {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

#preview-canvas {
  width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.08), transparent),
    radial-gradient(circle at 70% 60%, rgba(99, 102, 241, 0.08), transparent),
    #070b13;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.legend {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dot {
  display: inline-flex;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.dot[data-color='#ffd166'] {
  background: #ffd166;
}

.dot[data-color='#ff7f50'] {
  background: #ff7f50;
}

.panel__meta {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.panel__meta dl {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.8rem;
}

.panel__meta dt {
  color: var(--muted);
  font-weight: 500;
}

.panel__meta dd {
  margin: 0;
  font-weight: 600;
}

.cta-group {
  display: flex;
  gap: 0.6rem;
}

.footer {
  padding: 2rem 3.5rem 3rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__preview {
    justify-content: center;
  }
  .layout {
    padding: 0 1.25rem 2rem;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .form-row.inline {
    flex-direction: column;
  }
}
