:root {
  --film-cycle: 7.4s;
}

.cinematic-home {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: #fff;
  background: #0b0d11;
}

.cinematic-home,
.cinematic-home button,
.cinematic-home input {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.cinematic-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 30;
  width: min(1440px, calc(100% - 48px));
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.cinematic-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.cinematic-header .brand-symbol {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.cinematic-login {
  min-height: 38px;
  padding: 0 17px;
  color: #17181b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 9px 30px rgba(0, 0, 0, 0.22);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  transition: transform 180ms ease, background 180ms ease;
}

.cinematic-login:hover,
.cinematic-login:focus-visible {
  background: #fff;
  transform: translateY(-1px);
}

.cinematic-login:active {
  transform: scale(0.97);
}

.cinematic-main,
.film-hero {
  position: relative;
  width: 100%;
  min-height: 100svh;
}

.film-hero {
  overflow: hidden;
  isolation: isolate;
  background: #0b0d11;
}

.film-hero::before {
  content: "";
  position: absolute;
  inset: -30px;
  z-index: -2;
  background: url("./net-kvm-link-cinematic-workspace.png") center / cover no-repeat;
  filter: blur(24px) brightness(0.42) saturate(0.8);
  transform: scale(1.09);
}

.film-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0.6) 0%, rgba(4, 6, 9, 0.08) 23%, rgba(4, 6, 9, 0) 61%, rgba(4, 6, 9, 0.6) 100%),
    radial-gradient(circle at 50% 43%, transparent 35%, rgba(0, 0, 0, 0.23) 100%);
}

.film-copy {
  position: absolute;
  top: clamp(64px, 8.3vh, 84px);
  left: 50%;
  z-index: 8;
  width: min(860px, calc(100% - 40px));
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.film-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.45rem, 4.45vw, 4.35rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-wrap: balance;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.56);
}

.film-stage {
  position: absolute;
  top: 53.8%;
  left: 50%;
  z-index: 0;
  width: max(100vw, 177.7778svh);
  height: max(100svh, 56.25vw);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.film-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  filter: brightness(0.86) contrast(1.04) saturate(0.95);
  user-select: none;
  -webkit-user-drag: none;
}

.film-vignette,
.film-reflection,
.handoff-aura,
.seam-flash,
.destination-bloom {
  position: absolute;
  pointer-events: none;
}

.film-vignette {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0.5) 0%, transparent 24%, transparent 67%, rgba(4, 6, 9, 0.52) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.16));
}

.film-reflection {
  inset: 0;
  left: -24%;
  z-index: 2;
  width: 21%;
  opacity: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.025) 46%, rgba(150, 205, 255, 0.12) 52%, transparent 100%);
  filter: blur(16px);
  transform: skewX(-12deg);
  animation: film-reflection var(--film-cycle) ease-in-out infinite;
}

.handoff-aura {
  top: 43.4%;
  left: 31.3%;
  z-index: 3;
  width: clamp(210px, 21vw, 330px);
  aspect-ratio: 1.9;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(113, 190, 255, 0.24) 0%, rgba(47, 140, 255, 0.1) 38%, transparent 72%);
  filter: blur(17px);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%) scale(0.72);
  will-change: left, top, transform, opacity;
  animation: handoff-aura var(--film-cycle) cubic-bezier(0.5, 0.02, 0.17, 1) infinite;
}

.seam-flash {
  top: 18.5%;
  bottom: 35.5%;
  left: 50.05%;
  z-index: 7;
  width: 2px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(193, 225, 255, 0.9) 26%, #fff 52%, rgba(157, 210, 255, 0.72) 76%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(115, 185, 255, 0.85), 0 0 32px rgba(67, 145, 255, 0.45);
  filter: blur(0.2px);
  transform: scaleY(0.18);
  transform-origin: center;
  animation: seam-flash var(--film-cycle) ease-out infinite;
}

.destination-bloom {
  top: 18.1%;
  left: 50.9%;
  z-index: 2;
  width: 44.1%;
  height: 43.8%;
  overflow: hidden;
  opacity: 0;
  background:
    radial-gradient(circle at 48% 55%, rgba(239, 245, 255, 0.17), transparent 42%),
    linear-gradient(115deg, rgba(93, 158, 255, 0.06), rgba(255, 232, 212, 0.1));
  border-radius: 0.3%;
  box-shadow: inset 0 0 38px rgba(190, 220, 255, 0.08);
  mix-blend-mode: screen;
  animation: destination-bloom var(--film-cycle) ease-in-out infinite;
}

