@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  color-scheme: light;
  --bg-0: #f4f4ef;
  --bg-1: #e8ebe0;
  --ink: #102521;
  --muted: #556b64;
  --card: #fffffc;
  --line: #d4ddd0;
  --accent: #0f8f6b;
  --accent-2: #096b50;
  --danger: #c7382a;
  --shadow: 0 18px 40px rgba(16, 37, 33, 0.08);
  font-family: 'Space Grotesk', 'Avenir Next', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 5% -20%, #f6dcc2 0%, transparent 60%),
    radial-gradient(1200px 700px at 95% -10%, #d2e9df 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  color: var(--ink);
}

.container {
  max-width: 1000px;
  margin: 2.4rem auto 3rem;
  padding: 0 1rem 2rem;
}

.card {
  background: color-mix(in srgb, var(--card) 88%, white 12%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
}

h1, h2, h3 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  margin-bottom: 0.55rem;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

ul {
  margin-top: 0.4rem;
}

code, pre {
  font-family: 'IBM Plex Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
}

pre {
  white-space: pre-wrap;
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

button:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 143, 107, 0.24);
}

input[type='text'] {
  border: 1px solid #bfd0c8;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  width: 100%;
  font: inherit;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
}

.quick-test-form {
  margin-top: 0.9rem;
}

.inline-delete-form {
  margin: 0;
}

.danger-button {
  background: var(--danger);
  border-color: var(--danger);
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
}

.danger-button:hover {
  background: #ab2d22;
  box-shadow: 0 10px 16px rgba(199, 56, 42, 0.24);
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: #edf1ea;
}

.actions {
  margin-bottom: 0.7rem;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.success {
  border-color: #88d2b4;
  background: #eaf8f2;
}

.error {
  border-color: #e9a89f;
  background: #fff4f2;
}

.warning {
  color: #8d2f26;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.error-inline {
  color: #a12f24;
  font-weight: 600;
}

.success-inline {
  color: #0d6e53;
  font-weight: 600;
}

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 1.4rem 1.35rem;
  animation: rise-in 450ms ease-out;
}

.home-hero::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -64px;
  top: -76px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 35%, rgba(15, 143, 107, 0.32), rgba(15, 143, 107, 0));
  pointer-events: none;
}

.hero-copy {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
}

.pill {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.26rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0d5f47;
  background: #d9f2e9;
}

.create-form {
  margin-top: 1rem;
}

.create-button {
  font-size: 0.98rem;
  padding: 0.75rem 1.3rem;
}

.home-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  animation: rise-in 600ms ease-out;
}

.feature-card {
  min-height: 150px;
}

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

.saved-lists-wrap {
  overflow-x: auto;
}

.saved-lists-table {
  width: 100%;
}

.saved-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.saved-action-btn {
  border-radius: 10px;
  padding: 0.35rem 0.62rem;
  font-size: 0.9rem;
}

.danger-inline {
  background: #b93125;
  border-color: #b93125;
}

.danger-inline:hover {
  background: #98271d;
}

.test-row td {
  background: #f8faf6;
}

.pricing-card ul {
  margin-top: 0.3rem;
}

.upgrade-form {
  display: grid;
  gap: 0.55rem;
  max-width: 620px;
}

.upgrade-form label {
  font-weight: 600;
  margin-top: 0.15rem;
}

.api-card {
  animation: rise-in 700ms ease-out;
}

.quick-call-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.quick-call {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #f9faf7;
}

.quick-call h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.quick-call p {
  margin: 0 0 0.55rem;
}

.quick-call pre {
  margin: 0;
}

.home-result {
  animation: rise-in 500ms ease-out;
}

.cta-link {
  display: inline-block;
  margin-top: 0.3rem;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .container {
    margin-top: 1.2rem;
  }

  .card {
    padding: 1rem;
  }
}

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

  .pagination {
    gap: 0.6rem;
    flex-direction: column;
    align-items: flex-start;
  }

  th,
  td {
    font-size: 0.9rem;
  }
}
