@font-face {
  font-family: InterLocal;
  src: local("Inter"), local("Arial");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #0d0d0e;
  --surface: #111112;
  --surface-2: #151516;
  --text: #f5f5f4;
  --muted: #77777d;
  --muted-2: #56565b;
  --line: rgba(255,255,255,.085);
  --line-strong: rgba(255,255,255,.15);
  --white: #f4f4f2;
  --black: #080808;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --ease: cubic-bezier(.22,.75,.18,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --modal-speed: 360ms;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: InterLocal, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}


.background-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) brightness(.42) contrast(1.08);
  opacity: .72;
  pointer-events: none;
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(900px 600px at 50% 42%, rgba(0,0,0,.18), rgba(0,0,0,.54) 68%, rgba(0,0,0,.76)),
    linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.58));
  pointer-events: none;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, .drop-zone:focus-within {
  outline: 2px solid rgba(255,255,255,.72);
  outline-offset: 3px;
}

::selection { background: #303033; color: #fff; }
::-moz-selection { background: #303033; color: #fff; }

* { scrollbar-width: thin; scrollbar-color: #303034 transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #303034; border-radius: 999px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hidden { display: none !important; }

.page-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.share-panel {
  width: min(100%, 660px);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.095);
  border-radius: var(--radius-xl);
  background: rgba(13,13,14,.94);
  box-shadow: 0 34px 100px rgba(0,0,0,.52);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel-topline,
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: #e8e8e6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.brand span { color: #5e5e63; }

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6d6d72;
  box-shadow: 0 0 0 5px rgba(255,255,255,.035);
}

.panel-heading { margin: 34px 2px 24px; }
.kicker {
  margin: 0 0 7px;
  color: #65656a;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.panel-heading h1,
.sheet h2 {
  margin: 0;
  letter-spacing: -.045em;
  line-height: .98;
  font-weight: 650;
}
.panel-heading h1 { font-size: clamp(34px, 7vw, 48px); }
.panel-heading > p:last-child {
  margin: 13px 0 0;
  color: #85858a;
  font-size: 13px;
  line-height: 1.55;
}

.drop-zone {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 22px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 26px;
  background: #0f0f10;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.drop-zone.dragging { border-color: rgba(255,255,255,.32); }
.drop-icon {
  width: 62px;
  height: 62px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #151516;
  color: #dededc;
}
.drop-icon svg { width: 28px; height: 28px; }
.drop-zone strong { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.drop-zone > span:not(.drop-icon) { margin-top: 5px; color: #707075; font-size: 12px; }
.drop-zone small { margin-top: 20px; color: #4c4c51; font-size: 10px; }

.file-row {
  margin-top: 12px;
  min-height: 74px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.file-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--white);
  color: var(--black);
}
.file-icon svg { width: 22px; height: 22px; }
.file-copy { min-width: 0; display: grid; gap: 6px; }
.file-copy strong {
  overflow: hidden;
  color: #e7e7e5;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-copy > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #66666b;
  font-size: 10px;
}
.file-copy i { width: 3px; height: 3px; border-radius: 50%; background: #3b3b3f; }

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #121213;
  color: #8c8c91;
  cursor: pointer;
}
.icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { background: #121213; color: #8c8c91; transform: none; }

.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.setting {
  min-width: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.setting:hover { background: var(--surface); border-color: var(--line); transform: none; }
.setting-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #19191b;
  color: #bdbdc0;
}
.setting-icon svg { width: 18px; height: 18px; }
.setting-copy { min-width: 0; display: grid; gap: 4px; }
.setting-copy small { color: #5f5f64; font-size: 9px; }
.setting-copy strong {
  overflow: hidden;
  color: #dcdcdc;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chevron {
  width: 15px;
  height: 15px;
  color: #45454a;
  transform: rotate(0deg);
  transition: transform 320ms var(--ease-out);
}
.setting[aria-expanded="true"] .chevron { transform: rotate(90deg); }

.code-field {
  max-height: 0;
  margin-top: 0;
  padding: 0 14px;
  overflow: hidden;
  border: 0 solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  transition:
    max-height 380ms var(--ease-out),
    margin-top 380ms var(--ease-out),
    padding 380ms var(--ease-out),
    border-width 220ms ease,
    opacity 240ms ease,
    transform 380ms var(--ease-out);
}
.code-field.is-visible {
  max-height: 98px;
  margin-top: 10px;
  padding: 13px 14px 14px;
  border-width: 1px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.code-field label { display: block; margin-bottom: 8px; color: #646469; font-size: 9px; }
.code-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #0c0c0d;
  color: #e6e6e4;
  outline: none;
}
.code-field input::placeholder { color: #414146; }

.primary-button {
  width: 100%;
  min-height: 62px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 42px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  text-align: left;
}
.primary-button:hover { background: var(--white); transform: none; }
.primary-button:disabled { cursor: default; opacity: .28; }
.primary-button.loading { opacity: .72; cursor: wait; }
.button-label { font-size: 12px; font-weight: 750; }
.button-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #0a0a0a;
  color: #fff;
}
.button-icon svg { width: 18px; height: 18px; }
.primary-button.loading .button-icon svg { display: none; }
.primary-button.loading .button-icon::after {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}


.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--modal-speed) ease,
    visibility 0s linear var(--modal-speed),
    backdrop-filter var(--modal-speed) ease,
    -webkit-backdrop-filter var(--modal-speed) ease;
}
.sheet-layer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition-delay: 0s;
}
.sheet {
  width: min(100%, 460px);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #101011;
  box-shadow: 0 34px 100px rgba(0,0,0,.56);
  opacity: 0;
  transform: translateY(16px) scale(.975);
  transform-origin: 50% 55%;
  transition:
    opacity 260ms ease,
    transform var(--modal-speed) var(--ease-out);
  will-change: opacity, transform;
}
.sheet-layer.is-open .sheet {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.sheet h2 { font-size: 26px; }
.choice-list { display: grid; gap: 8px; margin-top: 20px; }
.choice-item {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #141415;
  color: #bdbdc1;
  cursor: pointer;
  text-align: left;
}
.choice-item:hover { background: #141415; color: #bdbdc1; transform: none; }
.choice-item.active { background: #efefed; border-color: #efefed; color: #090909; }
.choice-item small { color: #56565b; font-size: 9px; }
.choice-item.active small { color: #666; }

.status-sheet { text-align: center; }
.status-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #161617;
  color: #d4d4d1;
}
.status-icon.success { background: #efefed; color: #090909; }
.status-icon svg { width: 25px; height: 25px; }
.status-sheet .kicker { margin-bottom: 9px; }
.status-sheet h2 { font-size: clamp(28px,7vw,36px); }
.status-sheet > p:not(.kicker) { margin: 14px auto 0; max-width: 340px; color: #79797e; font-size: 12px; line-height: 1.55; }
.error-detail {
  margin-top: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0b0c;
  color: #5e5e63;
  font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
}
.result-link { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 18px; }
.result-link input {
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b0b0c;
  color: #bdbdc1;
  outline: none;
}
.copy-button,
.secondary-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #171718;
  color: #c8c8ca;
  cursor: pointer;
}
.copy-button { min-width: 112px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; font-size: 10px; }
.copy-button svg { width: 15px; height: 15px; }
.secondary-button { width: 100%; min-height: 48px; margin-top: 10px; font-size: 11px; }
.copy-button:hover, .secondary-button:hover { background: #171718; color: #c8c8ca; transform: none; }

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #151516;
  color: #bcbcc0;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .page-shell { align-items: start; padding: 14px; }
  .share-panel { margin-top: max(0px, env(safe-area-inset-top)); padding: 20px; border-radius: 28px; }
  .panel-heading { margin-top: 28px; }
  .drop-zone { min-height: 230px; border-radius: 22px; }
  .settings { grid-template-columns: 1fr; }
  .sheet-layer { align-items: end; padding: 12px; }
  .sheet { width: 100%; border-radius: 26px; transform: translateY(28px) scale(.99); }
  .sheet-layer.is-open .sheet { transform: translateY(0) scale(1); }
  .result-link { grid-template-columns: 1fr; }
  .copy-button { min-height: 44px; }
}

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