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

:root {
  --bg: #eef1f4;
  --bg-2: #f8fafc;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --accent: #334155;
  --accent-2: #111827;
  --accent-soft: rgba(51, 65, 85, 0.1);
  --danger: #b91c1c;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.1);
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(148, 163, 184, 0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(71, 85, 105, 0.18), transparent 22%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 45%, #f8fafc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(15, 23, 42, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 85%);
}

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

button,
input,
select {
  font: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.hero {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74));
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(51, 65, 85, 0.12);
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.06);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.hero h1,
.panel h2,
.content-card h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 0.96;
  max-width: 11ch;
}

.lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.feature-grid {
  display: grid;
  gap: 10px;
}

.feature-card {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.feature-card h2 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.grid-main {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel h2 {
  font-size: 1.25rem;
}

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

.subtle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, #334155, #111827);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.btn-secondary {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(185, 28, 28, 0.12);
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.btn-text {
  padding-inline: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--accent-2);
}

.toolbar {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

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

.field {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-weight: 700;
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}

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

.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.summary {
  display: grid;
  gap: 14px;
}

.summary-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.08), rgba(255, 255, 255, 0.9));
}

.summary-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.summary-title strong {
  font-size: 1rem;
}

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

.stat {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.progress {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.progress-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.progress-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #334155, #94a3b8);
  transition: width 0.2s ease;
}

.progress-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 140px;
  padding: 18px;
  border: 1.5px dashed rgba(51, 65, 85, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(51, 65, 85, 0.05), rgba(255, 255, 255, 0.84));
  color: var(--muted);
  text-align: center;
}

.dropzone strong {
  color: var(--text);
  font-size: 1rem;
}

.dropzone.dragover {
  border-color: rgba(51, 65, 85, 0.45);
  box-shadow: inset 0 0 0 1px rgba(51, 65, 85, 0.08);
}

.gallery,
.results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
}

.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.16), rgba(51, 65, 85, 0.08));
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.preview-meter {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.14);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.preview-meter-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #334155, #94a3b8);
  transition: width 0.18s ease;
}

.preview-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
}

.tile-body {
  display: grid;
  gap: 7px;
  padding: 10px 10px 12px;
}

.tile-name {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  font-size: 0.9rem;
  font-weight: 800;
}

.tile-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.remove-btn:hover {
  background: rgba(185, 28, 28, 0.95);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-ready {
  background: rgba(51, 65, 85, 0.09);
  color: var(--accent-2);
}

.status-done {
  background: rgba(51, 65, 85, 0.1);
  color: #334155;
}

.status-error {
  background: rgba(185, 28, 28, 0.1);
  color: var(--danger);
}

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

.notice {
  padding: 14px 16px;
  border: 1px solid rgba(51, 65, 85, 0.12);
  border-radius: 16px;
  background: rgba(51, 65, 85, 0.06);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq {
  display: grid;
  gap: 10px;
}

.faq details {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.content-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.content-card h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.content-card h2 {
  font-size: 1.15rem;
}

.content-card p,
.content-card li {
  color: var(--muted);
  line-height: 1.8;
}

.content-card section + section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
  font-weight: 800;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.93rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a {
  color: var(--accent-2);
  font-weight: 800;
}

.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;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  }

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

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 16px, 1180px);
    padding-top: 12px;
  }

  .hero,
  .panel,
  .content-card {
    border-radius: 22px;
    padding: 16px;
  }

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

  .gallery,
  .results {
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  }

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