.film-file {
  position: absolute;
  z-index: 5;
  width: clamp(195px, 15.3vw, 236px);
  min-height: 76px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #17181b;
  background: rgba(251, 252, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.film-file-icon {
  position: relative;
  width: 43px;
  height: 50px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #ff625b 0%, #d91f18 72%);
  border-radius: 9px;
  box-shadow: 0 9px 19px rgba(169, 27, 22, 0.28);
  font-size: 0.67rem;
  font-weight: 760;
  letter-spacing: 0.03em;
}

.film-file-icon::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 13px;
  height: 13px;
  background: linear-gradient(225deg, rgba(255, 255, 255, 0.86) 0 49%, rgba(255, 255, 255, 0.2) 50% 100%);
}

.film-file-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
}

.film-file-copy strong,
.film-file-copy small {
  overflow: hidden;
  color: #17181b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-file-copy strong {
  font-size: 0.86rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.film-file-copy small {
  color: #6e7077;
  font-size: 0.75rem;
}

.source-tile {
  top: 43.4%;
  left: 31.3%;
  animation: source-tile var(--film-cycle) ease-in-out infinite;
}

.source-focus {
  position: absolute;
  top: 43.4%;
  left: 31.3%;
  z-index: 4;
  width: clamp(215px, 17vw, 260px);
  height: 98px;
  opacity: 0;
  border: 1px solid rgba(156, 208, 255, 0.88);
  border-radius: 20px;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1), 0 0 38px rgba(0, 113, 227, 0.3);
  transform: translate(-50%, -50%) scale(0.94);
  animation: source-focus var(--film-cycle) ease-out infinite;
}

.drag-object {
  top: 43.4%;
  left: 31.3%;
  z-index: 8;
  width: clamp(218px, 17vw, 260px);
  min-height: 82px;
  opacity: 0;
  will-change: left, top, transform, opacity, filter;
  isolation: isolate;
  animation: drag-object var(--film-cycle) cubic-bezier(0.5, 0.02, 0.17, 1) infinite;
}

.drag-object::before,
.drag-object::after {
  content: "";
  position: absolute;
  top: 13px;
  right: 65%;
  z-index: -1;
  width: 150px;
  height: calc(100% - 26px);
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(168, 211, 255, 0.13) 72%, rgba(255, 255, 255, 0.23));
  border-radius: 999px;
  filter: blur(11px);
  animation: drag-trail-real var(--film-cycle) ease-in-out infinite;
}

.drag-object::after {
  right: 82%;
  width: 88px;
  filter: blur(18px);
  animation-delay: 55ms;
}

.film-cursor {
  position: absolute;
  top: 50%;
  left: 26.8%;
  z-index: 10;
  width: 29px;
  height: auto;
  overflow: visible;
  opacity: 0;
  fill: #fff;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-linejoin: round;
  stroke-width: 2.1;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.48));
  will-change: left, top, opacity;
  animation: film-cursor-real var(--film-cycle) cubic-bezier(0.5, 0.02, 0.17, 1) infinite;
}

.grab-wave,
.release-wave {
  position: absolute;
  z-index: 7;
  width: 22px;
  height: 22px;
  opacity: 0;
  border: 2px solid rgba(147, 205, 255, 0.94);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(70, 163, 255, 0.58);
  transform: translate(-50%, -50%) scale(0.3);
}

.grab-wave {
  top: 48.1%;
  left: 39.4%;
  animation: grab-wave-real var(--film-cycle) ease-out infinite;
}

.release-wave {
  top: 48.1%;
  left: 80.2%;
  animation: release-wave-real var(--film-cycle) ease-out infinite;
}

.received-tile {
  top: 43.4%;
  left: 72.1%;
  z-index: 6;
  opacity: 0;
  animation: received-tile-real var(--film-cycle) cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.received-check {
  width: 29px;
  height: 29px;
  margin-left: auto;
  display: grid;
  place-items: center;
  flex: none;
  color: #16723b;
  background: #e5f8ec;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 750;
}

.cinematic-legal {
  position: absolute;
  bottom: 19px;
  left: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 17px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.72rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
  white-space: nowrap;
}

.cinematic-legal a {
  color: inherit;
}

.cinematic-legal a:hover,
.cinematic-legal a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

@keyframes source-tile {
  0%, 19% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  23% { opacity: 1; transform: translate(-50%, -50%) scale(1.015); filter: brightness(1.06); }
  27%, 88% { opacity: 0; transform: translate(-50%, -50%) scale(0.97); filter: brightness(1); }
  95%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes source-focus {
  0%, 10% { opacity: 0; transform: translate(-50%, -50%) scale(0.94); }
  15%, 22% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  27%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.035); }
}

