/* ============================================================
   TWINDROP — Modern UI Redesign
   Google Fonts: Inter (sans) loaded via HTML <link>
   ============================================================ */

/* ── Design tokens ── */
:root {
  --c-bg:        #080c14;
  --c-surface:   #0e1420;
  --c-surface-2: #141c2e;
  --c-border:    rgba(255,255,255,0.08);
  --c-border-hi: rgba(255,255,255,0.14);
  --c-text:      #f0f4ff;
  --c-muted:     rgba(240,244,255,0.5);
  --c-accent:    #4f8ef7;
  --c-accent-hi: #7aaeff;
  --c-accent-glow: rgba(79,142,247,0.25);
  --c-success:   #34d399;
  --c-warning:   #fbbf24;
  --c-danger:    #f87171;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow:    0 8px 32px rgba(0,0,0,0.45);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.6);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace;

  --max-w: 760px;
  --pad: clamp(16px, 4vw, 32px);
  --gap: clamp(12px, 2vw, 20px);

  --transition: 0.18s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Background ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(79,142,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 10%,  rgba(99,102,241,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(15,23,42,0.9) 0%, transparent 70%);
}
.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at 50% 50%, transparent 40%, rgba(0,0,0,0.6) 100%);
}
.bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

/* ── Container ── */
.container {
  width: min(100% - 2 * var(--pad), var(--max-w));
  margin-inline: auto;
}

/* ── Header ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(8,12,20,0.75);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 16px;
}
.header-inner h1 { margin: 0; }

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 10px var(--c-accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  text-decoration: none;
  color: var(--c-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
  color: var(--c-text);
  background: rgba(255,255,255,0.06);
}
.nav-link.active {
  color: var(--c-text);
  background: rgba(255,255,255,0.08);
}
.nav-icon-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--c-warning);
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}
.nav-icon-link:hover {
  color: #fcd34d;
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.34);
  transform: translateY(-1px);
}
.nav-icon-link:active {
  transform: translateY(0);
}
.nav-icon-link svg {
  width: 16px;
  height: 16px;
}
.hairline { display: none; }

/* ── Main ── */
.app-main {
  flex: 1;
  padding-block: clamp(32px, 5vw, 64px);
}

.wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 24px);
}

/* ── Page title ── */
.page-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 4px;
}
.page-subtitle {
  color: var(--c-muted);
  font-size: 15px;
  margin-bottom: 8px;
}

/* ── Home hero ── */
.home-wrap {
  gap: clamp(24px, 4vw, 40px);
}
.hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: clamp(8px, 2vw, 20px) 0;
}
.hero-title {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
}
.hero-subtitle {
  max-width: 560px;
  color: var(--c-muted);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.hero-actions .btn {
  flex: 1 1 180px;
  max-width: 240px;
}

/* ── Home info card ── */
.info-card {
  display: block;
  text-decoration: none;
  color: var(--c-text);
  background:
    linear-gradient(135deg, rgba(251,191,36,0.09) 0%, rgba(251,191,36,0.025) 65%, rgba(251,191,36,0.05) 100%);
  border: 1px solid rgba(251,191,36,0.18);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 26px);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
  background:
    linear-gradient(135deg, rgba(251,191,36,0.12) 0%, rgba(251,191,36,0.035) 65%, rgba(251,191,36,0.07) 100%);
  border-color: rgba(251,191,36,0.32);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.info-card:active {
  transform: translateY(0);
}
.info-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.info-card-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 8px;
  color: var(--c-warning);
  background: rgba(251,191,36,0.12);
  border: 1px solid rgba(251,191,36,0.2);
}
.info-card-icon svg {
  width: 16px;
  height: 16px;
}
.info-card-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.1px;
}
.info-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-card-body p {
  color: rgba(240,244,255,0.62);
  font-size: 14px;
  line-height: 1.65;
}

/* ── Cards / Glass ── */
.glass {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.section { display: block; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 20px;
}

/* ── Rows / Layout ── */
.row {
  display: flex;
  gap: var(--gap);
  align-items: center;
  flex-wrap: wrap;
}
.grow { flex: 1 1 0; min-width: 0; }

/* ── Field groups ── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-group > span,
.field-group > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ── Inputs ── */
.input {
  appearance: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-size: 15px;
  padding: 11px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.input:hover {
  border-color: var(--c-border-hi);
  background: rgba(255,255,255,0.07);
}
.input:focus {
  border-color: var(--c-accent);
  background: rgba(79,142,247,0.06);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.15);
}
.input::placeholder { color: rgba(240,244,255,0.25); }
.input[readonly] {
  cursor: default;
  color: var(--c-muted);
}
.input[readonly]:focus {
  border-color: var(--c-border-hi);
  box-shadow: none;
  background: rgba(255,255,255,0.05);
}

select.input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(240,244,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ── Room code input ── */
.room-code-input {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  min-height: 72px;
}
.room-code-input:focus {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(79,142,247,0.15), 0 0 40px rgba(79,142,247,0.08);
}
.room-code-input::placeholder {
  color: rgba(240,244,255,0.15);
  letter-spacing: 0.2em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  appearance: none;
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,0.04);
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  position: relative;
  overflow: hidden;
}
.btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--c-border-hi);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79,142,247,0.4);
}

