/* ============================================================
   FLINGO! — funky neobrutalist candy design
   ============================================================ */

:root {
  --cream: #FFF6E5;
  --ink: #1B1B1F;
  --pink: #FF4D8D;
  --purple: #7C4DFF;
  --yellow: #FFD644;
  --lime: #B7F04A;
  --cyan: #4DD9FF;
  --orange: #FF8A3D;
  --white: #FFFFFF;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --border: 3px solid var(--ink);
  --radius: 18px;
  --font-head: 'Fredoka', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Space Grotesk', ui-monospace, system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(var(--ink) 1.2px, transparent 1.2px);
  background-size: 34px 34px;
  background-position: 0 0;
}

/* subtle dot grid fades so it's not overwhelming */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: var(--cream);
  opacity: .88;
  pointer-events: none;
  z-index: -2;
}

.hidden { display: none !important; }
.muted { opacity: .55; font-weight: 400; }

/* ============ floating doodads ============ */
.bg-doodads { position: fixed; inset: 0; pointer-events: none; z-index: -1; }
.doodad {
  position: absolute;
  font-size: 28px;
  opacity: .5;
  animation: floaty 9s ease-in-out infinite;
}
.d1 { top: 12%; left: 5%;  color: var(--pink);   animation-delay: 0s;  font-size: 34px; }
.d2 { top: 25%; right: 7%; color: var(--purple); animation-delay: -2s; }
.d3 { top: 65%; left: 8%;  color: var(--cyan);   animation-delay: -4s; font-size: 22px; }
.d4 { top: 78%; right: 12%;color: var(--orange); animation-delay: -1s; font-size: 30px; }
.d5 { top: 45%; right: 3%; color: var(--lime);   animation-delay: -5s; font-size: 20px; }
.d6 { top: 88%; left: 40%; color: var(--pink);   animation-delay: -3s; font-size: 18px; }
.d7 { top: 8%;  left: 45%; color: var(--purple); animation-delay: -6s; font-size: 24px; }
.d8 { top: 55%; left: 55%; color: var(--yellow); animation-delay: -7s; font-size: 16px; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-18px) rotate(10deg); }
  50%      { transform: translateY(6px) rotate(-6deg); }
  75%      { transform: translateY(-10px) rotate(4deg); }
}

/* ============ topbar ============ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  max-width: 1200px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  font-size: 34px; display: inline-block;
  animation: spin-fling 5s ease-in-out infinite;
}
@keyframes spin-fling {
  0%, 70%, 100% { transform: rotate(0); }
  75% { transform: rotate(-20deg); }
  85% { transform: rotate(380deg); }
  92% { transform: rotate(352deg); }
  96% { transform: rotate(363deg); }
}
.logo-text {
  font-family: var(--font-head);
  font-weight: 700; font-size: 30px; letter-spacing: -0.5px;
}
.logo-bang { color: var(--pink); display: inline-block; animation: bang-bounce 2.4s ease infinite; }
@keyframes bang-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  70% { transform: translateY(-6px) scale(1.2); }
  80% { transform: translateY(0); }
}
.topbar-right { display: flex; gap: 10px; }

/* ============ badges & stickers ============ */
.badge {
  font-family: var(--font-head); font-weight: 600; font-size: 13px;
  padding: 6px 14px; border: var(--border); border-radius: 999px;
  box-shadow: var(--shadow-sm); background: var(--white);
  display: inline-block; white-space: nowrap;
}
.badge-lime { background: var(--lime); }
.badge-pink { background: var(--pink); color: var(--white); }
.badge-gold { background: var(--yellow); }
.tilt-l { transform: rotate(-3deg); }
.tilt-r { transform: rotate(2.5deg); }

.sticker {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 9px 16px; border: var(--border); border-radius: 12px;
  box-shadow: var(--shadow-sm); display: inline-block;
  transition: transform .15s ease;
}
.sticker:hover { transform: rotate(0deg) scale(1.08); }
.st-yellow { background: var(--yellow); }
.st-cyan   { background: var(--cyan); }
.st-pink   { background: var(--pink); color: var(--white); }
.sticker-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* ============ layout ============ */
.screen { max-width: 1200px; margin: 0 auto; padding: 20px 28px 60px; }

.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; padding: 30px 0 60px;
}