@keyframes drag-object {
  0%, 21% { left: 31.3%; top: 43.4%; opacity: 0; transform: translate(-50%, -50%) scale(0.92) rotate(0deg); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0)); }
  24% { left: 31.3%; top: 42.7%; opacity: 1; transform: translate(-50%, -50%) scale(1.045) rotate(-0.6deg); filter: drop-shadow(0 22px 20px rgba(0, 0, 0, 0.28)); }
  29% { left: 34.8%; top: 41.8%; opacity: 1; transform: translate(-50%, -50%) scale(1.06) rotate(-0.9deg); filter: drop-shadow(0 25px 22px rgba(0, 0, 0, 0.3)); }
  42% { left: 45%; top: 40.7%; opacity: 1; transform: translate(-50%, -50%) scale(1.075) rotate(-0.45deg); filter: drop-shadow(0 27px 24px rgba(0, 0, 0, 0.31)); }
  53% { left: 51.7%; top: 40.25%; opacity: 1; transform: translate(-50%, -50%) scale(1.085) rotate(0deg); filter: drop-shadow(0 28px 25px rgba(0, 0, 0, 0.32)); }
  65% { left: 63.9%; top: 40.8%; opacity: 1; transform: translate(-50%, -50%) scale(1.07) rotate(0.45deg); filter: drop-shadow(0 26px 23px rgba(0, 0, 0, 0.31)); }
  72% { left: 70.5%; top: 42.1%; opacity: 1; transform: translate(-50%, -50%) scale(1.04) rotate(0.3deg); filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.25)); }
  76%, 79% { left: 72.1%; top: 43.4%; opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.15)); }
  83%, 100% { left: 72.1%; top: 43.4%; opacity: 0; transform: translate(-50%, -50%) scale(0.96) rotate(0deg); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0)); }
}

@keyframes film-cursor-real {
  0%, 6% { left: 25.5%; top: 51%; opacity: 0; }
  10% { left: 27.5%; top: 49%; opacity: 1; }
  18%, 24% { left: 39.4%; top: 48.1%; opacity: 1; }
  29% { left: 42.9%; top: 46.5%; opacity: 1; }
  42% { left: 53.1%; top: 45.35%; opacity: 1; }
  53% { left: 59.8%; top: 44.9%; opacity: 1; }
  65% { left: 72%; top: 45.45%; opacity: 1; }
  72% { left: 78.6%; top: 46.75%; opacity: 1; }
  76%, 79% { left: 80.2%; top: 48.1%; opacity: 1; }
  83%, 100% { left: 81.4%; top: 49.4%; opacity: 0; }
}

@keyframes grab-wave-real {
  0%, 18% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  21% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.45); }
  28%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); }
}

@keyframes release-wave-real {
  0%, 73% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  76% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.45); }
  84%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.75); }
}

@keyframes received-tile-real {
  0%, 79% { opacity: 0; transform: translate(-50%, -50%) scale(0.94); filter: brightness(1.08); }
  84% { opacity: 1; transform: translate(-50%, -50%) scale(1.025); filter: brightness(1.04); }
  88%, 96% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
}

@keyframes drag-trail-real {
  0%, 27%, 80%, 100% { opacity: 0; }
  40%, 66% { opacity: 0.78; }
}

@keyframes film-reflection {
  0%, 30% { left: -24%; opacity: 0; }
  41% { opacity: 0.22; }
  72% { left: 105%; opacity: 0.22; }
  82%, 100% { left: 105%; opacity: 0; }
}