/* Primary button */
.btn-primary {
  background: var(--c-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 20px rgba(79,142,247,0.3);
}
.btn-primary:hover {
  background: var(--c-accent-hi);
  border-color: transparent;
  box-shadow: 0 6px 28px rgba(79,142,247,0.45);
}
.btn-primary:disabled {
  background: rgba(79,142,247,0.3);
  box-shadow: none;
}

.btn-secondary {
  background: rgba(255,255,255,0.055);
  border-color: var(--c-border-hi);
  color: var(--c-text);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.24);
}
.btn-lg {
  min-height: 48px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
}

/* Ghost / gloss kept for compat */
.gloss { background: rgba(255,255,255,0.07); }

/* ── Code display (receive page) ── */
.code.big {
  font-family: var(--font-mono);
  font-size: clamp(32px, 7vw, 52px);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-align: center;
  padding: 20px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  user-select: all;
  cursor: default;
}

/* ── Code + QR layout ── */
.code-qr-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.code-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qr-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  max-width: 280px;
}
.qr-frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  max-width: 100%;
  padding: 24px;
  background: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}
.qr {
  width: 192px;
  height: 192px;
  max-width: 100%;
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.qr canvas,
.qr img {
  display: block;
  max-width: 100%;
  height: auto;
}
.qr-frame .small {
  color: #1f2937;
}

/* ── Share link row (receive page) ── */
.share-link-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-top: 20px;
}
.share-link-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.share-link-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
}
.share-link-row .input {
  flex: 1 1 auto;
  min-width: 0;
  cursor: text;
}
.copy-link-btn {
  flex: 0 0 auto;
  gap: 7px;
  padding-inline: 14px;
  color: var(--c-text);
}
.copy-link-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.copy-link-btn.is-copied {
  color: var(--c-success);
  border-color: rgba(52,211,153,0.32);
  background: rgba(52,211,153,0.08);
}

/* ── Hint / notice inline ── */
.hint {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 4px;
}

/* ── Status notice ── */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--c-muted);
}
.notice[data-type="success"] { border-color: rgba(52,211,153,0.3); background: rgba(52,211,153,0.06); }
.notice[data-type="success"]::before { background: var(--c-success); box-shadow: 0 0 8px var(--c-success); }
.notice[data-type="warning"] { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }
.notice[data-type="warning"]::before { background: var(--c-warning); box-shadow: 0 0 8px var(--c-warning); }
.notice[data-type="error"]   { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); }
.notice[data-type="error"]::before   { background: var(--c-danger);  box-shadow: 0 0 8px var(--c-danger); }
.notice[data-type="info"]    { border-color: rgba(79,142,247,0.3);  background: rgba(79,142,247,0.06); }
.notice[data-type="info"]::before    { background: var(--c-accent);  box-shadow: 0 0 8px var(--c-accent); }

/* ── Progress ── */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progress {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}
.progress[hidden] {
  display: none;
}
.bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-hi));
  border-radius: 999px;
  transition: width 0.25s ease;
  position: relative;
}
.bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ── Dropzone ── */
.dropzone {
  display: block;
  position: relative;
  border: 1.5px dashed rgba(255,255,255,0.13);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.02);
  padding: 44px 40px;
  margin-top: 8px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.dropzone:hover {
  border-color: rgba(79,142,247,0.5);
  background: rgba(79,142,247,0.04);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(79,142,247,0.08);
}
.dropzone.drag-over {
  border-color: var(--c-accent);
  background: rgba(79,142,247,0.09);
  transform: translateY(-2px);
  box-shadow: 0 0 0 4px rgba(79,142,247,0.14), 0 12px 40px rgba(79,142,247,0.12);
}
.dropzone input[type="file"] { display: none; }

.dz-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Upload icon — SVG arrow-up style */
.dz-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.22);
  display: grid;
  place-items: center;
  color: var(--c-accent);
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.dz-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dropzone:hover .dz-icon {
  background: rgba(79,142,247,0.18);
  border-color: rgba(79,142,247,0.4);
  transform: translateY(-2px);
}

.dz-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.dz-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.2px;
}
.dz-sub {
  font-size: 13px;
  color: var(--c-muted);
  max-width: 280px;
  line-height: 1.5;
}
.dz-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--c-accent);
  color: #fff;
  margin-top: 4px;
  letter-spacing: 0.01em;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(79,142,247,0.25);
}
.dropzone:hover .dz-cta {
  background: var(--c-accent-hi);
  box-shadow: 0 6px 24px rgba(79,142,247,0.45);
  transform: translateY(-1px);
}

