:root {
  --video-transition: 720ms;
  --studio-glass: rgba(7, 17, 29, .72);
  --studio-line: rgba(255, 255, 255, .16);
  --studio-cyan: #85dcf8;
  --studio-gold: #edc384;
}

.video-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(153, 221, 246, .22);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 12%, rgba(133, 220, 248, .13), transparent 32%),
    radial-gradient(circle at 84% 88%, rgba(237, 195, 132, .11), transparent 36%),
    #02070d;
  box-shadow:
    0 34px 110px rgba(0, 0, 0, .56),
    0 0 0 1px rgba(255, 255, 255, .035) inset,
    0 1px 0 rgba(255, 255, 255, .08) inset;
  transform: translateZ(0);
}

.video-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, .035) 48%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 12%);
  mix-blend-mode: screen;
}

.video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  box-shadow:
    inset 0 0 110px rgba(0, 0, 0, .58),
    inset 0 -70px 90px rgba(0, 0, 0, .26);
}

.video-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02070d;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.006);
  filter: saturate(1.025) contrast(1.015);
  transition:
    opacity var(--video-transition) cubic-bezier(.22, .8, .22, 1),
    filter var(--video-transition) ease;
}

.video-layer.is-visible {
  z-index: 4;
  opacity: 1;
  pointer-events: auto;
  filter: saturate(1.04) contrast(1.02);
}

.studio-standby {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 43%, #194963 0, #0a273a 27%, #061521 60%, #02070d 100%);
  background-size: 54px 54px, 54px 54px, auto;
}

.studio-standby::before,
.studio-standby::after {
  content: "";
  position: absolute;
  inset: -42%;
  background: conic-gradient(
    from 90deg,
    transparent,
    rgba(133, 220, 248, .09),
    transparent 28%,
    rgba(237, 195, 132, .08),
    transparent 64%
  );
  animation: studioSpin 26s linear infinite;
}

.studio-standby::after {
  animation-duration: 41s;
  animation-direction: reverse;
  filter: blur(22px);
  opacity: .78;
}

.studio-orbit {
  position: absolute;
  border: 1px solid rgba(159, 230, 255, .16);
  border-radius: 50%;
  box-shadow:
    0 0 70px rgba(133, 220, 248, .07) inset,
    0 0 70px rgba(133, 220, 248, .04);
}

.orbit-one {
  width: 61%;
  aspect-ratio: 1;
  animation: floatOrbit 8s ease-in-out infinite;
}

.orbit-two {
  width: 87%;
  aspect-ratio: 1;
  border-color: rgba(237, 195, 132, .13);
  animation: floatOrbit 11s ease-in-out infinite reverse;
}

.studio-mark {
  position: relative;
  z-index: 2;
  min-width: min(72%, 540px);
  padding: clamp(22px, 4vw, 42px) clamp(26px, 5vw, 62px);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(7, 17, 29, .56), rgba(7, 17, 29, .18));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
  backdrop-filter: blur(16px);
  text-align: center;
  text-shadow: 0 10px 36px #000;
}

.studio-mark b {
  display: block;
  font-size: clamp(2.45rem, 7vw, 6.4rem);
  line-height: .9;
  letter-spacing: .16em;
}

.studio-mark span {
  display: block;
  margin-top: 14px;
  color: var(--studio-cyan);
  font-size: clamp(.78rem, 1.5vw, 1.15rem);
  font-weight: 800;
  letter-spacing: .42em;
}

.studio-mark small {
  display: block;
  margin-top: 23px;
  color: rgba(220, 236, 246, .66);
  font-size: clamp(.65rem, 1vw, .85rem);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.screen-shade {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .50) 0, transparent 22%, transparent 62%, rgba(0, 0, 0, .78) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .08), transparent 20%, transparent 80%, rgba(0, 0, 0, .08));
}

.screen-chrome {
  position: absolute;
  z-index: 9;
  left: max(18px, env(safe-area-inset-left));
  right: max(18px, env(safe-area-inset-right));
  top: max(16px, env(safe-area-inset-top));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #eef8fd;
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px #000;
  pointer-events: none;
}

