/* =========================
   FilePass design system
   Dark P2P theme. All sizing flows from the tokens below;
   keep every class/id name — app.js toggles them directly.
========================= */

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;

  --bg-0: #080d19;
  --bg-1: #24345f;
  --card: rgba(18, 26, 47, 0.88);
  --ink: #eef2ff;
  --ink-dim: #b4c0db;
  --ink-mute: #8492b2;
  --accent: #8aa4ff;
  --accent-ink: #071022;
  --accent-soft: rgba(138, 164, 255, 0.14);
  --surface: #182642;
  --surface-2: #0c1426;
  --surface-3: #29395f;
  --danger-bg: #542936;
  --danger-ink: #ffd9e2;
  --warn-ink: #ffd9a0;
  --warn-bg: rgba(255, 217, 160, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --border-soft: rgba(255, 255, 255, 0.06);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --btn-h: 52px;
  --gap-1: 8px;
  --gap-2: 12px;
  --gap-3: 16px;
  --gap-4: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top, var(--bg-1), var(--bg-0) 55%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


/* =========================
   MAIN LAYOUT
========================= */

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
}

.background-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-one {
  width: 350px;
  height: 350px;
  background: #617cff;
  top: -100px;
  left: -100px;
}

.orb-two {
  width: 300px;
  height: 300px;
  background: #20c9ff;
  bottom: -80px;
  right: -80px;
}


/* =========================
   CARD
========================= */

.card {
  width: min(620px, 100%);

  background: var(--card);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  padding: clamp(24px, 4vw, 36px);

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45);

  position: relative;
  z-index: 1;
}


/* =========================
   HERO
========================= */

.hero {
  text-align: center;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
  padding: 7px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(10, 18, 35, 0.5);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

header p {
  color: var(--ink-dim);
  line-height: 1.6;
  margin: 0 auto;
  max-width: 44ch;
  font-size: 0.98rem;
}


/* =========================
   BADGES
========================= */

.badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.badges span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 38, 66, 0.7);
  color: #cbd7f5;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid var(--border-soft);
  white-space: nowrap;
}


/* =========================
   STACK
========================= */

.stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hidden {
  display: none !important;
}


/* =========================
   DROPZONE
========================= */

.dropzone {
  min-height: 168px;

  border: 2px dashed #52658f;
  border-radius: 22px;

  display: grid;
  place-items: center;
  align-content: center;

  gap: 6px;
  padding: 22px 18px;

  cursor: pointer;

  background: rgba(10, 18, 35, 0.7);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.dropzone:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(20, 31, 58, 0.8);
}

.dropzone.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(138, 164, 255, 0.18);
  transform: translateY(-2px);
}

.drop-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}

.dropzone strong {
  font-size: 1rem;
}

.dropzone span {
  color: #a9b5cf;
  font-size: 0.88rem;
  text-align: center;
  overflow-wrap: anywhere;
  max-width: 100%;
}


/* =========================
   BUTTONS + INPUTS
========================= */

button {
  border: 0;
  border-radius: var(--radius-md);

  min-height: var(--btn-h);
  padding: 12px 20px;

  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;

  cursor: pointer;

  background: var(--accent);
  color: var(--accent-ink);

  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: var(--surface-3);
  color: #ffffff;
}

button.danger {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
.dropzone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.name-input {
  width: 100%;
  min-height: var(--btn-h);

  border: 1px solid #34486f;

  background: var(--surface-2);
  color: var(--ink);

  border-radius: var(--radius-md);

  padding: 12px 16px;

  font: inherit;
  font-size: 0.95rem;
}

.name-input::placeholder {
  color: var(--ink-mute);
}


/* =========================
   RECEIVER NOTICE
========================= */

.notice {
  padding: 15px 17px;

  border-radius: var(--radius-md);

  background: var(--surface);
  color: #c9d5f0;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  border: 1px solid var(--border-soft);

  font-size: 0.92rem;
  line-height: 1.55;
}

.notice-icon {
  font-size: 1.3rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.notice strong {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}

.notice span {
  display: block;
  color: #9eacce;
  font-size: 0.88rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}


/* =========================
   STATUS
========================= */

.status-card {
  padding: 15px 17px;

  border-radius: var(--radius-md);

  background: rgba(12, 20, 38, 0.65);

  border: 1px solid var(--border-soft);
}

.label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8191b5;

  text-transform: uppercase;
  letter-spacing: 0.1em;

  margin-bottom: 6px;
}

.status {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}


/* =========================
   SHARE LINK + QR
========================= */

.share-block {
  padding: 17px;

  border-radius: var(--radius-md);

  background: rgba(12, 20, 38, 0.65);

  border: 1px solid var(--border-soft);
}

.share-grid {
  display: flex;
  gap: var(--gap-3);
  align-items: center;
  margin-top: 4px;
}

.qr {
  width: 104px;
  height: 104px;
  flex-shrink: 0;

  background: #ffffff;

  border-radius: var(--radius-sm);

  padding: 6px;

  image-rendering: pixelated;

  cursor: zoom-in;
}


/* =========================
   QR LIGHTBOX
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;

  display: grid;
  place-items: center;
  padding: 20px;

  background: rgba(4, 7, 14, 0.72);

  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  animation: lightbox-in 0.18s ease;
}

.lightbox-card {
  width: min(340px, 100%);

  display: grid;
  gap: 14px;
  justify-items: center;

  background: var(--card);

  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  padding: 24px;

  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);

  text-align: center;
}

.qr-large {
  width: min(260px, 70vw);
  height: auto;
  aspect-ratio: 1;

  background: #ffffff;

  border-radius: var(--radius-md);

  padding: 10px;

  image-rendering: pixelated;
}

.qr-link {
  color: var(--ink-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.lightbox-card .btn-row {
  width: 100%;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.share-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.share-row {
  display: flex;
  gap: var(--gap-1);
}

.share-row input {
  flex: 1;

  min-width: 0;
  min-height: var(--btn-h);

  border: 1px solid #34486f;

  background: var(--surface-2);
  color: #ffffff;

  border-radius: var(--radius-sm);

  padding: 12px 14px;

  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;

  text-overflow: ellipsis;
}

.share-row button {
  flex-shrink: 0;
  white-space: nowrap;
  padding-left: 18px;
  padding-right: 18px;
}

.share-help {
  display: block;

  color: #8191b5;

  font-size: 0.82rem;
  line-height: 1.5;
}


/* =========================
   FILE INFO / PROGRESS
========================= */

.filename {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.progress-track {
  height: 10px;

  background: #253252;

  border-radius: 99px;

  overflow: hidden;
}

.progress-bar {
  height: 100%;

  width: 0%;

  background: linear-gradient(90deg, var(--accent), #20c9ff);

  border-radius: inherit;

  transition: width 0.15s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--gap-2);

  color: #a9b5cf;

  margin-top: 8px;

  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
}


/* =========================
   TRANSFER ACTIONS + ACCEPT
========================= */

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row button {
  flex: 1;
  min-width: 0;
}

#acceptBlock {
  display: grid;
  gap: var(--gap-2);
}

#acceptText {
  overflow-wrap: anywhere;
  align-items: center;
}

