:root {
  --primary: #a169f7;
  --primary-soft: #bd91ff;
  --secondary: #2ac7c7;
  --bg: #0b0612;
  --card: rgba(28, 18, 42, .74);
  --line: rgba(255, 255, 255, .11);
  --text: #f8f5ff;
  --muted: #a9a2b5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 50% 24%, rgba(115, 46, 186, .22), transparent 30rem),
    radial-gradient(circle at 8% 60%, rgba(42, 199, 199, .07), transparent 25rem),
    var(--bg);
  overflow-x: hidden;
  animation: pageReveal .7s ease both;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.stars, .stars::before, .stars::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(161,105,247,.5) 1px, transparent 1.5px);
  background-position: 12px 35px, 80px 115px;
  background-size: 170px 170px, 230px 230px;
  opacity: .25;
}
.stars::before { transform: rotate(21deg); opacity: .18; }
.stars::after { transform: rotate(-14deg); opacity: .12; }
.stars { animation: starsDrift 30s linear infinite alternate; }

.nav {
  width: min(1120px, calc(100% - 40px));
  height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: relative;
  z-index: 2;
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 20px; font-weight: 800; }
.brand > span:last-child > span { color: var(--primary-soft); }
.brand-logo-wrap {
  width: 38px;
  height: 38px;
  min-width: 38px;
  max-width: 38px;
  flex: 0 0 38px;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(161,105,247,.38);
}
.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease, filter .35s ease;
}
.brand:hover .brand-logo { transform: scale(1.09) rotate(-3deg); filter: brightness(1.14); }
.nav-meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #55dc9a; box-shadow: 0 0 9px #55dc9a; }

