.vhs-player {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #03070b;
  z-index: 30;
  overflow: hidden;
  color: #eef8f3;
  font-family: Arial, Helvetica, sans-serif;
}
.vhs-player video {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: contain;
}
.player-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 25px 32px;
  background: linear-gradient(rgba(3, 7, 11, 0.902), transparent);
  height: 106px;
}
.player-brand {
  font-size: 22px;
  letter-spacing: 3px;
  font-weight: bold;
  font-style: italic;
}
.player-brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.5px;
  color: #8daea8;
  margin-top: 5px;
  font-style: normal;
}
.player-state {
  font:
    14px Arial,
    sans-serif;
  letter-spacing: 3px;
  border-left: 2px solid #91d6c3;
  padding-left: 16px;
  margin-left: 24px;
  color: #b8d6cd;
}
.player-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 50%;
  padding: 12px;
  background: transparent;
  color: #eef8f3;
  cursor: pointer;
}
.player-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.player-icon svg text {
  fill: currentColor;
  stroke: none;
  font:
    bold 8px Arial,
    sans-serif;
}
.player-primary {
  width: 64px;
  height: 64px;
  min-height: 64px;
  background: #e9f4ed;
  color: #162b30;
  margin-right: 12px;
}
.player-primary svg {
  width: 30px;
  height: 30px;
}
.player-icon:hover {
  background: rgba(226, 247, 237, 0.141);
  border-color: rgba(178, 217, 203, 0.4);
}
.player-icon:focus {
  background: #b3efdb;
  color: #12272c;
  border-color: #b3efdb;
  box-shadow:
    0 0 0 3px #10242e,
    0 0 0 5px #c0f5e1;
}
#vhs-close {
  margin-left: auto;
  background: rgba(10, 21, 30, 0.6);
  width: 48px;
  height: 48px;
  min-height: 48px;
}
#vhs-close:hover,
#vhs-close:focus {
  background: #c6f4e4;
  color: #152d31;
}
.player-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px 34px 18px;
  background: linear-gradient(
    transparent,
    rgba(7, 17, 27, 0.91) 28%,
    #07111b 80%
  );
}
.player-caption span {
  display: block;
  font-size: 11px;
  letter-spacing: 3px;
  color: #a8d4c5;
  margin-bottom: 7px;
}
.player-caption h2 {
  font-size: 26px;
  font-weight: bold;
  line-height: 32px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 0 16px;
  color: #f1f6f2;
}
.player-progress {
  position: relative;
  height: 32px;
  margin-bottom: 13px;
}
.player-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 14px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.188);
  overflow: hidden;
}
.player-track i,
.player-track b {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
}
.player-track i {
  background: rgba(255, 255, 255, 0.271);
}
.player-track b {
  background: #a9e9d1;
}
.player-progress input {
  position: relative;
  display: block;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.player-progress input::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}