/* ============ dropzone ============ */
.dropzone {
  position: relative;
  border: 4px dashed var(--ink);
  border-radius: 26px;
  background: var(--white);
  min-height: 380px;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, background .18s;
  animation: dz-breathe 4s ease-in-out infinite;
}
@keyframes dz-breathe {
  0%, 100% { transform: rotate(-0.6deg) scale(1); }
  50% { transform: rotate(0.6deg) scale(1.012); }
}
.dropzone:hover {
  background: #FFFDF4;
  transform: rotate(0deg) scale(1.02);
  box-shadow: 11px 11px 0 var(--ink);
  animation-play-state: paused;
}
.dropzone.dragover {
  background: var(--lime);
  transform: scale(1.05) rotate(1deg);
  box-shadow: 13px 13px 0 var(--ink);
  animation: dz-party .35s ease infinite alternate;
}
@keyframes dz-party {
  from { transform: scale(1.04) rotate(-1.2deg); }
  to   { transform: scale(1.06) rotate(1.2deg); }
}
.dz-inner { text-align: center; padding: 30px; pointer-events: none; }
.dz-plus {
  width: 92px; height: 92px; margin: 0 auto 20px;
  border: var(--border); border-radius: 50%;
  background: var(--pink); color: var(--white);
  font-size: 54px; font-weight: 700; line-height: 86px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-head);
  animation: plus-bounce 2s cubic-bezier(.34,1.56,.64,1) infinite;
}
@keyframes plus-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(90deg); }
}
.dz-title { font-family: var(--font-head); font-size: 30px; font-weight: 700; }
.dz-sub { margin-top: 6px; font-size: 15px; opacity: .6; }

