.player-page {
  --bg: #050506;
  --panel: #0b0c0a;
  --text: #f7f7f0;
  --muted: rgb(247 247 240 / 64%);
  --green: #b8ff36;
}

.player-page a {
  color: inherit;
  text-decoration: none;
}

.player-page button,
.player-page a {
  -webkit-tap-highlight-color: transparent;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgb(184 255 54 / 12%), transparent 24%),
    #000;
  opacity: 1;
  perspective: 1100px;
  transition:
    opacity 620ms ease,
    visibility 620ms step-end;
}

html.is-loading,
html.loader-opening {
  overflow: hidden;
}

html.is-loading .site-loader,
html.loader-opening .site-loader {
  display: grid;
}

html.loader-opening .site-loader {
  visibility: hidden;
  opacity: 0;
}

.site-loader::before,
.site-loader::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.site-loader::before {
  background:
    linear-gradient(90deg, rgb(184 255 54 / 5%) 1px, transparent 1px),
    linear-gradient(rgb(184 255 54 / 5%) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle at center, rgb(0 0 0 / 88%), transparent 72%);
}

.site-loader::after {
  background:
    radial-gradient(circle at center, transparent 0 18%, rgb(0 0 0 / 34%) 52%, rgb(0 0 0 / 88%) 100%),
    repeating-linear-gradient(0deg, rgb(247 247 240 / 9%) 0 1px, transparent 1px 6px);
  mix-blend-mode: screen;
}

.site-loader__warp {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(34vw, 260px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
}

.site-loader__warp::before {
  position: absolute;
  inset: 18%;
  border: 1px solid rgb(184 255 54 / 36%);
  border-radius: 999px;
  content: "";
  filter: drop-shadow(0 0 22px rgb(184 255 54 / 42%));
  animation: loader-ring 3s cubic-bezier(0.18, 0.9, 0.16, 1) forwards;
}

.site-loader__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 18px rgb(184 255 54 / 28%))
    drop-shadow(0 0 46px rgb(184 255 54 / 20%));
  transform-origin: center;
  animation: loader-logo-arrival 3s cubic-bezier(0.16, 0.92, 0.12, 1) forwards;
  will-change: opacity, transform, filter;
}

@keyframes loader-logo-arrival {
  0% {
    opacity: 0;
    filter:
      blur(14px)
      drop-shadow(0 0 0 rgb(184 255 54 / 0%));
    transform: translate3d(0, 18vh, -1200px) rotateY(-58deg) rotateZ(-8deg) scale(0.04);
  }

  18% {
    opacity: 1;
  }

  58% {
    filter:
      blur(0)
      drop-shadow(0 0 18px rgb(184 255 54 / 34%))
      drop-shadow(0 0 52px rgb(184 255 54 / 22%));
    transform: translate3d(0, 0, -120px) rotateY(10deg) rotateZ(0deg) scale(0.92);
  }

  78% {
    opacity: 1;
    transform: translate3d(0, 0, 120px) rotateY(0deg) rotateZ(0deg) scale(1.22);
  }

  100% {
    opacity: 0.06;
    filter:
      blur(2px)
      drop-shadow(0 0 42px rgb(184 255 54 / 42%));
    transform: translate3d(0, 0, 680px) rotateY(0deg) rotateZ(0deg) scale(18);
  }
}

@keyframes loader-ring {
  0% {
    opacity: 0;
    transform: translateZ(-900px) scale(0.08);
  }

  45% {
    opacity: 0.62;
  }

  100% {
    opacity: 0;
    transform: translateZ(520px) scale(8);
  }
}

.video-player-unit {
  position: relative;
  display: grid;
  width: 100%;
}

.direct-player-route {
  display: none;
}

@media (max-width: 720px) {
  .site-loader__warp {
    width: min(48vw, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader,
  .site-loader__logo,
  .site-loader__warp::before {
    animation-duration: 900ms;
  }
}

html[data-route="player"] #app,
html[data-route="player"] .site-footer {
  display: none;
}

html[data-route="player"] .direct-player-route {
  display: block;
}

html[data-route="player"] body {
  background:
    radial-gradient(circle at 50% 10%, rgb(184 255 54 / 10%), transparent 30%),
    #050506;
}

.main-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  width: min(1120px, calc(100vw - 32px));
  border: 1px solid rgb(184 255 54 / 18%);
  border-radius: 8px;
  overflow: hidden;
  padding: 8px;
  background: rgb(5 5 6 / 82%);
  box-shadow:
    0 18px 54px rgb(0 0 0 / 36%),
    0 0 34px rgb(184 255 54 / 8%);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.nav-neon {
  position: absolute;
  inset: -1px;
  z-index: 0;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
}

.nav-neon-line {
  fill: none;
  stroke: #b8ff36;
  stroke-width: 2px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgb(184 255 54 / 88%));
  stroke-dasharray: 10 90;
}

.nav-neon-line-a {
  animation: nav-trace-one 3.6s ease-in-out infinite alternate;
}

.nav-neon-line-b {
  opacity: 0.78;
  stroke: rgb(225 255 142);
  animation: nav-trace-two 3.6s ease-in-out infinite alternate;
}

.main-nav > :not(.nav-neon) {
  position: relative;
  z-index: 1;
}

@keyframes nav-trace-one {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -46;
  }
}

