.themed-video-player {
  width: 100%;
  margin: 0;
}

.themed-video-player__shell {
  position: relative;
  overflow: hidden;
  padding: clamp(0.7rem, 1.8vw, 1rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: clamp(1.6rem, 3vw, 2.25rem);
  background:
    radial-gradient(circle at 18% 12%, rgba(141, 198, 65, 0.28), transparent 32%),
    radial-gradient(circle at 84% 18%, rgba(56, 128, 255, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(5, 20, 38, 0.96), rgba(7, 38, 73, 0.92));
  box-shadow: 0 34px 110px rgba(4, 17, 36, 0.44);
}

.themed-video-player__shell::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(145deg, rgba(0, 0, 0, 0.88), transparent 82%);
}

.themed-video-player__chrome {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  padding: 0 0 0.7rem 0.2rem;
}

.themed-video-player__chrome span {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.themed-video-player__chrome span:first-child {
  background: var(--color-success, #8dc641);
}

.themed-video-player__chrome span:nth-child(2) {
  background: var(--color-secondary, #3880ff);
}

.themed-video-player__media {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: clamp(1.05rem, 2vw, 1.45rem);
  background: #06182d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.themed-video-player__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #06182d;
}

.themed-video-player__overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  width: 100%;
  border: 0;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  background:
    radial-gradient(circle at 50% 52%, rgba(4, 17, 36, 0.12), rgba(4, 17, 36, 0.44)),
    linear-gradient(180deg, transparent, rgba(4, 17, 36, 0.26));
  cursor: pointer;
}

.is-enhanced .themed-video-player__overlay {
  display: grid;
}

.is-playing .themed-video-player__overlay {
  opacity: 0;
  pointer-events: none;
}

.themed-video-player__play-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(4.2rem, 9vw, 5.85rem);
  height: clamp(4.2rem, 9vw, 5.85rem);
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-success, #8dc641), var(--color-secondary, #3880ff));
  box-shadow: 0 18px 44px rgba(4, 17, 36, 0.4);
}

.themed-video-player__play-icon::before {
  width: 0;
  height: 0;
  margin-left: 0.25rem;
  border-top: 0.78rem solid transparent;
  border-bottom: 0.78rem solid transparent;
  border-left: 1.08rem solid #ffffff;
  content: "";
}

.themed-video-player__overlay span:not(.themed-video-player__play-icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.themed-video-player__error {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm, 999px);
  color: #ffffff;
  background: rgba(5, 20, 38, 0.86);
  backdrop-filter: blur(14px);
}

.themed-video-player__controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.78rem;
  padding: 0.68rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.themed-video-player__controls[hidden] {
  display: none;
}

.themed-video-player__control {
  min-height: 2.2rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.11);
  cursor: pointer;
}

.themed-video-player__control--primary {
  min-width: 4.2rem;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--color-secondary, #3880ff);
  box-shadow: 0 10px 24px rgba(56, 128, 255, 0.28);
}

.themed-video-player__timeline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  font-weight: 800;
}

.themed-video-player__timeline input {
  width: 100%;
  accent-color: var(--color-success, #8dc641);
}

.themed-video-player__caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: center;
  margin-top: 0.85rem;
  padding-inline: 0.35rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
}

.themed-video-player__caption span {
  color: var(--color-success, #8dc641);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.themed-video-player__caption strong {
  color: #ffffff;
  font-weight: 900;
}

.themed-video-player__modal {
  width: min(94vw, 1120px);
  max-width: 1120px;
  padding: 0;
  border: 0;
  border-radius: clamp(1.35rem, 3vw, 2.25rem);
  color: #ffffff;
  background: transparent;
}

.themed-video-player__modal::backdrop {
  background: rgba(4, 17, 36, 0.78);
  backdrop-filter: blur(18px);
}

.themed-video-player__modal-panel {
  overflow: hidden;
  padding: clamp(0.8rem, 2vw, 1.15rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: inherit;
  background:
    radial-gradient(circle at 12% 8%, rgba(141, 198, 65, 0.22), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(56, 128, 255, 0.24), transparent 34%),
    linear-gradient(135deg, rgba(5, 20, 38, 0.98), rgba(7, 38, 73, 0.96));
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
}

.themed-video-player__modal-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.15rem 0.9rem;
}

.themed-video-player__modal-header div {
  display: grid;
  gap: 0.2rem;
}

.themed-video-player__modal-header span {
  color: var(--color-success, #8dc641);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.themed-video-player__modal-header strong {
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 900;
}

.themed-video-player__modal-header button {
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.themed-video-player__modal-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: clamp(1rem, 2vw, 1.45rem);
  background: #06182d;
}

@media (max-width: 640px) {
  .themed-video-player__shell {
    padding: 0.65rem;
    border-radius: 1.45rem;
  }

  .themed-video-player__controls {
    grid-template-columns: 1fr 1fr;
    border-radius: 1.25rem;
  }

  .themed-video-player__timeline {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .themed-video-player__modal {
    width: calc(100vw - 1rem);
  }

  .themed-video-player__modal-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
