:root {
  color-scheme: light;
  --blue: #4d8df7;
  --red: #ef6a62;
  --yellow: #f7c948;
  --green: #39b984;
  --ink: #152033;
  --muted: #66738b;
  --panel: rgba(255, 255, 255, 0.48);
  --panel-strong: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.62);
  --line-strong: rgba(121, 146, 187, 0.22);
  --shadow: 0 22px 70px rgba(61, 86, 122, 0.14);
  --inner: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(77, 141, 247, 0.28), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(239, 106, 98, 0.16), transparent 25%),
    radial-gradient(circle at 15% 92%, rgba(247, 201, 72, 0.18), transparent 30%),
    radial-gradient(circle at 90% 88%, rgba(57, 185, 132, 0.18), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #eef6ff 48%, #eefbf2 100%);
}

button,
input {
  font: inherit;
}

main {
  min-height: 100vh;
}

.landing-view {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.landing-view.hidden,
.tool-view.hidden {
  display: none;
}

.site-nav {
  position: relative;
  z-index: 3;
  width: min(1180px, 100% - 28px);
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 14px 0;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
}

.nav-brand .logo {
  width: 44px;
  height: 44px;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
}

.nav-action,
.hero-primary,
.hero-secondary,
.home-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.nav-action {
  min-width: 126px;
  color: #17396f;
  border: 1px solid rgba(77, 141, 247, 0.16);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--inner);
}

