:root {
  --off-white: #FDFBF6;
  --beige: #EAE6DA;
  --ink: #0C0C0C;
  --ink-2: #151515;
  --ink-3: #202020;
  --purple: #BCACFF;
  --purple-2: #A99BE5;
  --spark: #FFEB77;
  --muted: #8B8B84;
  --error: #FF8D8D;
  --font-display: "Geist", sans-serif;
  --font-mono: "Geist Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--off-white);
  font-family: var(--font-display);
  font-size: 16px;
}

.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px 80px;
}

header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 76px;
  padding: 18px 0;
}

.viewer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.viewer img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--purple);
  border-radius: 50%;
}

.viewer a,
.secondary {
  color: var(--off-white);
  text-decoration: none;
  border: 1px solid var(--purple);
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 300ms ease-in, color 300ms ease-in;
}

.viewer a:hover,
.secondary:hover {
  background: var(--purple);
  color: var(--ink);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--off-white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.7;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 300ms ease-in;
}

.text-button:hover {
  color: var(--purple);
}

.mini-logo {
  display: block;
  width: min(190px, 48vw);
}

.mini-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-lockup {
  display: grid;
  place-items: center;
  min-height: clamp(100px, 24vw, 100px);
  margin: 0 0 24px;
  background: var(--ink);
}

.brand-logo {
  display: block;
  width: min(220px, 62vw);
  height: auto;
}

.drop {
  position: relative;
  min-height: clamp(330px, 46vw, 500px);
  display: grid;
  place-items: center;
  max-width: 920px;
  margin: 0 auto 18px;
  padding: 48px 30px;
  overflow: hidden;
  border: 1px solid rgba(253, 251, 246, .18);
  border-radius: 8px;
  background: #000;
  color: var(--off-white);
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(12, 12, 12, .72);
  transition: border-color 300ms ease-in, transform 300ms ease-in;
}

.drop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--drop-art);
  background-position: center;
  background-size: cover;
  filter: brightness(.82) contrast(1.06) saturate(.88);
  transform: scale(1.01);
  transition: filter 300ms ease-in, transform 300ms ease-in;
}

.drop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 12, 12, .12), rgba(12, 12, 12, .46)),
    radial-gradient(circle at 50% 44%, rgba(12, 12, 12, .12), rgba(12, 12, 12, .28) 62%);
  transition: background 300ms ease-in, opacity 300ms ease-in;
}

.drop.over,
.drop:hover {
  border-color: rgba(255, 235, 119, .58);
  transform: translateY(-2px);
}

.drop:hover::before {
  filter: brightness(.58) contrast(1.12) saturate(.9);
  transform: scale(1.035);
}

.drop.over::before {
  filter: brightness(1.02) contrast(1.04) saturate(1.08);
  transform: scale(1.045);
}

.drop.over::after {
  background:
    linear-gradient(180deg, rgba(12, 12, 12, .08), rgba(12, 12, 12, .34)),
    radial-gradient(circle at 50% 44%, rgba(255, 235, 119, .16), rgba(188, 172, 255, .16) 62%);
}

.drop.has-files,
.drop.is-live {
  cursor: default;
}

.drop-chrome,
.drop-state {
  position: relative;
  z-index: 1;
}

.drop-chrome {
  position: absolute;
  inset: 16px 18px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(253, 251, 246, .84);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.7;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .5);
}

.drop-chrome span:first-child {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 0 6px rgba(255, 235, 119, .12);
}

.drop-state {
  width: min(800px, 100%);
}

.drop h2,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 8vw, 92px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: .92;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .5);
}

.drop p {
  max-width: 620px;
  margin: 18px auto 0;
  color: rgba(253, 251, 246, .92);
  font-size: 16px;
  line-height: 1.55;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .62);
}

.drop code,
.command-row code,
.token-box {
  font-family: var(--font-mono);
  text-transform: none;
}

.drop code {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(253, 251, 246, .9);
  color: var(--ink);
}

.drop-ready h2,
.drop-live h2 {
  margin-bottom: 28px;
  font-size: clamp(36px, 6vw, 68px);
}

.cli-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.command-row,
.live-row,
.token-row {
  display: flex;
  align-items: stretch;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  background: #000;
}

.command-row {
  width: fit-content;
}

.command-row code {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  color: var(--off-white);
  font-size: 13px;
  white-space: nowrap;
}

.modal-row {
  margin: 14px 0 20px;
}

.icon-button,
.command-button {
  border: 0;
  border-left: 1px solid var(--ink-3);
  background: var(--ink-2);
  color: var(--off-white);
  cursor: pointer;
  transition: background 300ms ease-in, color 300ms ease-in;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
}