.player-progress input::-moz-range-track {
  height: 4px;
  background: transparent;
}
.player-progress input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #d3f9e9;
  margin-top: -5px;
}
.player-progress input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #d3f9e9;
}
.player-progress input:focus {
  box-shadow: 0 0 0 2px #9edbc3;
  border-radius: 8px;
}
.player-progress input:disabled {
  opacity: 0.4;
}
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.player-transport,
.player-settings {
  display: flex;
  align-items: center;
}
.player-settings .player-icon {
  margin-left: 12px;
}
#vhs-time {
  font-size: 17px;
  color: #c6d9d1;
  font-variant-numeric: tabular-nums;
  margin-left: 22px;
  white-space: nowrap;
}
.player-settings [aria-pressed="true"] {
  color: #a9edcf;
  background: rgba(161, 230, 197, 0.11);
}
.player-footnote {
  display: flex;
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 10px;
  border-top: 1px solid rgba(126, 188, 172, 0.188);
  font-size: 9px;
  letter-spacing: 2px;
  color: #638e83;
}
#vhs-message {
  position: absolute;
  top: 37%;
  left: 12%;
  width: 76%;
  text-align: center;
  color: #e7f8f0;
  font-size: 23px;
  line-height: 1.5;
  text-shadow: 0 2px 8px #000;
}
.vhs-lines {
  display: none;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 5px
  );
  opacity: 0.42;
}
.with-effect .vhs-lines {
  display: block;
}
.with-effect .player-state {
  text-shadow:
    1px 0 #e28cab,
    -1px 0 #8bd8c5;
}
.vhs-player:fullscreen {
  position: fixed;
  width: 100%;
  height: 100%;
  transform: none;
}
.vhs-player:-webkit-full-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  transform: none;
}
.vhs-player:-moz-full-screen {
  position: fixed;
  width: 100%;
  height: 100%;
  transform: none;
}
@media (max-width: 760px) {
  .player-header {
    padding: 15px;
    height: 85px;
  }
  .player-brand {
    font-size: 16px;
  }
  .player-state {
    font-size: 11px;
    margin-left: 10px;
    padding-left: 10px;
  }
  .player-panel {
    padding: 35px 18px 16px;
  }
  .player-icon {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 9px;
  }
  .player-primary {
    width: 50px;
    height: 50px;
    min-height: 50px;
    margin-right: 3px;
  }
  .player-settings .player-icon {
    margin-left: 2px;
  }
  .player-caption h2 {
    font-size: 21px;
  }
  #vhs-time {
    font-size: 13px;
    margin-left: 6px;
  }
  .player-footnote {
    font-size: 8px;
    letter-spacing: 1px;
  }
}

.player-state,
.player-caption,
#vhs-time,
.player-footnote,
#vhs-message {
  font-family: "Courier New", Courier, monospace;
}
.player-state {
  font-size: 17px;
  font-weight: bold;
}
.player-caption span {
  font-size: 13px;
}
.with-effect .player-caption,
.with-effect .player-state {
  text-shadow:
    1px 0 #d888a0,
    -1px 0 #89d6c3;
}
.vhs-player .player-icon:hover {
  color: #eaf8f0;
  background: #253e44;
}
.vhs-player .player-icon:focus,
.vhs-player .player-icon:focus:hover,
.vhs-player .player-settings [aria-pressed="true"]:focus {
  color: #12272c;
  background: #b3efdb;
  border-color: #b3efdb;
}