@keyframes nav-trace-two {
  from {
    stroke-dashoffset: -50;
  }

  to {
    stroke-dashoffset: -4;
  }
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 188px;
}

.brand-mark,
.mobile-logo {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(184 255 54 / 38%);
  border-radius: 8px;
  overflow: hidden;
  background: #020202;
}

.brand-mark {
  width: 48px;
  height: 48px;
}

.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.mobile-logo {
  display: none;
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
  letter-spacing: 0;
}

.brand-lockup strong {
  color: #f7f7f0;
  font-size: 0.96rem;
}

.brand-lockup small {
  color: #b8ff36;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-links {
  justify-self: center;
  display: inline-flex;
  gap: 2px;
  border: 1px solid rgb(247 247 240 / 8%);
  border-radius: 8px;
  padding: 3px;
  background: rgb(247 247 240 / 4%);
}

.nav-links a,
.nav-cta {
  border-radius: 8px;
  padding: 11px 14px;
  color: rgb(247 247 240 / 70%);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-links a:hover {
  color: #f7f7f0;
  background: rgb(247 247 240 / 8%);
}

.nav-socials {
  justify-self: end;
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
}

.nav-socials a {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(184 255 54 / 18%);
  border-radius: 8px;
  color: #b8ff36;
  background: rgb(184 255 54 / 6%);
  box-shadow: inset 0 0 18px rgb(184 255 54 / 4%);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.nav-socials a:hover {
  border-color: rgb(184 255 54 / 54%);
  color: #050506;
  background: #b8ff36;
  transform: translateY(-1px);
}

.nav-socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-cta {
  justify-self: end;
  color: #050506;
  background: #b8ff36;
}

.main-nav a:focus-visible {
  outline: 2px solid #b8ff36;
  outline-offset: 4px;
}

.video-wrapper {
  position: relative;
  min-height: 240px;
  border: 1px solid rgb(247 247 240 / 12%);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(247 247 240 / 5%), rgb(247 247 240 / 2%)),
    #050506;
}

.video-wrapper::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgb(184 255 54 / 10%), transparent),
    linear-gradient(0deg, rgb(184 255 54 / 5%), transparent 45%, rgb(184 255 54 / 4%));
  mix-blend-mode: screen;
}

.video-wrapper video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  background: #020202;
}

.video-status {
  display: none;
}

.video-player-unit[data-video-status="empty"] .video-wrapper::after,
.video-player-unit[data-video-status="error"] .video-wrapper::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgb(247 247 240 / 68%);
  text-align: center;
  content: "Connect a BRO video in /api/video";
  background:
    radial-gradient(circle at center, rgb(184 255 54 / 9%), transparent 48%),
    linear-gradient(180deg, rgb(5 5 6 / 44%), rgb(5 5 6 / 86%));
}

.player-page {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: #f7f7f0;
  background:
    radial-gradient(circle at 50% 10%, rgb(184 255 54 / 10%), transparent 30%),
    #050506;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.player-page-shell {
  width: min(1120px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 132px 0 64px;
}

.player-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(38px, 7vw, 74px);
}

.player-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.player-brand img {
  width: 48px;
  height: 48px;
  border: 1px solid rgb(184 255 54 / 38%);
  border-radius: 8px;
  object-fit: contain;
  background: #020202;
}

.player-brand strong,
.player-brand small {
  display: block;
}

