.video-player-page {
  background:
    radial-gradient(circle at 8% 14%, rgba(35, 190, 110, 0.1), transparent 30%),
    var(--color-bg, #f5f7f8);
}

.video-player-shell {
  min-height: 70vh;
  padding: 56px 0 80px;
}

.video-player-card {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding: 24px;
  border: 1px solid rgba(15, 40, 55, 0.1);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  box-shadow: 0 16px 40px rgba(6, 30, 42, 0.08);
}

.video-player-card__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.video-player-card__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #16945a;
  font-size: 13px;
  font-weight: 800;
}

.video-player-card h1 {
  margin: 0;
  color: var(--color-text, #102a36);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.5;
}

.video-quality-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--color-muted, #64727a);
  font-size: 14px;
  font-weight: 700;
}

.video-quality-picker select {
  min-width: 104px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid rgba(15, 40, 55, 0.18);
  border-radius: 8px;
  background: var(--color-surface, #fff);
  color: var(--color-text, #102a36);
  font: inherit;
  direction: ltr;
}

.video-player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #020609;
}

.video-player-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(2, 8, 12, 0.64);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

.video-player-loading[hidden] {
  display: none;
}

.video-player-loading i {
  animation: video-player-spin 0.8s linear infinite;
}

.video-player-card__description {
  margin: 20px 0 0;
  color: var(--color-muted, #64727a);
  font-size: 15px;
  line-height: 2;
}

[data-theme="dark"] .video-player-page {
  background:
    radial-gradient(circle at 8% 14%, rgba(35, 190, 110, 0.09), transparent 30%),
    #081118;
}

[data-theme="dark"] .video-player-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: #0d1b24;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

[data-theme="dark"] .video-player-card h1,
[data-theme="dark"] .video-quality-picker select {
  color: #f3f7f8;
}

[data-theme="dark"] .video-quality-picker,
[data-theme="dark"] .video-player-card__description {
  color: #b6c2c8;
}

[data-theme="dark"] .video-quality-picker select {
  border-color: rgba(255, 255, 255, 0.14);
  background: #122631;
}

@keyframes video-player-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 680px) {
  .video-player-shell {
    padding: 28px 0 56px;
  }

  .video-player-card {
    padding: 14px;
    border-radius: 10px;
  }

  .video-player-card__heading {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .video-quality-picker {
    justify-content: space-between;
  }

  .video-quality-picker select {
    min-height: 44px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-player-loading i {
    animation: none;
  }
}

/* Shared CarTroubleshoot video player */
.ct-video-player {
  width: 100%;
  min-width: 0;
  color: #fff;
  font-family: "IRANSansX", Tahoma, Arial, sans-serif;
  direction: rtl;
}

.ct-video-player .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ct-video-player__viewport {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(139, 172, 158, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(44, 85, 68, 0.28), transparent 48%),
    #020605;
  box-shadow: inset 0 0 54px rgba(0, 0, 0, 0.32);
  isolation: isolate;
}

.ct-video-player__media {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #020605;
}

.ct-video-player__brand {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(3, 9, 7, 0.62);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  direction: ltr;
  pointer-events: none;
}

.ct-video-player__brand i {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #14200f;
  background: #23b6ff;
  font: 900 8px/1 Arial, sans-serif;
  font-style: normal;
}

.ct-video-player__brand b {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ct-video-player__center-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: clamp(52px, 9vw, 72px);
  height: clamp(52px, 9vw, 72px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #14200f;
  background: #23b6ff;
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.34),
    0 0 0 8px rgba(114, 240, 0, 0.1);
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease;
  cursor: pointer;
}

.ct-video-player__center-toggle:hover {
  background: #89ff24;
  transform: translate(-50%, -50%) scale(1.05);
}

.ct-video-player__center-toggle:focus-visible,
.ct-video-player__control:focus-visible,
.ct-video-player select:focus-visible,
.ct-video-player input:focus-visible {
  outline: 2px solid #9dff48;
  outline-offset: 3px;
}

.ct-video-player.is-playing .ct-video-player__center-toggle {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  pointer-events: none;
}

.ct-video-player__loading,
.ct-video-player__error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: #fff;
  background: rgba(2, 7, 5, 0.66);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.ct-video-player__loading[hidden],
.ct-video-player__error[hidden] {
  display: none;
}

.ct-video-player__loading i {
  animation: video-player-spin 0.8s linear infinite;
}

.ct-video-player__error {
  color: #ffd8d8;
  background: rgba(32, 4, 4, 0.82);
}

.ct-video-player__controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  padding: 42px 14px 12px;
  background: linear-gradient(transparent, rgba(1, 5, 3, 0.93));
  direction: ltr;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.ct-video-player:hover .ct-video-player__controls,
.ct-video-player:focus-within .ct-video-player__controls,
.ct-video-player:not(.is-playing) .ct-video-player__controls,
.ct-video-player.is-controls-visible .ct-video-player__controls {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.ct-video-player__progress-wrap,
.ct-video-player__volume-wrap {
  display: flex;
  align-items: center;
  margin: 0;
}

.ct-video-player__progress,
.ct-video-player__volume {
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #23b6ff;
  cursor: pointer;
}

.ct-video-player__progress {
  width: 100%;
}

.ct-video-player__volume {
  width: 74px;
}

.ct-video-player__control-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
}

.ct-video-player__control {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #f6fbf8;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.ct-video-player__control:hover {
  color: #23b6ff;
  background: rgba(255, 255, 255, 0.09);
}

.ct-video-player__time {
  min-width: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  white-space: nowrap;
}

.ct-video-player__time b {
  font-weight: 600;
}

.ct-video-player__time i {
  opacity: 0.5;
  font-style: normal;
}

.ct-video-player__spacer {
  min-width: 4px;
  flex: 1 1 auto;
}

.ct-video-player__select-wrap {
  display: block;
  margin: 0;
}

.ct-video-player__select-wrap select {
  min-width: 66px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 7px;
  color: #f6fbf8;
  background: rgba(8, 16, 12, 0.88);
  font: 700 11px/1 "IRANSansX", Tahoma, Arial, sans-serif;
  direction: ltr;
  cursor: pointer;
}

.ct-video-player__select-wrap option {
  color: #f6fbf8;
  background: #0b1510;
}

.ct-video-player:fullscreen,
.ct-video-player:-webkit-full-screen {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: #000;
}

.ct-video-player:fullscreen .ct-video-player__viewport,
.ct-video-player:-webkit-full-screen .ct-video-player__viewport {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.ct-video-player:fullscreen .ct-video-player__media,
.ct-video-player:-webkit-full-screen .ct-video-player__media {
  object-fit: contain;
}

@media (max-width: 680px) {
  .ct-video-player__brand {
    top: 9px;
    left: 9px;
    padding: 4px 6px 4px 4px;
  }

  .ct-video-player__brand i {
    width: 20px;
    height: 20px;
  }

  .ct-video-player__brand b {
    display: none;
  }

  .ct-video-player__controls {
    padding: 30px 8px 7px;
  }

  .ct-video-player__control-row {
    gap: 2px;
  }

  .ct-video-player__control {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 13px;
  }

  .ct-video-player__time {
    min-width: 72px;
    gap: 3px;
    font-size: 9.5px;
  }

  .ct-video-player__volume-wrap {
    display: none;
  }

  .ct-video-player__select-wrap select {
    min-width: 55px;
    height: 30px;
    padding: 0 5px;
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .ct-video-player__time i,
  .ct-video-player__time b:last-child,
  .ct-video-player__speed {
    display: none;
  }

  .ct-video-player__time {
    min-width: 40px;
  }
}

@media (hover: none), (pointer: coarse) {
  .ct-video-player__controls {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-video-player__center-toggle,
  .ct-video-player__controls {
    transition: none;
  }

  .ct-video-player__loading i {
    animation: none;
  }
}