main { position: relative; z-index: 1; }
.hero { width: min(790px, calc(100% - 32px)); margin: 0 auto; padding: 52px 0 64px; text-align: center; animation: riseIn .7s .08s ease both; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #c6a7ef; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; margin-bottom: 22px; }
.eyebrow span { color: var(--secondary); }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -.052em; margin-bottom: 23px; }
h1 span { background: linear-gradient(95deg, #ba87ff, #6edfe0); background-clip: text; -webkit-background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.65; max-width: 610px; margin: 0 auto 39px; }

.upload-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 26px 80px rgba(0,0,0,.38), 0 0 65px rgba(117,64,170,.08);
  backdrop-filter: blur(20px);
  text-align: left;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.upload-card:hover { transform: translateY(-3px); border-color: rgba(161,105,247,.28); box-shadow: 0 32px 90px rgba(0,0,0,.43), 0 0 75px rgba(117,64,170,.13); }
.drop-zone {
  min-height: 280px;
  border: 1px dashed rgba(192,145,255,.36);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(128,73,180,.035);
  transition: .25s ease;
  outline: none;
}
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-visible { border-color: var(--primary); background: rgba(161,105,247,.09); box-shadow: inset 0 0 35px rgba(161,105,247,.06); }
.upload-icon { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 15px; margin-bottom: 18px; background: linear-gradient(145deg, rgba(161,105,247,.3), rgba(42,199,199,.12)); border: 1px solid rgba(191,145,255,.25); color: #d8bcff; box-shadow: 0 10px 30px rgba(66,23,111,.4); }
.drop-zone:hover .upload-icon { animation: iconFloat 1.2s ease-in-out infinite alternate; }
.arrow { font-size: 28px; font-weight: 400; line-height: 1; }
.drop-zone h2 { font-size: 17px; margin-bottom: 7px; }
.drop-zone > p { font-size: 13px; color: var(--muted); }
.drop-zone > p span { color: #bd8df8; }
.formats { display: flex; align-items: center; gap: 7px; margin-top: 21px; }
.formats span { font-size: 9px; font-weight: 800; letter-spacing: .06em; color: #9d94a9; border: 1px solid var(--line); background: rgba(255,255,255,.035); padding: 5px 7px; border-radius: 5px; }
.formats small { color: #756d80; margin-left: 5px; font-size: 10px; }

.preview { min-height: 150px; display: flex; align-items: center; gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.preview img { width: 110px; height: 110px; border-radius: 10px; object-fit: cover; background: #08050c; }
.file-info { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 7px; }
.file-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.file-info span { color: var(--muted); font-size: 12px; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.primary-button { width: 100%; height: 50px; border: 0; border-radius: 12px; margin-top: 12px; padding: 0 20px; display: flex; justify-content: center; align-items: center; gap: 12px; color: white; font: 700 13px "Manrope"; cursor: pointer; background: linear-gradient(100deg, #9255e9, #7268ec); box-shadow: 0 10px 28px rgba(118,73,199,.28); transition: .2s; }
.primary-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.primary-button:active:not(:disabled) { transform: scale(.985); }
.primary-button:disabled { cursor: not-allowed; opacity: .38; box-shadow: none; }
.primary-button b { font-size: 18px; }

.progress { padding: 16px 5px 4px; text-align: center; }
.progress-track { height: 4px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.08); }
.progress-track span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--primary), var(--secondary)); animation: loading 1s infinite ease-in-out; }
.progress p { font-size: 11px; color: var(--muted); margin-top: 8px; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(260%); } }

.result { display: flex; align-items: center; gap: 13px; margin-top: 12px; padding: 16px; border: 1px solid rgba(85,220,154,.25); border-radius: 12px; background: rgba(85,220,154,.06); }
.success-mark { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(85,220,154,.13); color: #73e9ad; }
.result-copy { min-width: 0; flex: 1; }
.result-copy > strong { font-size: 12px; color: #baf5d6; display: block; margin-bottom: 8px; }
.url-box { display: flex; }
.url-box input { min-width: 0; flex: 1; height: 37px; border: 1px solid var(--line); border-right: 0; border-radius: 7px 0 0 7px; background: rgba(0,0,0,.2); color: var(--muted); padding: 0 10px; }
.url-box button { border: 0; border-radius: 0 7px 7px 0; padding: 0 15px; background: #7548b5; color: white; font-weight: 700; cursor: pointer; }
.copy-success { animation: copyPop .5s ease both !important; background: #278b63 !important; }
.error { margin-top: 12px; border: 1px solid rgba(244,101,111,.3); border-radius: 10px; padding: 13px; color: #ffafb5; background: rgba(244,101,111,.07); text-align: center; font-size: 12px; }
.honeypot { position: absolute !important; left: -10000px !important; }

.trust { width: min(900px, calc(100% - 40px)); margin: 0 auto 100px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trust article { display: flex; align-items: center; gap: 13px; padding: 10px; text-align: left; }
.trust article { transition: transform .25s ease, background .25s ease; border-radius: 12px; }
.trust article:hover { transform: translateY(-4px); background: rgba(255,255,255,.025); }
.trust article > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #b98bea; background: rgba(255,255,255,.025); }
.trust strong { display: block; font-size: 12px; margin-bottom: 4px; }
.trust p { color: #77707f; font-size: 10px; }

footer { width: min(1120px, calc(100% - 40px)); margin: auto; min-height: 115px; border-top: 1px solid rgba(255,255,255,.07); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; color: #6f6877; font-size: 10px; position: relative; z-index: 1; }
footer > span { text-align: right; }
.brand.small { font-size: 14px; }
.brand.small .brand-logo-wrap { width: 29px; height: 29px; min-width: 29px; max-width: 29px; flex-basis: 29px; border-radius: 8px; }

.back-link { color: #c8a6f5; text-decoration: none; font-size: 12px; font-weight: 700; padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; transition: .2s; }
.back-link:hover { background: rgba(161,105,247,.1); transform: translateY(-2px); }
.share-main { width: min(1120px, calc(100% - 32px)); margin: auto; padding: 64px 0 90px; }
.share-card { border: 1px solid var(--line); border-radius: 22px; background: var(--card); padding: 18px; box-shadow: 0 30px 100px rgba(0,0,0,.42); backdrop-filter: blur(20px); animation: riseIn .65s ease both; }
.share-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 10px 22px; }
.share-kicker { color: var(--primary-soft); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.share-heading h1 { font-size: clamp(18px, 3vw, 28px); margin: 5px 0 0; letter-spacing: -.03em; overflow-wrap: anywhere; }
.share-status { color: #88e5b5; font-size: 11px; white-space: nowrap; }
.share-status i { display: inline-block; width: 7px; height: 7px; background: #55dc9a; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 10px #55dc9a; animation: statusPulse 1.7s infinite; }
.image-stage { min-height: 420px; max-height: 68vh; display: grid; place-items: center; overflow: hidden; border-radius: 15px; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.06); position: relative; }
.image-stage img { display: block; max-width: 100%; max-height: 68vh; object-fit: contain; transition: transform .45s ease; }
.image-stage:hover img { transform: scale(1.012); }
.raw-badge { position: absolute; right: 14px; bottom: 14px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; color: white; background: rgba(11,6,18,.78); backdrop-filter: blur(10px); font-size: 10px; font-weight: 800; letter-spacing: .08em; transition: .2s ease; }
.image-stage:hover .raw-badge { transform: translateY(-2px); background: rgba(117,72,181,.9); }
.share-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 8px 2px; }
.image-meta { display: flex; gap: 16px; color: var(--muted); font-size: 11px; }
.share-actions { display: flex; gap: 9px; }
.secondary-button, .primary-link { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 0 16px; font: 700 11px "Manrope"; text-decoration: none; cursor: pointer; transition: .22s ease; }
.secondary-button { color: #ddd5e9; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.primary-link { color: white; border: 0; background: linear-gradient(100deg, #9255e9, #7268ec); }
.secondary-button:hover, .primary-link:hover { transform: translateY(-2px); filter: brightness(1.12); }
.share-signature { text-align: center; margin-top: 22px; color: #746d7d; font-size: 11px; }
.share-signature a { color: var(--primary-soft); text-decoration: none; }
.empty-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 20px; }
.empty-page img { width: 72px; height: 72px; object-fit: cover; border-radius: 18px; }
.empty-page h1 { font-size: 38px; margin: 0; }
.empty-page p { color: var(--muted); }

@keyframes pageReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes starsDrift { to { transform: translate3d(-18px, 12px, 0); } }
@keyframes iconFloat { to { transform: translateY(-6px); box-shadow: 0 16px 36px rgba(93,40,148,.5); } }
@keyframes copyPop { 0% { transform: scale(1); } 45% { transform: scale(1.09); } 100% { transform: scale(1); } }
@keyframes statusPulse { 50% { opacity: .45; transform: scale(.8); } }

@media (max-width: 650px) {
  .nav { height: 70px; }
  .nav .brand-logo-wrap { width: 32px; height: 32px; min-width: 32px; max-width: 32px; flex-basis: 32px; border-radius: 8px; }
  .nav-meta { font-size: 0; }
  .hero { padding-top: 60px; }
  .upload-card { padding: 9px; border-radius: 18px; }
  .drop-zone { min-height: 245px; }
  .formats small { display: none; }
  .trust { grid-template-columns: 1fr; width: min(330px, calc(100% - 40px)); gap: 6px; }
  footer { grid-template-columns: 1fr; text-align: center; padding: 30px 0; }
  footer .brand { justify-content: center; }
  footer > span { text-align: center; }
  .preview img { width: 82px; height: 82px; }
  .share-main { padding-top: 36px; }
  .share-heading, .share-footer { align-items: flex-start; flex-direction: column; }
  .image-stage { min-height: 260px; }
  .share-actions { width: 100%; }
  .share-actions > * { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