/* ── File list (selected files) ── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.file-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.file-list-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.file-list-clear {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}
.file-list-clear:hover {
  color: var(--c-danger);
  background: rgba(248,113,113,0.08);
}
.file-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(79,142,247,0.05);
  border: 1px solid rgba(79,142,247,0.12);
  font-size: 13px;
  color: var(--c-text);
  animation: fileItemIn 0.16s ease;
  transition: background var(--transition), border-color var(--transition);
}
.file-list-item:hover {
  background: rgba(79,142,247,0.09);
  border-color: rgba(79,142,247,0.22);
}
@keyframes fileItemIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.file-list-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(79,142,247,0.12);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--c-accent);
}
.file-list-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.file-list-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  font-size: 13px;
}
.file-list-size {
  font-size: 11px;
  color: var(--c-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.file-list-remove {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color var(--transition), background var(--transition);
  padding: 0;
}
.file-list-remove:hover {
  color: var(--c-danger);
  background: rgba(248,113,113,0.12);
}
.file-list-remove svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ── Dropzone disabled/transferring state ── */
.dropzone.is-transferring {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
  border-color: rgba(255,255,255,0.08);
}
.dropzone.is-transferring .dz-cta {
  background: rgba(79,142,247,0.3);
  box-shadow: none;
}

/* ── Send action row ── */
.send-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.send-action-row .btn-send {
  flex: 1;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 700;
  background: var(--c-accent);
  border-color: transparent;
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 20px rgba(79,142,247,0.3);
  letter-spacing: 0.01em;
}
.send-action-row .btn-send:hover:not(:disabled) {
  background: var(--c-accent-hi);
  box-shadow: 0 6px 28px rgba(79,142,247,0.45);
}
.send-action-row .btn-send:disabled {
  background: rgba(79,142,247,0.25);
  box-shadow: none;
  opacity: 1;
  color: rgba(255,255,255,0.4);
}

/* ── Downloads ── */
.downloads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,0.04);
  color: var(--c-text);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.download-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--c-border-hi);
  transform: translateX(2px);
}
.download-card strong { font-size: 14px; font-weight: 600; }
.download-card .muted { font-size: 12px; margin-left: auto; }

/* ── Typography helpers ── */
.label  { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.small  { font-size: 13px; }
.muted  { color: var(--c-muted); }
.mono   { font-family: var(--font-mono); }
.upper  { text-transform: uppercase; }
.legal  { line-height: 1.7; }

/* ── Fade animation (about page) ── */
.fade-target {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fade-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Social buttons ── */
.social { display: flex; gap: 8px; }
.social-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: rgba(255,255,255,0.05);
  color: var(--c-text);
  text-decoration: none;
  position: relative;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.social-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--c-border-hi);
  transform: translateY(-2px);
}
.social-btn svg { width: 16px; height: 16px; fill: currentColor; }
.social-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.social-btn:hover::before { opacity: 1; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border-hi);
  color: var(--c-text);
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Footer ── */
.app-footer {
  border-top: 1px solid var(--c-border);
  background: rgba(8,12,20,0.6);
  backdrop-filter: blur(12px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
  flex-wrap: wrap;
}

/* ── Accessibility ── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,1px,1px);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ── About page specifics ── */
.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.feature-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px;
}
.feature-card h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 8px;
}
.feature-card p { font-size: 14px; color: var(--c-muted); line-height: 1.6; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .code-qr-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .qr-col { align-items: flex-start; max-width: 100%; }
  .about-features { grid-template-columns: 1fr; }
  .join-row { flex-direction: column; align-items: stretch; }
  .join-row .btn { width: 100%; }
  .room-code-input { font-size: clamp(24px, 8vw, 36px); }
  .hero-actions .btn {
    flex-basis: 100%;
    max-width: none;
  }
  .share-link-row {
    flex-wrap: wrap;
  }
  .share-link-row .input {
    flex-basis: 100%;
  }
  .copy-link-btn {
    width: 100%;
  }

  /* Dropzone mobile — centered, compact */
  .dropzone {
    padding: 32px 20px;
  }
  .dz-visual {
    align-items: center;
    text-align: center;
  }
  .dz-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin-inline: auto;
  }
  .dz-title { font-size: 15px; }
  .dz-sub   { font-size: 12px; max-width: 220px; }
  .dz-cta   { margin-inline: auto; }
  .file-list-item { padding: 9px 12px; }

  /* Send button — full width on mobile */
  .send-action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .send-action-row .btn-send {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
  }
}

@media (max-width: 500px) {
  .header-inner { gap: 10px; }
  .nav { gap: 2px; }
  .nav-link { height: 34px; padding: 0 10px; font-size: 13px; }
  .nav-icon-link { width: 34px; height: 34px; }
  .glass { padding: 18px; }
  .code.big { font-size: clamp(26px, 9vw, 38px); letter-spacing: 0.14em; }
  .dropzone { padding: 28px 16px; }
  .dz-icon { width: 50px; height: 50px; }
  .file-list-name { font-size: 12px; }
  .info-card { padding: 18px; }
  .info-card-title { font-size: 15px; }
  .qr-frame { padding: 24px; }
  .hero-actions { gap: 10px; }
}

@media (max-width: 380px) {
  .header-inner { gap: 8px; padding-block: 12px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand::before { width: 7px; height: 7px; }
  .nav { gap: 1px; }
  .nav-link { padding: 0 8px; font-size: 12px; }
  .info-card-body p { font-size: 13.5px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .bar::after { display: none; }
}