.icon-button:hover,
.command-button:hover {
  background: var(--purple);
  color: var(--ink);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.command-button {
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.command-button:disabled,
.secondary:disabled,
button.primary:disabled {
  opacity: .55;
  cursor: default;
}

.launch-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 100%;
}

.launch-row input,
.suffix {
  min-height: 52px;
  border: 1px solid var(--ink);
  background: var(--off-white);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
}

.launch-row input {
  min-width: min(300px, 100%);
  padding: 0 14px;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  text-transform: lowercase;
}

.launch-row input:focus {
  outline: none;
}

.suffix {
  display: flex;
  align-items: center;
  padding: 0 14px 0 0;
  border-left: 0;
  color: var(--muted);
  text-transform: lowercase;
}

.host-prefix {
  padding: 0 0 0 14px;
  border-left: 1px solid var(--ink);
  border-right: 0;
  border-radius: 8px 0 0 8px;
}

.launch-row.has-prefix input {
  border-left: 0;
  border-radius: 0;
}

button.primary {
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid var(--ink);
  border-radius: 0 8px 8px 0;
  background: var(--ink);
  color: var(--off-white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 300ms ease-in, color 300ms ease-in;
}

button.primary:hover {
  background: var(--spark);
  color: var(--ink);
}

.status {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.drop .status {
  color: rgba(253, 251, 246, .88);
}

.status.compact {
  min-height: 22px;
  margin-top: 0;
  text-align: center;
}

.status a {
  color: inherit;
  font-weight: 500;
}

.status.error {
  color: var(--error);
}

.drop .status.error {
  color: var(--error);
}

.live-row {
  width: min(660px, 100%);
  margin: 0 auto;
  border-color: var(--ink);
}

.live-row a {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
  color: var(--off-white);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-row .icon-button {
  border-left-color: var(--ink);
}

.spark-confetti {
  position: fixed;
  top: -40px;
  z-index: 1000;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--spark);
  pointer-events: none;
  animation: spark-fall 2s cubic-bezier(.85, 0, .15, 1) forwards;
}

@keyframes spark-fall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate3d(var(--drift), 110vh, 0) rotate(var(--spin)); opacity: 0; }
}

.wow-video {
  position: fixed;
  right: max(18px, 6vw);
  bottom: -3vh;
  z-index: 999;
  width: min(320px, 42vw);
  max-height: 72vh;
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transform: translateY(28px) rotate(-9deg) scale(.92);
  transition: opacity .18s ease, transform .24s ease;
}

.wow-video.visible {
  opacity: 1;
  transform: translateY(0) rotate(-9deg) scale(1);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .68);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  background: var(--ink);
  padding: 24px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .46);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 68px);
}

.modal-close {
  border: 1px solid var(--ink-3);
}

.modal-copy,
.setup-steps,
.token-label {
  max-width: none;
  color: rgba(253, 251, 246, .88);
  line-height: 1.6;
}

.modal-copy {
  margin: 0 0 18px;
}

.setup-steps {
  margin: 0;
  padding-left: 24px;
}

.setup-steps li + li {
  margin-top: 8px;
}

.token-label {
  margin: 20px 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.token-row {
  width: 100%;
}

h2 {
  max-width: 820px;
  margin-top: 36px;
}

p {
  max-width: 660px;
  line-height: 1.55;
}

h3.section {
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .18em;
  line-height: 1.7;
  text-transform: uppercase;
}

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

.card-wrap {
  position: relative;
}

.card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  background: var(--ink-2);
  color: inherit;
  text-decoration: none;
  transition: transform 300ms ease-in, border-color 300ms ease-in;
}

.card-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--ink-3);
  border-radius: 6px;
  background: rgba(12, 12, 12, .72);
  color: var(--off-white);
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 150ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.card-wrap:hover .card-delete,
.card-delete:focus-visible {
  opacity: 1;
}

.card-delete:hover {
  border-color: #ff6b6b;
  background: #ff6b6b;
  color: #0c0c0c;
}

.card-delete:disabled {
  cursor: default;
  opacity: .5;
}

@media (hover: none) {
  .card-delete { opacity: 1; }
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--purple);
}

.card img.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--ink);
}

.card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
}

.card .meta img.avatar,
.card .meta .avatar {
  width: 26px;
  height: 26px;
  border: 1px solid var(--purple);
  border-radius: 50%;
  background: var(--purple);
}

.card .meta .info {
  min-width: 0;
}

.card .meta .name {
  overflow: hidden;
  color: var(--off-white);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card .meta .by {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty {
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

.token-box {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  background: #000;
  color: var(--off-white);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.token-row .token-box {
  flex: 1;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  line-height: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.token-row .command-button {
  min-height: 52px;
  border-left: 1px solid var(--ink-3);
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px 56px;
  }

  header {
    min-height: 64px;
    padding: 12px 0;
  }

  .viewer {
    max-width: 100%;
    justify-content: flex-end;
    font-size: 11px;
  }

  .viewer span {
    overflow: hidden;
    max-width: 38vw;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-lockup {
    min-height: clamp(100px, 24vw, 100px);
    margin-bottom: 16px;
  }

  .brand-logo {
    width: min(220px, 62vw);
  }

  .drop {
    min-height: 320px;
    padding: 56px 18px 36px;
  }

  .drop-chrome {
    inset: 14px 14px auto;
    font-size: 10px;
  }

  .drop h2,
  h2 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .command-row {
    width: 100%;
  }

  .command-row code {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .command-button {
    padding: 0 10px;
    font-size: 10px;
  }

  .launch-row {
    display: grid;
    width: 100%;
  }

  .launch-row input,
  .suffix,
  .host-prefix {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    border: 1px solid var(--ink);
    border-radius: 0;
    padding: 0 12px;
    text-align: center;
  }

  .launch-row input {
    border-radius: 8px 8px 0 0;
  }

  .launch-row.has-prefix input {
    border-top: 0;
  }

  .host-prefix {
    border-radius: 8px 8px 0 0;
  }

  button.primary {
    width: 100%;
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }

  .live-row {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .token-row {
    display: grid;
  }

  .token-row .command-button {
    min-height: 44px;
    border-top: 1px solid var(--ink-3);
    border-left: 0;
  }

  .wow-video {
    right: -18px;
    width: min(260px, 68vw);
    max-height: 58vh;
  }
}
