:root {
  --bg: #05070f;
  --bg-soft: #0a0f1f;
  --panel: rgba(15, 22, 43, .72);
  --panel-strong: rgba(10, 16, 33, .92);
  --border: rgba(120, 190, 255, .16);
  --text: #e8f0ff;
  --muted: #9fb0cf;
  --cyan: #22e6d0;
  --purple: #8b5cff;
  --pink: #ff5fa2;
  --danger: #ff5470;
  --success: #2ee6a8;
  --radius: 20px;
  --shadow: 0 24px 70px rgba(3, 8, 20, .55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 8% -10%, rgba(34, 230, 208, .16), transparent 60%),
    radial-gradient(900px 600px at 95% 0%, rgba(139, 92, 255, .18), transparent 60%),
    radial-gradient(700px 500px at 50% 115%, rgba(255, 95, 162, .10), transparent 60%),
    linear-gradient(160deg, #04060e, #080d1c 55%, #04060e);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: #7ff7e9; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 17, .78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #04121a;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 22px rgba(34, 230, 208, .45);
}

.brand span { color: var(--cyan); }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  font-size: .92rem;
  padding: 9px 12px;
  border-radius: 999px;
}

.nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }

.hero {
  padding: 72px 0 42px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 230, 208, .3);
  background: rgba(34, 230, 208, .08);
  color: var(--cyan);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 20px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.upload-card {
  margin-top: 34px;
  padding: 24px;
  overflow: hidden;
}

.upload-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(34,230,208,.55), transparent 35%, rgba(139,92,255,.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.drop-zone {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 300px;
  padding: 34px 20px;
  text-align: center;
  border: 1px dashed rgba(120, 190, 255, .32);
  border-radius: 16px;
  background: rgba(8, 13, 28, .45);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}

.drop-zone.dragging {
  border-color: var(--cyan);
  transform: scale(1.01);
  background: rgba(34, 230, 208, .08);
}

.drop-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 2rem;
  color: #04121a;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 34px rgba(34, 230, 208, .35);
}

.drop-title { font-size: 1.2rem; font-weight: 750; margin: 0; }
.drop-text { color: var(--muted); font-size: .94rem; margin: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  color: #04121a;
  font-weight: 800;
  font-size: .97rem;
  cursor: pointer;
  background: linear-gradient(120deg, var(--cyan), #6ee7ff);
  box-shadow: 0 10px 28px rgba(34, 230, 208, .24);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.button.secondary {
  color: var(--text);
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button.danger {
  color: #fff;
  background: linear-gradient(120deg, var(--danger), #ff7a59);
}

.button.small { min-height: 38px; padding: 8px 14px; font-size: .82rem; }

.preview {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.preview-image {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transition: width .2s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .85rem;
}

.alert {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: .93rem;
}

.alert.error { border-color: rgba(255,84,112,.4); background: rgba(255,84,112,.1); color: #ffd7de; }
.alert.success { border-color: rgba(46,230,168,.4); background: rgba(46,230,168,.1); color: #d3ffe9; }

.result-box { margin-top: 22px; padding: 20px; }

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}

.url-row input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 9, 20, .75);
  font-size: .9rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 52px 0;
}

.feature { padding: 22px; }

.feature h3 { margin: 12px 0 8px; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(139, 92, 255, .16);
  color: var(--purple);
  font-size: 1.2rem;
}

.site-footer {
  margin-top: 70px;
  padding: 34px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
}

.footer-grid a { display: block; margin-top: 7px; color: var(--muted); }
.footer-grid a:hover { color: var(--cyan); }

.page-content { padding: 48px 0; }
.page-card { padding: clamp(20px, 4vw, 42px); }
.page-card h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.page-card h2 { margin-top: 30px; font-size: 1.25rem; }
.page-card p, .page-card li { color: #c9d5e8; }

.image-viewer {
  margin-top: 28px;
  padding: 18px;
}

.viewer-image {
  display: block;
  width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.meta-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(8, 13, 28, .55);
}

.meta-label { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.meta-value { margin-top: 5px; font-weight: 650; word-break: break-word; }

.report-box { margin-top: 22px; padding: 20px; }

textarea, select {
  width: 100%;
  color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 9, 20, .75);
  font: inherit;
}

@media (max-width: 720px) {
  .header-inner { min-height: 64px; }
  .nav { display: none; }
  .hero { padding: 48px 0 24px; }
  .drop-zone { min-height: 240px; padding: 22px 14px; }
  .url-row { flex-direction: column; }
  .url-row .button { width: 100%; }
}

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