.player-brand small {
  color: #b8ff36;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-home-link {
  border: 1px solid rgb(247 247 240 / 12%);
  border-radius: 8px;
  padding: 12px 14px;
  color: rgb(247 247 240 / 72%);
  background: rgb(247 247 240 / 5%);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.player-hero {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 24px;
  align-items: start;
}

.player-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.player-copy p:first-child {
  margin: 0 0 12px;
  color: #b8ff36;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-copy h1 {
  max-width: 880px;
  margin: 0;
  color: #f7f7f0;
  font-size: clamp(3.4rem, 8vw, 7.2rem);
  font-weight: 1000;
  line-height: 0.84;
}

.direct-player-card {
  position: relative;
  isolation: isolate;
  width: min(940px, 100%);
  border: 1px solid rgb(184 255 54 / 20%);
  border-radius: 8px;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(184 255 54 / 5%), transparent 42%),
    rgb(11 12 10 / 78%);
  box-shadow:
    0 0 0 1px rgb(247 247 240 / 4%) inset,
    0 0 42px rgb(184 255 54 / 10%),
    0 24px 90px rgb(0 0 0 / 58%);
}

.direct-player-card::before,
.direct-player-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.direct-player-card::before {
  z-index: 2;
  background:
    linear-gradient(
        90deg,
        transparent 0 12%,
        rgb(184 255 54 / 12%) 18%,
        rgb(184 255 54 / 98%) 27%,
        rgb(247 247 240 / 92%) 31%,
        rgb(184 255 54 / 98%) 35%,
        rgb(184 255 54 / 12%) 44%,
        transparent 52% 100%
      )
      top left / 260px 2px repeat-x,
    linear-gradient(
        270deg,
        transparent 0 12%,
        rgb(184 255 54 / 12%) 18%,
        rgb(184 255 54 / 98%) 27%,
        rgb(247 247 240 / 92%) 31%,
        rgb(184 255 54 / 98%) 35%,
        rgb(184 255 54 / 12%) 44%,
        transparent 52% 100%
      )
      bottom right / 260px 2px repeat-x,
    linear-gradient(
        180deg,
        transparent 0 12%,
        rgb(184 255 54 / 12%) 18%,
        rgb(184 255 54 / 98%) 27%,
        rgb(247 247 240 / 92%) 31%,
        rgb(184 255 54 / 98%) 35%,
        rgb(184 255 54 / 12%) 44%,
        transparent 52% 100%
      )
      top right / 2px 260px repeat-y,
    linear-gradient(
        0deg,
        transparent 0 12%,
        rgb(184 255 54 / 12%) 18%,
        rgb(184 255 54 / 98%) 27%,
        rgb(247 247 240 / 92%) 31%,
        rgb(184 255 54 / 98%) 35%,
        rgb(184 255 54 / 12%) 44%,
        transparent 52% 100%
      )
      bottom left / 2px 260px repeat-y;
  filter: drop-shadow(0 0 7px rgb(184 255 54 / 72%));
  animation: bro-border-stitch-slide 4.8s linear infinite;
}

.direct-player-card::after {
  z-index: 0;
  border: 1px solid rgb(184 255 54 / 24%);
  box-shadow:
    0 0 22px rgb(184 255 54 / 18%),
    0 0 50px rgb(184 255 54 / 8%),
    inset 0 0 18px rgb(184 255 54 / 7%);
}

.direct-player-card > * {
  position: relative;
  z-index: 1;
}

.direct-player-card .video-wrapper {
  aspect-ratio: 16 / 9;
  min-height: 360px;
  border-color: rgb(184 255 54 / 18%);
}

@keyframes bro-border-stitch-slide {
  to {
    background-position:
      260px 0,
      calc(100% - 260px) 100%,
      100% 260px,
      0 calc(100% - 260px);
  }
}

@media (max-width: 980px) {
  .main-nav {
    grid-template-columns: auto 1fr auto;
  }

  .nav-links {
    order: 3;
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .player-page-shell {
    padding-top: 154px;
  }
}

@media (max-width: 760px) {
  .main-nav {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 8px;
    transform: none;
  }

  .nav-cta,
  .brand-lockup {
    display: none;
  }

  .mobile-logo {
    display: inline-grid;
    width: 44px;
    height: 44px;
  }

  .mobile-logo img {
    width: 35px;
    height: 35px;
    object-fit: contain;
  }

  .nav-links {
    order: 0;
    grid-column: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 3px;
  }

  .nav-links a {
    padding: 10px 3px;
    text-align: center;
    font-size: 0.68rem;
  }

  .nav-socials {
    margin-left: 0;
  }

  .nav-socials a {
    width: 38px;
    height: 38px;
  }

  .player-page-shell {
    padding: 44px 0 118px;
  }

  .player-copy h1 {
    font-size: 4rem;
  }

  .direct-player-card .video-wrapper {
    min-height: 280px;
  }
}