.hero {
  min-height: calc(100vh - 96px);
  position: relative;
  display: grid;
  place-items: center;
  padding: 76px 18px 96px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14)),
    repeating-linear-gradient(90deg, rgba(40, 55, 85, 0.06) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(40, 55, 85, 0.05) 0 1px, transparent 1px 72px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 12% 8% 10%;
  z-index: -2;
  border-radius: 48px;
  background:
    radial-gradient(circle at 30% 40%, rgba(77, 141, 247, 0.22), transparent 30%),
    radial-gradient(circle at 68% 36%, rgba(57, 185, 132, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: 0 42px 120px rgba(61, 86, 122, 0.2);
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.signal-map {
  position: absolute;
  inset: 16% 10%;
  border-radius: 46px;
}

.node {
  position: absolute;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(18px);
}

.node::before {
  content: "";
  position: absolute;
  inset: 19px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.node.desktop {
  left: 13%;
  top: 44%;
}

.node.phone {
  right: 12%;
  top: 27%;
  width: 58px;
  height: 86px;
  border-radius: 20px;
}

.node.tablet {
  right: 25%;
  bottom: 20%;
}

.line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(77, 141, 247, 0.6), rgba(57, 185, 132, 0.4), transparent);
}

.line.one {
  width: 50%;
  left: 18%;
  top: 50%;
  transform: rotate(-13deg);
}

.line.two {
  width: 42%;
  left: 33%;
  top: 57%;
  transform: rotate(18deg);
}

.packet {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 10px rgba(77, 141, 247, 0.1);
  animation: drift 7s linear infinite;
}

.packet.p1 { left: 20%; top: 49%; }
.packet.p2 { left: 54%; top: 42%; animation-delay: -2s; background: var(--green); }
.packet.p3 { left: 64%; top: 63%; animation-delay: -4s; background: var(--red); }

.floating-file,
.floating-qr {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 30px 80px rgba(61, 86, 122, 0.18), var(--inner);
  backdrop-filter: blur(18px) saturate(150%);
}

.floating-file {
  width: 108px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 24px;
}

.image-file {
  right: 10%;
  bottom: 19%;
  background:
    linear-gradient(145deg, rgba(77, 141, 247, 0.1), rgba(57, 185, 132, 0.15)),
    linear-gradient(135deg, #f6b9c5 0 42%, #f7c948 42% 58%, #39b984 58% 100%);
}

.pdf-file {
  left: 12%;
  top: 23%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.pdf-file strong {
  font-size: 24px;
}

.floating-qr {
  left: 18%;
  bottom: 17%;
  width: 116px;
  height: 116px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 18px;
  border-radius: 28px;
}

.floating-qr span {
  border-radius: 5px;
  background: #152033;
}

.floating-qr span:nth-child(3n) {
  background: var(--blue);
}

.hero-copy {
  width: min(780px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.hero-kicker {
  color: #2d5f9e;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(56px, 10vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-lead {
  width: min(650px, 100%);
  color: #526078;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-primary {
  min-width: 158px;
  padding: 0 24px;
  color: white;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 18px 34px rgba(77, 141, 247, 0.22);
}

.hero-secondary {
  min-width: 158px;
  padding: 0 22px;
  color: #17396f;
  border: 1px solid rgba(77, 141, 247, 0.16);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--inner);
}

.landing-strip {
  width: min(980px, 100% - 28px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: -56px auto 28px;
  position: relative;
  z-index: 2;
}

.landing-strip article {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(20px) saturate(150%);
}

.landing-strip strong {
  font-size: 18px;
}

.landing-strip span {
  color: var(--muted);
  font-size: 14px;
}

.app-shell {
  width: min(1180px, 100% - 28px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 22px;
}

.topbar,
.panel,
.status-pill,
.logo {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(24px) saturate(160%);
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 20px;
}

.identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 52px;
  height: 52px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  padding: 9px;
  border-radius: 18px;
  background: var(--panel-strong);
}

.logo span {
  border-radius: 999px;
}

.blue { background: var(--blue); }
.red { background: var(--red); }
.yellow { background: var(--yellow); }
.green { background: var(--green); }

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy h1 {
  order: 1;
  margin: 0;
  font-size: 31px;
  letter-spacing: 0;
}

.eyebrow {
  order: 2;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 999px;
  text-align: center;
  color: #526178;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.5);
}

.status-pill.connected {
  color: #0f6f3f;
  background: rgba(57, 185, 132, 0.18);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-link {
  min-width: 96px;
  padding: 0 16px;
  color: #17396f;
  border: 1px solid rgba(77, 141, 247, 0.16);
  background: rgba(255, 255, 255, 0.52);
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.panel {
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28)),
    var(--panel);
}

.setup-panel,
.transfer-panel {
  min-height: calc(100vh - 130px);
  padding: 16px;
}

.mode-view,
.device-panel {
  display: grid;
  gap: 12px;
}

h2,
p {
  margin: 0;
}

h2 {
  font-size: 22px;
}

p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.hidden {
  display: none;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
}

.primary {
  color: white;
  font-weight: 800;
  background: linear-gradient(90deg, var(--blue), var(--green));
  box-shadow: 0 14px 28px rgba(77, 141, 247, 0.18);
}

.secondary {
  color: #17396f;
  font-weight: 800;
  border: 1px solid rgba(77, 141, 247, 0.16);
  background: rgba(77, 141, 247, 0.13);
}

.danger {
  color: #9b2118;
  font-weight: 800;
  border: 1px solid rgba(239, 106, 98, 0.18);
  background: rgba(239, 106, 98, 0.12);
}

.notice {
  padding: 12px;
  border: 1px solid rgba(239, 106, 98, 0.22);
  border-radius: 13px;
  color: #8a1f17;
  background: rgba(239, 106, 98, 0.09);
  line-height: 1.7;
}

.device-header,
.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344155;
  font-weight: 800;
}

.device-header strong,
.queue-header span {
  min-width: 34px;
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f6f3f;
  background: rgba(57, 185, 132, 0.15);
}

.device-list {
  display: grid;
  gap: 8px;
  max-height: 164px;
  overflow: auto;
}

.device-empty,
.device-row,
.join-card,
.dropzone,
.file-row {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
  box-shadow: var(--inner);
}

.device-empty,
.device-row {
  min-height: 44px;
  display: grid;
  align-items: center;
  border-radius: 14px;
}

.device-empty {
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.device-row {
  grid-template-columns: 34px minmax(0, 1fr) 9px;
  gap: 9px;
  padding: 7px 9px;
}

.device-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #17396f;
  background: rgba(77, 141, 247, 0.13);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}

.device-icon.ios,
.device-icon.mac {
  color: #313746;
  background: rgba(49, 55, 70, 0.1);
}

.device-icon.android {
  color: #0f6f3f;
  background: rgba(57, 185, 132, 0.15);
}

.device-icon.windows {
  color: #12366f;
  background: rgba(77, 141, 247, 0.13);
}

.device-icon.linux {
  color: #7a4b00;
  background: rgba(247, 201, 72, 0.18);
}

.device-name,
.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.device-meta,
.file-state {
  color: var(--muted);
  font-size: 13px;
}

.device-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
}

.join-card {
  min-height: 250px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
}

.join-card img {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  background: white;
  object-fit: contain;
}

.join-card img:not([src]) {
  opacity: 0;
}

.join-info {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.join-info span {
  color: var(--muted);
  font-size: 12px;
}

.join-info strong {
  overflow-wrap: anywhere;
  font-size: 28px;
}

.session-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.transfer-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  min-width: 0;
}

.dropzone {
  position: relative;
  min-height: 138px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  text-align: center;
  outline: 1px dashed rgba(77, 141, 247, 0.42);
  outline-offset: -12px;
}

.dropzone.dragover {
  background: rgba(77, 141, 247, 0.11);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #17396f;
  background: rgba(77, 141, 247, 0.13);
}

.drop-icon::before {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 20px;
  height: 16px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.drop-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 11px;
  width: 14px;
  height: 14px;
  border-top: 2px solid #17396f;
  border-left: 2px solid #17396f;
  transform: rotate(45deg);
}

.drop-copy {
  display: grid;
  gap: 4px;
}

.drop-copy strong {
  font-size: 18px;
}

.drop-copy span {
  color: var(--muted);
  font-size: 14px;
}

.file-list {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 12px;
  align-content: start;
  overflow: auto;
  padding: 2px;
}

.file-row {
  position: relative;
  min-height: 220px;
  display: grid;
  grid-template-rows: 124px minmax(52px, auto) 36px;
  gap: 9px;
  padding: 10px;
  border-radius: 18px;
  overflow: hidden;
}

.file-preview {
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(77, 141, 247, 0.92), rgba(57, 185, 132, 0.88));
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-icon {
  color: white;
  text-align: center;
}

.file-icon strong {
  display: block;
  font-size: 30px;
}

.file-icon span {
  font-size: 13px;
}

.file-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.file-state {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.file-action a {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.remove-file {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #9b2118;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 22px rgba(61, 86, 122, 0.18);
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.2;
  }

  35% {
    opacity: 1;
  }

  100% {
    transform: translate3d(210px, -46px, 0);
    opacity: 0;
  }
}

@media (max-width: 860px) {
  .site-nav {
    width: min(100% - 18px, 560px);
  }

  .hero {
    min-height: 720px;
    padding: 54px 16px 94px;
  }

  .hero::after {
    inset: 16% 4% 14%;
    border-radius: 34px;
  }

  .node.desktop {
    left: 4%;
    top: 48%;
  }

  .node.phone {
    right: 5%;
    top: 20%;
  }

  .node.tablet {
    right: 12%;
    bottom: 14%;
  }

  .floating-file,
  .floating-qr {
    opacity: 0.74;
    transform: scale(0.84);
  }

  .landing-strip {
    grid-template-columns: 1fr;
    margin-top: -44px;
  }

  .app-shell {
    width: min(100% - 18px, 560px);
    padding-top: 10px;
  }

  .topbar {
    min-height: 88px;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .setup-panel,
  .transfer-panel {
    min-height: auto;
    padding: 12px;
  }

  .join-card {
    min-height: 210px;
  }

  .join-card img {
    width: 150px;
    height: 150px;
  }

  .file-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .site-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-action {
    width: 100%;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-primary,
  .hero-secondary {
    width: 100%;
  }

  .top-actions {
    width: 100%;
    flex-direction: column;
  }

  .home-link,
  .status-pill {
    width: 100%;
  }

  .file-list {
    grid-template-columns: 1fr;
  }

  .brand-copy h1 {
    font-size: 28px;
  }

  .session-actions {
    gap: 8px;
  }
}
