:root {
  --bg: #f4efe7;
  --bg-deep: #efe6d8;
  --ink: #1c1a17;
  --muted: #6b6157;
  --accent: #e07a4f;
  --accent-dark: #b85c36;
  --card: #fff7ee;
  --stroke: rgba(28, 26, 23, 0.15);
  --shadow: 0 18px 40px rgba(28, 26, 23, 0.1);
  --font-title: "Fraunces", "Georgia", serif;
  --font-body: "Space Grotesk", "Helvetica", sans-serif;
}

@font-face {
  font-family: "Fraunces";
  src: url("https://fonts.gstatic.com/s/fraunces/v31/6NU2kSBrhzF_i0ZiVnx50A.woff2")
    format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("https://fonts.gstatic.com/s/spacegrotesk/v15/pxiDypc8kN1xnF18bIGw.woff2")
    format("woff2");
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #fff3e1 0%, var(--bg) 55%);
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 32px 18px 40px;
  gap: 24px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 12px 0 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--font-title);
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(28, 26, 23, 0.2);
}

h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0;
}

.tagline {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.glow {
  position: absolute;
  right: -140px;
  top: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #fbd1b0, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.input-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input[type="url"] {
  width: 100%;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fffaf4;
}

input[type="url"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
}

button.primary {
  background: var(--accent);
  color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(224, 122, 79, 0.35);
}

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

button.mini {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-size: 0.85rem;
}

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

.status {
  min-height: 24px;
}

.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid #f0c1a3;
  border-top-color: var(--accent-dark);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error {
  background: #fff1ef;
  border: 1px solid #f0b0a8;
  color: #8c3a2d;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.source {
  color: var(--muted);
  margin: 6px 0 0;
}

.result-grid {
  display: grid;
  gap: 16px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.list li + li {
  margin-top: 6px;
}

.footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.85rem;
}

.version {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: rgba(107, 97, 87, 0.7);
}

.hidden {
  display: none;
}

@media (min-width: 860px) {
  .page {
    padding: 40px 60px 60px;
  }

  .result-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