/* The same VHS shell as the missing-cover illustration. */
.player-header {
  height: 145px;
  padding: 18px 32px;
}
.player-brand {
  padding: 0;
  background: none;
  border: 0;
  flex-shrink: 0;
}
.player-brand img {
  display: block;
  width: 180px;
  height: 110px;
}
.player-heading {
  min-width: 0;
  margin: 0 24px;
  font-family: "Courier New", Courier, monospace;
}
.player-heading span {
  display: block;
  font-size: 13px;
  letter-spacing: 2px;
  color: #b2d9cd;
  margin-bottom: 8px;
}
.player-heading h2 {
  font-size: 26px;
  line-height: 32px;
  color: #f0f5e9;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-caption .player-state {
  font-size: 19px;
  margin: 0 0 7px;
  padding: 0;
  border: 0;
}
.player-caption h2 {
  font-size: 19px;
  line-height: 26px;
  font-weight: normal;
  color: #b5d8ca;
}
.with-effect .player-heading {
  text-shadow:
    1px 0 #d888a0,
    -1px 0 #89d6c3;
}
#vhs-message:empty {
  display: none;
}
#vhs-message.vhs-notice {
  top: 35%;
  left: 18%;
  width: 64%;
  padding: 24px 28px;
  background: rgba(6, 19, 27, 0.94);
  border: 1px solid #a3d6c4;
  border-top: 5px solid #9bd7c8;
  border-bottom: 5px solid #9391b3;
  box-shadow:
    inset 0 0 0 5px #20333b,
    0 9px 25px rgba(0, 0, 0, 0.4);
  font-size: 21px;
  letter-spacing: 0.5px;
}
.vhs-player.controls-hidden {
  cursor: none;
}
.controls-hidden .player-header,
.controls-hidden .player-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 760px) {
  .player-header {
    padding: 12px 16px;
    height: 115px;
  }
  .player-brand img {
    width: 136px;
    height: 80px;
  }
  .player-heading {
    margin: 0 12px;
  }
  .player-heading h2 {
    font-size: 21px;
  }
}
.player-menu {
  position: absolute;
  right: 32px;
  bottom: 190px;
  width: 420px;
  max-height: 60%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: rgba(6, 12, 18, 0.96);
  border: 1px solid #2c4a46;
  border-radius: 10px;
  z-index: 5;
}
.player-menu.hidden {
  display: none;
}
.player-menu h3 {
  margin: 0 0 12px;
  font-size: 14px;
  letter-spacing: 3px;
  color: #91d6c3;
}
.player-menu-view {
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 4px 14px 0 4px;
}
.player-menu-list {
  display: flex;
  flex-direction: column;
}
.player-menu-bar {
  position: absolute;
  right: 2px;
  width: 4px;
  border-radius: 2px;
  background: rgba(145, 214, 195, 0.15);
}
.player-menu-bar i {
  position: absolute;
  left: 0;
  width: 4px;
  border-radius: 2px;
  background: #91d6c3;
}
.player-menu-item {
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 52px;
  text-align: left;
  padding: 12px 16px;
  margin: 0 0 8px;
  border: 1px solid #22383a;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #eef8f3;
  font-size: 18px;
  line-height: 1.2;
  box-shadow: none;
  cursor: pointer;
}
.player-menu-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-menu-item .value {
  margin-left: 16px;
  color: #91d6c3;
  font-size: 15px;
  flex-shrink: 0;
  max-width: 55%;
}
.player-menu-item.back {
  border-style: dashed;
  color: #8daea8;
}
.player-menu-item small {
  margin-left: 16px;
  color: #8daea8;
  font-size: 13px;
  flex-shrink: 0;
}
.player-menu-item.active {
  border-color: #91d6c3;
  color: #91d6c3;
}
.player-menu-item.active::after {
  content: "✓";
  margin-left: auto;
  padding-left: 12px;
}
.player-menu-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #eef8f3;
}
.player-menu-item:focus {
  outline: none;
  background: #eef8f3;
  border-color: #eef8f3;
  color: #03070b;
}
.player-menu-item:focus small,
.player-menu-item:focus .value {
  color: #33504b;
}
/* A source that failed recently: greyed, struck out, its note in red. */
.player-menu-item.off,
.player-menu-item.off:hover {
  color: #5f6f6c;
  cursor: default;
}
.player-menu-item.off span {
  text-decoration: line-through;
}
.player-menu-item.off small {
  color: #e0847a;
}
.player-menu-item.off:focus {
  background: #2a3534;
  border-color: #5f6f6c;
  color: #9aa9a6;
}
.player-menu-item.off:focus small {
  color: #ffb1a8;
}
/* Tech data: a compact frame top-right, left of the close button. */
.player-tech {
  position: absolute;
  top: 26px;
  right: 104px;
  width: 440px;
  padding: 8px 12px 6px;
  background: rgba(6, 12, 18, 0.82);
  border: 1px solid #2c4a46;
  border-radius: 8px;
  font-size: 13px;
  line-height: 18px;
  z-index: 4;
}
.player-tech.hidden {
  display: none;
}
.player-tech div {
  display: inline-block;
  width: 50%;
  padding: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}