@keyframes handoff-aura {
  0%, 20% { left: 31.3%; top: 43.4%; opacity: 0; transform: translate(-50%, -50%) scale(0.72); }
  25% { left: 31.3%; top: 42.7%; opacity: 0.5; transform: translate(-50%, -50%) scale(0.9); }
  42% { left: 45%; top: 40.7%; opacity: 0.62; transform: translate(-50%, -50%) scale(1); }
  53% { left: 51.7%; top: 40.25%; opacity: 0.82; transform: translate(-50%, -50%) scale(1.12); }
  65% { left: 63.9%; top: 40.8%; opacity: 0.58; transform: translate(-50%, -50%) scale(1); }
  77% { left: 72.1%; top: 43.4%; opacity: 0.38; transform: translate(-50%, -50%) scale(0.9); }
  84%, 100% { left: 72.1%; top: 43.4%; opacity: 0; transform: translate(-50%, -50%) scale(0.74); }
}

@keyframes seam-flash {
  0%, 47% { opacity: 0; transform: scaleY(0.18); }
  51% { opacity: 0.32; transform: scaleY(0.72); }
  54% { opacity: 0.9; transform: scaleY(1); }
  59% { opacity: 0.18; transform: scaleY(0.68); }
  64%, 100% { opacity: 0; transform: scaleY(0.2); }
}

@keyframes destination-bloom {
  0%, 51% { opacity: 0; }
  63% { opacity: 0.22; }
  78%, 90% { opacity: 0.58; }
  100% { opacity: 0; }
}

@media (max-width: 760px) {
  .cinematic-header {
    width: calc(100% - 30px);
    height: 54px;
  }

  .cinematic-header .brand {
    gap: 6px;
    font-size: 0.76rem;
  }

  .cinematic-header .brand-symbol {
    width: 20px;
    height: 20px;
  }

  .cinematic-login {
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.75rem;
  }

  .film-copy {
    top: clamp(105px, 16.5svh, 142px);
    width: calc(100% - 28px);
  }

  .film-copy h1 {
    font-size: clamp(1.82rem, 8vw, 2.15rem);
    letter-spacing: -0.065em;
    white-space: nowrap;
  }

  .film-stage {
    top: 49.5%;
    width: 132vw;
    height: 74.25vw;
    overflow: visible;
  }

  .film-vignette {
    inset: -2px;
  }

  .film-file {
    width: 124px;
    min-height: 50px;
    padding: 6px 7px;
    gap: 6px;
    border-radius: 10px;
  }

  .film-file-icon {
    width: 30px;
    height: 35px;
    border-radius: 6px;
    font-size: 0.48rem;
  }

  .film-file-icon::after {
    width: 9px;
    height: 9px;
  }

  .film-file-copy {
    gap: 1px;
  }

  .film-file-copy strong {
    font-size: 0.72rem;
  }

  .film-file-copy small {
    display: none;
  }

  .source-focus {
    width: 140px;
    height: 62px;
    border-radius: 12px;
  }

  .drag-object {
    width: 144px;
    min-height: 54px;
  }

  .drag-object::before {
    width: 92px;
  }

  .drag-object::after {
    width: 58px;
  }

  .film-cursor {
    width: 21px;
  }

  .grab-wave,
  .release-wave {
    width: 15px;
    height: 15px;
  }

  .received-check {
    width: 20px;
    height: 20px;
    font-size: 0.58rem;
  }

  .cinematic-legal {
    bottom: 17px;
    gap: 14px;
    font-size: 0.68rem;
  }

  .film-hero::after {
    background:
      linear-gradient(180deg, rgba(4, 6, 9, 0.5) 0%, rgba(4, 6, 9, 0.05) 22%, rgba(4, 6, 9, 0.04) 68%, rgba(4, 6, 9, 0.7) 100%),
      radial-gradient(circle at 50% 48%, transparent 25%, rgba(0, 0, 0, 0.28) 100%);
  }
}

@media (max-width: 430px) and (max-height: 720px) {
  .film-copy {
    top: 76px;
  }

  .film-stage {
    top: 51%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-reflection,
  .handoff-aura,
  .seam-flash,
  .destination-bloom,
  .source-tile,
  .source-focus,
  .drag-object,
  .drag-object::before,
  .drag-object::after,
  .film-cursor,
  .grab-wave,
  .release-wave,
  .received-tile {
    animation: none;
  }

  .film-reflection,
  .handoff-aura,
  .seam-flash,
  .destination-bloom,
  .source-tile,
  .source-focus,
  .drag-object,
  .film-cursor,
  .grab-wave,
  .release-wave {
    opacity: 0;
  }

  .received-tile {
    opacity: 1;
  }
}