.screen-chrome span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(7, 17, 29, .72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px) saturate(1.2);
  color: var(--studio-cyan);
}

.screen-chrome span:first-child::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

body[data-video-state="reserve"] .screen-chrome span:first-child {
  color: var(--studio-gold);
}

body[data-video-state="standby"] .screen-chrome span:first-child {
  color: #d9e7ef;
}

.studio-lowerthird {
  position: absolute;
  z-index: 9;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(54px, calc(env(safe-area-inset-bottom) + 46px));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 36px);
  padding: 10px 14px 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 12px;
  background: linear-gradient(100deg, rgba(7, 17, 29, .90), rgba(10, 32, 48, .74));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .32);
  backdrop-filter: blur(15px) saturate(1.2);
  pointer-events: none;
}

.studio-lowerthird::before {
  content: "";
  align-self: stretch;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(var(--studio-cyan), var(--studio-gold));
  box-shadow: 0 0 16px rgba(133, 220, 248, .38);
}

.studio-lowerthird span {
  color: var(--studio-gold);
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .17em;
  white-space: nowrap;
}

.studio-lowerthird b {
  overflow: hidden;
  color: #f7fbfd;
  font-size: .77rem;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  background: rgba(7, 17, 29, .66);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .20);
  backdrop-filter: blur(14px) saturate(1.15);
}

body[data-state="reserve"] .status-pill i,
body[data-state="standby"] .status-pill i,
body[data-video-state="standby"] .screen-chrome span:first-child::before {
  animation: pulse 1.8s ease-in-out infinite;
}

.card {
  box-shadow: 0 22px 58px rgba(0, 0, 0, .24);
  backdrop-filter: blur(16px) saturate(1.08);
}

.edition-button {
  background: linear-gradient(135deg, #f4d49f, #dcae68);
  box-shadow: 0 11px 28px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255,255,255,.35);
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.edition-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.035);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.38);
}

.edition-button:active {
  transform: translateY(0);
}

.playback-status {
  min-height: 1.3em;
}

@keyframes studioSpin {
  to { transform: rotate(360deg); }
}

@keyframes floatOrbit {
  0%, 100% { transform: scale(.965); opacity: .45; }
  50% { transform: scale(1.035); opacity: .95; }
}

@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(.90); }
  50% { opacity: 1; transform: scale(1.16); }
}

@media (max-width: 1100px) {
  .video-wrap { border-radius: 22px; }
  .studio-mark { min-width: min(76%, 520px); }
}

@media (max-width: 820px) {
  .screen-chrome {
    left: max(13px, env(safe-area-inset-left));
    right: max(13px, env(safe-area-inset-right));
    top: max(12px, env(safe-area-inset-top));
    font-size: .60rem;
  }

  .studio-lowerthird {
    left: max(13px, env(safe-area-inset-left));
    bottom: max(49px, calc(env(safe-area-inset-bottom) + 42px));
    max-width: calc(100% - 26px);
    padding: 8px 11px 8px 9px;
  }

  .studio-mark {
    min-width: min(78%, 470px);
    border-radius: 20px;
  }
}

@media (max-width: 620px) {
  .video-wrap { border-radius: 15px; }
  .screen-chrome { font-size: .54rem; letter-spacing: .12em; }
  .screen-chrome > span:last-child { opacity: .78; }
  .studio-lowerthird { gap: 8px; border-radius: 9px; }
  .studio-lowerthird span { font-size: .52rem; letter-spacing: .13em; }
  .studio-lowerthird b { font-size: .64rem; }
  .studio-mark { min-width: 80%; padding: 20px 22px; border-radius: 16px; }
  .studio-mark small { margin-top: 17px; }
}

@media (hover: none) and (pointer: coarse) {
  .edition-button { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .video-layer { transition: none; }
  .studio-standby::before,
  .studio-standby::after,
  .studio-orbit,
  .status-pill i,
  .screen-chrome span:first-child::before { animation: none !important; }
  .edition-button { transition: none; }
}