.player-tech span {
  color: #8daea8;
}
.player-tech b {
  font-weight: normal;
  color: #eef8f3;
  margin-right: 14px;
}.player-episode {
  margin-left: 6px;
}
/* ---------- VHS glitch: seeking and buffering (only with the VHS effect on) ---------- */
.vhs-glitch {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.vhs-glitch.on {
  display: block;
}
/* «Snow»: fine moving static over the picture. */
.vhs-glitch.on::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  right: 0;
  bottom: -50%;
  opacity: 0.18;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.9) 0,
    rgba(255, 255, 255, 0) 1px,
    rgba(0, 0, 0, 0.6) 2px,
    rgba(255, 255, 255, 0) 3px
  );
  -webkit-animation: vhs-snow 0.18s steps(3) infinite;
  animation: vhs-snow 0.18s steps(3) infinite;
}
/* Tracking band rolling from top to bottom. */
.vhs-glitch i {
  position: absolute;
  left: 0;
  right: 0;
  height: 16%;
  top: -16%;
  background: linear-gradient(
    rgba(255, 255, 255, 0),
    rgba(220, 235, 230, 0.35) 40%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(220, 235, 230, 0.35) 60%,
    rgba(255, 255, 255, 0)
  );
  -webkit-animation: vhs-track 0.9s linear infinite;
  animation: vhs-track 0.9s linear infinite;
}
/* A thin torn line that jumps around. */
.vhs-glitch b {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: 62%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 6px rgba(140, 216, 197, 0.9);
  -webkit-animation: vhs-tear 0.4s steps(4) infinite;
  animation: vhs-tear 0.4s steps(4) infinite;
}
.glitch-wait i {
  -webkit-animation-duration: 2.2s;
  animation-duration: 2.2s;
}
/* The picture itself: a sharp shake while seeking, a faded wobble while waiting. */
video.glitch-seek {
  -webkit-filter: saturate(1.8) contrast(1.25) hue-rotate(-8deg);
  filter: saturate(1.8) contrast(1.25) hue-rotate(-8deg);
  -webkit-animation: vhs-shake 0.12s steps(2) infinite;
  animation: vhs-shake 0.12s steps(2) infinite;
}
video.glitch-wait {
  -webkit-filter: saturate(0.45) contrast(1.15) brightness(0.82) blur(0.6px);
  filter: saturate(0.45) contrast(1.15) brightness(0.82) blur(0.6px);
  -webkit-animation: vhs-wobble 1.6s ease-in-out infinite;
  animation: vhs-wobble 1.6s ease-in-out infinite;
}
@-webkit-keyframes vhs-snow {
  0% { -webkit-transform: translateY(0); }
  100% { -webkit-transform: translateY(9px); }
}
@keyframes vhs-snow {
  0% { transform: translateY(0); }
  100% { transform: translateY(9px); }
}
@-webkit-keyframes vhs-track {
  0% { top: -16%; }
  100% { top: 100%; }
}
@keyframes vhs-track {
  0% { top: -16%; }
  100% { top: 100%; }
}
@-webkit-keyframes vhs-tear {
  0% { top: 62%; opacity: 0.8; }
  25% { top: 18%; opacity: 0.3; }
  50% { top: 84%; opacity: 0.9; }
  75% { top: 40%; opacity: 0.5; }
  100% { top: 70%; opacity: 0.8; }
}
@keyframes vhs-tear {
  0% { top: 62%; opacity: 0.8; }
  25% { top: 18%; opacity: 0.3; }
  50% { top: 84%; opacity: 0.9; }
  75% { top: 40%; opacity: 0.5; }
  100% { top: 70%; opacity: 0.8; }
}
@-webkit-keyframes vhs-shake {
  0% { -webkit-transform: translateX(-7px) skewX(-2deg); }
  100% { -webkit-transform: translateX(6px) skewX(1.5deg); }
}
@keyframes vhs-shake {
  0% { transform: translateX(-7px) skewX(-2deg); }
  100% { transform: translateX(6px) skewX(1.5deg); }
}
@-webkit-keyframes vhs-wobble {
  0%, 100% { -webkit-transform: translateX(0) skewX(0); }
  30% { -webkit-transform: translateX(-3px) skewX(-0.6deg); }
  60% { -webkit-transform: translateX(2px) skewX(0.4deg); }
}
@keyframes vhs-wobble {
  0%, 100% { transform: translateX(0) skewX(0); }
  30% { transform: translateX(-3px) skewX(-0.6deg); }
  60% { transform: translateX(2px) skewX(0.4deg); }
}