.btn-note { margin-top: 18px; }
.home-actions { margin-top: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.addmore-row { display: flex; gap: 12px; flex-wrap: wrap; }
.file-path { font-size: 11px; opacity: .45; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "got a code?" mini entry */
.code-entry {
  margin-top: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: var(--border); border-radius: 16px;
  background: var(--white); box-shadow: var(--shadow-sm);
  padding: 12px 16px; width: fit-content;
  transform: rotate(-0.5deg);
}
.code-entry label { font-family: var(--font-head); font-weight: 600; font-size: 15px; }
.code-entry input {
  width: 118px; border: var(--border); border-radius: 10px;
  padding: 8px 10px; font-family: var(--font-body); font-weight: 700;
  font-size: 16px; letter-spacing: 3px; text-transform: uppercase;
  background: var(--cream); text-align: center;
}
.code-entry input:focus { outline: none; background: var(--white); box-shadow: 2px 2px 0 var(--ink); }

/* ============ mascot ============ */
.hero-right { position: relative; }
.mascot-wrap { position: relative; height: 150px; margin-bottom: 8px; }
.mascot {
  width: 130px; height: 118px;
  position: absolute; left: 0; top: 0;
  animation: mascot-bob 3.4s ease-in-out infinite;
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
.mascot-svg { width: 100%; height: 100%; }
.blob-body { fill: var(--purple); stroke: var(--ink); stroke-width: 5; }
.eye-white { fill: var(--white); stroke: var(--ink); stroke-width: 4; }
.pupil { fill: var(--ink); }
.smile { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.cheek { fill: var(--pink); opacity: .75; }
.speech {
  position: absolute; left: 140px; top: 18px;
  background: var(--white); border: var(--border); border-radius: 14px;
  padding: 8px 14px; font-family: var(--font-head); font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-sm);
  animation: speech-pop 5s ease infinite;
  white-space: nowrap;
}
.speech::before {
  content: ""; position: absolute; left: -10px; top: 16px;
  border: 6px solid transparent; border-right: 10px solid var(--ink);
}
@keyframes speech-pop {
  0%, 8%, 92%, 100% { transform: scale(0); opacity: 0; }
  14%, 86% { transform: scale(1); opacity: 1; }
  17% { transform: scale(1.06) rotate(-2deg); }
  20% { transform: scale(1); }
}

/* ============ hero text ============ */
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700; line-height: 1.04; letter-spacing: -1px;
}
.hero-zap {
  color: var(--pink);
  text-shadow: 3px 3px 0 var(--yellow);
  display: inline-block;
  animation: zap-tilt 3s ease infinite;
}
@keyframes zap-tilt {
  0%, 80%, 100% { transform: rotate(0); }
  85% { transform: rotate(-3deg) scale(1.05); }
  90% { transform: rotate(2deg); }
}
.squiggle-under {
  position: relative; display: inline-block;
}
.squiggle-under::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 2px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q 12 0 25 6 T 50 6 T 75 6 T 100 6' fill='none' stroke='%234DD9FF' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x;
  background-size: 90px 10px;
  animation: squiggle-slide 3s linear infinite;
}
@keyframes squiggle-slide { to { background-position-x: 90px; } }
.hero-sub { margin-top: 20px; font-size: 17px; line-height: 1.55; max-width: 480px; }
.hero-sub em { font-style: normal; background: var(--yellow); padding: 0 6px; border-radius: 6px; font-weight: 700; }

/* ============ buttons ============ */
.btn {
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  border: var(--border); border-radius: 14px;
  background: var(--white); color: var(--ink);
  padding: 12px 22px; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-mega {
  font-size: 24px; padding: 20px 44px; border-radius: 20px;
  background: var(--pink); color: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  animation: mega-pulse 2.2s ease infinite;
  letter-spacing: .5px;
}
.btn-mega:hover { background: var(--purple); transform: translate(-2px,-2px) rotate(-1deg); box-shadow: 8px 8px 0 var(--ink); animation-play-state: paused; }
.btn-mega:active { transform: translate(4px,4px); box-shadow: 0 0 0 var(--ink); }
@keyframes mega-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
.btn-ghost:hover { transform: none; box-shadow: none; background: var(--yellow); border-radius: 10px; text-decoration: none; }
.btn-dashed { border-style: dashed; background: transparent; box-shadow: none; }
.btn-dashed:hover { background: var(--white); box-shadow: var(--shadow-sm); }
.btn-small { font-size: 13px; padding: 7px 14px; border-radius: 10px; }
.btn-copy { background: var(--yellow); font-size: 15px; }
.btn-copy.copied { background: var(--lime); }
.btn-grab { background: var(--cyan); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ============ marquee ============ */
.marquee {
  border-top: var(--border); border-bottom: var(--border);
  background: var(--yellow);
  overflow: hidden; white-space: nowrap;
  padding: 10px 0;
  transform: rotate(-1deg) scale(1.02);
  margin: 30px -10px;
}
.marquee-bottom { background: var(--purple); transform: rotate(1deg) scale(1.02); }
.marquee-bottom .marquee-track { color: var(--white); }
.marquee-track {
  display: inline-block;
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  animation: marquee-scroll 22s linear infinite;
}
@keyframes marquee-scroll { to { transform: translateX(-50%); } }

/* ============ how it works ============ */
.how { padding: 40px 0 20px; }
.how-title {
  font-family: var(--font-head); font-size: 38px; font-weight: 700;
  text-align: center; margin-bottom: 40px;
}
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.how-card {
  border: var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.how-card:hover { transform: rotate(0) translateY(-8px) !important; }
.hc-yellow { background: var(--yellow); }
.hc-pink { background: var(--pink); color: var(--white); }
.hc-cyan { background: var(--cyan); }
.how-num {
  width: 46px; height: 46px; border-radius: 50%;
  border: var(--border); background: var(--white); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 22px;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.how-card h3 { font-family: var(--font-head); font-size: 22px; margin-bottom: 8px; }
.how-card p { font-size: 15px; line-height: 1.5; }

/* ============ panels (share / receive) ============ */
.panel {
  background: var(--white); border: var(--border); border-radius: 24px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 34px; margin-top: 10px;
  animation: panel-in .35s cubic-bezier(.34,1.56,.64,1);
}
@keyframes panel-in {
  from { transform: translateY(24px) scale(.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 10px; }
.panel-title { font-family: var(--font-head); font-size: 32px; font-weight: 700; }
.wiggle { display: inline-block; animation: wiggle 2s ease infinite; }
@keyframes wiggle {
  0%, 70%, 100% { transform: rotate(0); }
  75% { transform: rotate(-12deg); }
  85% { transform: rotate(10deg); }
  95% { transform: rotate(-4deg); }
}

/* ============ file list ============ */
.file-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.file-item {
  display: flex; align-items: center; gap: 14px;
  border: var(--border); border-radius: 16px;
  padding: 14px 18px; background: var(--cream);
  box-shadow: var(--shadow-sm);
  animation: file-pop .3s cubic-bezier(.34,1.56,.64,1) backwards;
}
.file-item:nth-child(odd) { transform: rotate(-0.4deg); }
.file-item:nth-child(even) { transform: rotate(0.4deg); }
@keyframes file-pop {
  from { transform: scale(.8) translateY(10px); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.file-emoji {
  font-size: 30px; width: 54px; height: 54px; flex: 0 0 54px;
  display: grid; place-items: center;
  background: var(--white); border: var(--border); border-radius: 12px;
  box-shadow: 2px 2px 0 var(--ink);
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-weight: 700; font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { font-size: 13px; opacity: .55; margin-top: 2px; }
.file-x {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 50%;
  border: var(--border); background: var(--white);
  font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s, background .12s;
}
.file-x:hover { background: var(--pink); color: var(--white); transform: rotate(90deg); }

/* progress bars — candy stripes! */
.prog {
  height: 20px; border: var(--border); border-radius: 999px;
  background: var(--white); overflow: hidden; margin-top: 8px;
  position: relative;
}
.prog-fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(
    45deg,
    var(--pink) 0 12px,
    var(--orange) 12px 24px,
    var(--yellow) 24px 36px,
    var(--lime) 36px 48px,
    var(--cyan) 48px 60px,
    var(--purple) 60px 72px
  );
  background-size: 200% 100%;
  animation: candy-slide 1.2s linear infinite;
  transition: width .25s ease;
  border-radius: 999px;
}
@keyframes candy-slide { to { background-position-x: -72px; } }
.prog-label { font-size: 12px; font-weight: 700; margin-top: 5px; display: flex; justify-content: space-between; }
.file-item.done { background: var(--lime); }
.file-item.done .file-emoji { animation: done-spin .5s ease; }
@keyframes done-spin { from { transform: rotate(0) scale(.6); } to { transform: rotate(360deg) scale(1); } }

/* completion celebration: pop + progress-bar flash */
.celebrate { animation: row-pop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes row-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.035) rotate(-0.6deg); }
  65% { transform: scale(0.995) rotate(0.4deg); }
  100% { transform: scale(1); }
}
.celebrate .prog-fill { animation: candy-slide .25s linear infinite, prog-flash .45s ease 3; }
@keyframes prog-flash {
  50% { filter: brightness(1.7) saturate(1.6); }
}

/* iOS: the ENTIRE row becomes one giant save button — the overlay
   covers every pixel of the file bar, nothing else is visible */
.file-item.save-ready {
  cursor: pointer;
  position: relative;
  min-height: 96px;
  animation: save-glow 1.3s ease infinite;
}
@keyframes save-glow {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: 3px 3px 0 var(--ink), 0 0 0 8px rgba(255, 214, 68, .5); }
}
.save-bar {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 21px;
  background: var(--yellow);
  border-radius: 13px;
  padding: 10px;
  animation: save-bounce 1.1s ease infinite;
  pointer-events: none; /* clicks land on the row */
}
.save-bar .save-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: .65;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes save-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
.file-item.saved { background: var(--lime); }

.addmore-row { margin-top: 16px; }

/* ============ note ============ */
.note-wrap { margin-top: 26px; }
.note-label { font-family: var(--font-head); font-weight: 600; font-size: 16px; display: block; margin-bottom: 8px; }
.note-input {
  width: 100%; border: var(--border); border-radius: 14px;
  padding: 14px 16px; font-family: var(--font-body); font-size: 15px;
  background: var(--cream); resize: vertical;
  box-shadow: inset 3px 3px 0 rgba(27,27,31,.08);
  transition: transform .15s;
}
.note-input:focus { outline: none; background: var(--white); box-shadow: var(--shadow-sm); transform: rotate(-0.3deg); }

.golink-wrap { margin-top: 30px; text-align: center; }

/* ============ link zone ============ */
.link-zone { margin-top: 30px; border-top: 3px dashed var(--ink); padding-top: 26px; }
.pulse-note {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  background: var(--yellow); border: var(--border); border-radius: 999px;
  padding: 10px 20px; box-shadow: var(--shadow-sm);
  width: fit-content; margin: 0 auto 26px;
  transform: rotate(-1deg);
}
.pulse-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--pink); border: 2px solid var(--ink);
  animation: pulse-dot 1.2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

/* big bouncy code tiles */
.code-tiles { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.code-tile {
  width: 58px; height: 66px;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 34px;
  background: var(--white); border: var(--border); border-radius: 14px;
  box-shadow: var(--shadow-sm);
  animation: tile-drop .5s cubic-bezier(.34,1.56,.64,1) backwards;
}
.code-tile:nth-child(6n+1) { background: var(--pink); color: var(--white); transform: rotate(-3deg); }
.code-tile:nth-child(6n+2) { background: var(--yellow); transform: rotate(2deg); }
.code-tile:nth-child(6n+3) { background: var(--cyan); transform: rotate(-1.5deg); }
.code-tile:nth-child(6n+4) { background: var(--lime); transform: rotate(2.5deg); }
.code-tile:nth-child(6n+5) { background: var(--purple); color: var(--white); transform: rotate(-2deg); }
.code-tile:nth-child(6n+6) { background: var(--orange); transform: rotate(1.5deg); }
@keyframes tile-drop {
  from { transform: translateY(-40px) rotate(10deg) scale(.5); opacity: 0; }
}
.code-tile:hover { animation: tile-jump .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes tile-jump { 50% { transform: translateY(-12px) rotate(0); } }

.link-row { display: flex; gap: 12px; max-width: 620px; margin: 0 auto 30px; }
.link-input {
  flex: 1; border: var(--border); border-radius: 14px;
  padding: 13px 16px; font-family: var(--font-body); font-size: 15px; font-weight: 500;
  background: var(--cream); min-width: 0;
}
.link-input:focus { outline: none; background: var(--white); }

.share-flex { display: flex; gap: 30px; justify-content: center; align-items: stretch; flex-wrap: wrap; }
.qr-card {
  border: var(--border); border-radius: var(--radius);
  background: var(--white); padding: 18px 18px 10px;
  box-shadow: var(--shadow); text-align: center;
}
.qr-box { width: 164px; height: 164px; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { border-radius: 6px; }
.qr-label { font-family: var(--font-head); font-weight: 600; margin-top: 8px; font-size: 15px; }

.waiting-card {
  border: var(--border); border-radius: var(--radius);
  background: var(--cream); padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; min-width: 260px; flex: 0 1 320px;
  font-family: var(--font-head); font-weight: 600; font-size: 16px; text-align: center;
}
.radar { position: relative; width: 70px; height: 70px; }
.radar span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--ink); background: rgba(124, 77, 255, .25);
  animation: radar-ring 2s ease-out infinite;
}
.radar span:nth-child(2) { animation-delay: .66s; }
.radar span:nth-child(3) { animation-delay: 1.33s; }
@keyframes radar-ring {
  from { transform: scale(.25); opacity: 1; }
  to   { transform: scale(1.15); opacity: 0; }
}

/* ============ peers ============ */
.peer-list { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.peer-card {
  border: var(--border); border-radius: 16px; background: var(--white);
  padding: 16px 20px; box-shadow: var(--shadow-sm);
  animation: file-pop .35s cubic-bezier(.34,1.56,.64,1) backwards;
}
.peer-head { display: flex; align-items: center; gap: 12px; }
.peer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: var(--border); background: var(--cyan);
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 2px 2px 0 var(--ink);
}
.peer-name { font-family: var(--font-head); font-weight: 700; font-size: 18px; flex: 1; }
.peer-status { font-size: 13px; font-weight: 700; opacity: .6; }
.peer-card.done { background: var(--yellow); }
.peer-card.gone { opacity: .5; filter: grayscale(1); }

/* ============ receive screen ============ */
.rx-connecting { text-align: center; padding: 40px 0 30px; }
.bigspin { font-size: 72px; display: inline-block; animation: bigspin 1.6s cubic-bezier(.6,.05,.3,.95) infinite; }
@keyframes bigspin {
  0% { transform: rotate(0) translateX(0); }
  50% { transform: rotate(180deg) translateX(30px); }
  100% { transform: rotate(360deg) translateX(0); }
}
.rx-connecting p { font-family: var(--font-head); font-weight: 600; font-size: 19px; margin-top: 18px; }

.note-card {
  border: var(--border); border-radius: 16px; background: var(--yellow);
  box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 22px;
  transform: rotate(-0.5deg);
}
.note-card-head { font-family: var(--font-head); font-weight: 700; margin-bottom: 8px; }
.note-card p { white-space: pre-wrap; word-break: break-word; font-size: 15px; margin-bottom: 12px; }

.graball-wrap { text-align: center; margin-top: 28px; }

.rx-error { text-align: center; padding: 40px 0; }
.rx-error-emoji { font-size: 64px; animation: ghost-float 2.5s ease-in-out infinite; display: inline-block; }
@keyframes ghost-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}
.rx-error p { font-family: var(--font-head); font-weight: 600; font-size: 19px; margin: 16px 0 22px; }

/* grab buttons + chunky file button */
.file-actions { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; }
.file-check { font-size: 26px; animation: done-spin .5s ease; }

/* ============ user IDs & receiving mode ============ */
.id-panel {
  margin-top: 24px;
  border: var(--border); border-radius: var(--radius);
  background: var(--white); box-shadow: var(--shadow);
  padding: 18px 20px;
  transform: rotate(-0.4deg);
  max-width: 480px;
}
.id-head { font-family: var(--font-head); font-size: 17px; margin-bottom: 12px; }
.id-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.id-at {
  font-family: var(--font-head); font-weight: 700; font-size: 24px;
  color: var(--purple);
}
.id-input {
  flex: 1; min-width: 120px; max-width: 220px;
  border: var(--border); border-radius: 10px;
  padding: 9px 12px; font-family: var(--font-body); font-weight: 700;
  font-size: 15px; background: var(--cream); text-transform: lowercase;
}
.id-input:focus { outline: none; background: var(--white); box-shadow: 2px 2px 0 var(--ink); }
.id-hint { font-size: 12px; margin-top: 8px; }
.id-badge {
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
  background: var(--purple); color: var(--white);
  border: var(--border); border-radius: 999px;
  padding: 7px 16px; box-shadow: var(--shadow-sm);
}
.radar-handle { color: var(--purple); }

/* top-of-page ID hub */
.id-panel-top {
  max-width: none;
  width: 100%;
  margin: 6px 0 30px;
  transform: rotate(0deg);
  border-width: 4px;
  box-shadow: 7px 7px 0 var(--ink);
  background: linear-gradient(135deg, var(--white) 60%, #F3EBFF);
}
.id-input-wide { max-width: 230px; }
.id-input-search { max-width: none; flex: 1; }
.search-row { margin-top: 12px; }

/* people rows (search results + friends) */
.person-list { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.person-row {
  display: flex; align-items: center; gap: 10px;
  border: var(--border); border-radius: 12px;
  background: var(--cream); padding: 8px 14px;
  box-shadow: 2px 2px 0 var(--ink);
  animation: file-pop .25s cubic-bezier(.34,1.56,.64,1) backwards;
}
.person-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; flex: 1; }
.person-dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--ink); background: #cfcfcf; flex: 0 0 auto;
}
.person-dot.online { background: var(--lime); animation: pulse-dot 1.6s ease infinite; }
.person-status { font-size: 12px; font-weight: 700; opacity: .55; }

/* sender identity + prominent send-back on receive screen */
.sender-id-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-head); font-size: 17px;
  border: var(--border); border-radius: 14px;
  background: var(--cyan); padding: 10px 16px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
  transform: rotate(-0.4deg);
}
.sendback-head {
  font-family: var(--font-head); font-weight: 700; font-size: 19px;
  margin-bottom: 4px;
}
.sendback {
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  background: #FFE9F2;
  padding: 16px 18px;
  margin: 0 0 22px;
  box-shadow: var(--shadow-sm);
  transform: rotate(0.3deg);
}
.or-divider {
  font-family: var(--font-head); font-weight: 600; opacity: .5;
  margin: 18px 0 14px; font-size: 15px;
}
.send-to-row { justify-content: center; }
.sendback { margin-top: 30px; border-top: 3px dashed var(--ink); padding-top: 22px; }
.sendback .addmore-row { margin: 12px 0 14px; }
.offer-head {
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  margin: 14px 0 8px; opacity: .8;
}
.offer-list { margin-top: 4px; }
.peer-card .file-item { box-shadow: none; background: var(--white); }

/* ============ footer ============ */
.footer {
  text-align: center; padding: 30px 20px 40px;
  font-size: 14px; opacity: .65;
}

/* ============ confetti & toast ============ */
.confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
}
.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: var(--white);
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px;
  border: 3px solid var(--white);
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
  z-index: 101;
  animation: toast-in .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes toast-in {
  from { transform: translateX(-50%) translateY(30px) scale(.8); opacity: 0; }
}

/* ============ responsive ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 10px; }
  .hero-right { order: -1; }
  .how-grid { grid-template-columns: 1fr; }
  .dropzone { min-height: 260px; }
  .screen { padding: 12px 18px 40px; }
  .panel { padding: 22px; }
  .hero-title { font-size: 38px; }
  .share-flex { flex-direction: column; align-items: center; }
  .topbar { padding: 14px 18px; }
  .topbar-right { display: none; }
  .code-tile { width: 46px; height: 54px; font-size: 26px; }
  .btn-mega { font-size: 19px; padding: 16px 30px; }
  .marquee { margin: 20px -18px; }
}

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .marquee-track { animation: none !important; }
}
