:root {
  color-scheme: dark;
  --bg: #061428;
  --ink: #effcff;
  --muted: #9bb8c5;
  --line: rgba(103, 224, 255, 0.18);
  --panel: rgba(7, 25, 45, 0.78);
  --panel-solid: #07192d;
  --accent: #42f2c2;
  --accent-2: #2fb8ff;
  --accent-3: #1787ff;
  --danger: #ff7777;
  --shadow: 0 28px 86px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(140deg, rgba(66, 242, 194, 0.16), transparent 34%),
    linear-gradient(320deg, rgba(47, 184, 255, 0.16), transparent 36%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(103, 224, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 224, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 86%);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(900px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 820;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(47, 184, 255, 0.16);
}

.mini-stat {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 14px;
}

.surface {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 4vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.surface-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 4px 4px 2px;
  text-align: center;
}

.logo-art {
  width: min(520px, 100%);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(103, 224, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(47, 184, 255, 0.16);
}

.surface-head p {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.surface-head h1 {
  margin: 0;
  font-size: clamp(40px, 11vw, 96px);
  line-height: 0.86;
  letter-spacing: 0;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: clamp(260px, 40vh, 420px);
  place-items: center;
  align-content: center;
  gap: 11px;
  overflow: hidden;
  border: 1px dashed rgba(103, 224, 255, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(66, 242, 194, 0.10), rgba(47, 184, 255, 0.08)),
    rgba(3, 16, 31, 0.72);
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.dropzone.is-over,
.dropzone:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(66, 242, 194, 0.16), 0 18px 44px rgba(0, 0, 0, 0.22);
}

.dropzone input {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.drop-kicker,
.finder-label,
.result-head span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.drop-title {
  position: relative;
  z-index: 2;
  max-width: min(680px, 92%);
  overflow-wrap: anywhere;
  font-size: clamp(34px, 9vw, 76px);
  font-weight: 880;
  line-height: 0.92;
}

.drop-note,
.message,
.result p {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.drop-visual {
  position: absolute;
  inset: auto 28px 24px auto;
  display: grid;
  grid-template-columns: repeat(3, 28px);
  gap: 8px;
  opacity: 0.9;
}

.drop-visual span {
  display: block;
  height: 38px;
  border: 1px solid rgba(103, 224, 255, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(-5deg);
}

.drop-visual span:nth-child(2) {
  background: rgba(66, 242, 194, 0.16);
  transform: translateY(-9px) rotate(3deg);
}

.drop-visual span:nth-child(3) {
  background: rgba(47, 184, 255, 0.16);
  transform: rotate(6deg);
}

.progress {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.result {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(66, 242, 194, 0.28);
  border-radius: 8px;
  background: rgba(5, 36, 48, 0.74);
}

.result-head {
  display: grid;
  gap: 4px;
}

.result-head strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.share-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.share-grid input,
.finder input {
  min-width: 0;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(1, 12, 24, 0.72);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.share-grid input:focus,
.finder input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66, 242, 194, 0.10);
}

.code-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.code-row strong {
  color: var(--ink);
  font-size: clamp(54px, 13vw, 96px);
  font-weight: 920;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(66, 242, 194, 0.18);
}

.copy-button,
.finder button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #00131d;
  padding: 0 17px;
  cursor: pointer;
  font-weight: 860;
  transition: transform 150ms ease, filter 150ms ease;
}

.copy-button:hover,
.finder button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.finder {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 16, 31, 0.72);
}

.message {
  min-height: 24px;
}

.message.is-error {
  color: var(--danger);
}

.transfer {
  min-height: 420px;
  place-items: start;
  align-content: center;
}

.transfer h1 {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(38px, 10vw, 82px);
  line-height: 0.9;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
}

@media (display-mode: standalone) {
  .shell {
    padding-top: max(20px, env(safe-area-inset-top));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 22px, 760px);
    padding-top: 18px;
  }

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

  .logo-art {
    width: 100%;
  }

  .share-grid,
  .finder {
    grid-template-columns: 1fr;
  }

  .copy-button,
  .finder button {
    width: 100%;
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .drop-visual {
    display: none;
  }
}