.accept-icon {
  font-size: 1.7rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.accept-from {
  margin-top: 6px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
}

.accept-warn {
  margin-top: 8px;
  padding: 9px 12px;

  color: var(--warn-ink);
  background: var(--warn-bg);

  border: 1px solid rgba(255, 217, 160, 0.22);
  border-radius: 10px;

  font-size: 0.83rem;
  line-height: 1.5;
}


/* =========================
   INSTRUCTIONS
========================= */

.instructions {
  margin-top: 30px;

  padding-top: 24px;

  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.instructions-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-bottom: 18px;
}

.instructions-icon {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: var(--surface);

  font-size: 1.15rem;

  flex-shrink: 0;
}

.instructions h2 {
  margin: 0 0 3px;

  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.instructions-header p {
  margin: 0;

  color: #8191b5;

  font-size: 0.87rem;
}


/* =========================
   STEPS
========================= */

.steps {
  display: grid;
  gap: 10px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  padding: 13px 14px;

  border-radius: 14px;

  background: rgba(10, 18, 35, 0.45);

  border: 1px solid rgba(255, 255, 255, 0.045);
}

.step-number {
  width: 28px;
  height: 28px;

  border-radius: 50%;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  background: var(--surface-3);

  color: #cbd7f5;

  font-size: 0.82rem;
  font-weight: 800;
}

.step-content strong {
  display: block;

  margin-bottom: 2px;

  font-size: 0.92rem;
}

.step-content p {
  margin: 0;

  color: #8f9dbb;

  font-size: 0.85rem;

  line-height: 1.5;
}


/* =========================
   PRIVACY NOTE
========================= */

.privacy-note {
  display: flex;

  gap: 10px;

  margin-top: 16px;

  padding: 14px 15px;

  border-radius: 14px;

  background: rgba(23, 48, 55, 0.35);

  border: 1px solid rgba(91, 207, 190, 0.12);
}

.privacy-note > span {
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.privacy-note p {
  margin: 0;

  color: #8faeb0;

  font-size: 0.82rem;

  line-height: 1.55;
}

.privacy-note strong {
  color: #c7e5e2;
}


/* =========================
   FOOTER
========================= */

footer {
  margin-top: 26px;

  text-align: center;

  color: var(--ink-mute);

  line-height: 1.6;
}

.footer-brand {
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);

  margin-bottom: 8px;
}

footer small {
  display: block;
  font-size: 0.76rem;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.82rem;
}

.footer-links a,
.legal a,
.home-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover,
.legal a:hover {
  text-decoration: underline;
}

.copyright {
  margin-top: 10px;
  opacity: 0.8;
}


/* =========================
   LEGAL PAGES
========================= */

.legal {
  text-align: left;
}

.legal .hero {
  margin-bottom: 14px;
}

.legal h2 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.legal p,
.legal ul {
  color: var(--ink-dim);
  line-height: 1.65;
  margin: 8px 0;
  font-size: 0.92rem;
}

.legal ul {
  padding-left: 20px;
}

.legal code {
  color: var(--ink);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

.legal .hero,
.legal footer {
  text-align: center;
}

.legal-nav {
  margin-top: 24px;
  text-align: center;
  font-size: 0.9rem;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 560px) {

  .shell {
    padding: 20px 12px;
  }

  .card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .dropzone {
    min-height: 150px;
  }

  .share-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .qr {
    width: 132px;
    height: 132px;
    margin: 2px auto 0;
  }

  .share-row {
    flex-direction: column;
  }

  .share-row button {
    width: 100%;
  }

  .btn-row {
    flex-direction: column;
  }

  .instructions {
    margin-top: 24px;
    padding-top: 20px;
  }

}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    transition: none !important;
    transform: none !important;
  }

}
