.mc-player {
  --mc-accent: #5ce0c0;
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: #0c1320;
  color: #fff;
  border-radius: 14px;
  overflow: hidden;
  font:
    14px/1.5 system-ui,
    sans-serif;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-shadow: 0 18px 65px #0003;
}
.mc-player * {
  box-sizing: border-box;
}
.mc-player [hidden] {
  display: none !important;
}
.mc-stage {
  position: relative;
  aspect-ratio: 16/9;
  background: #03070c;
}
.mc-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mc-message {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  padding: 12px 20px;
  background: #101a2eeb;
  border-radius: 8px;
  text-align: center;
  pointer-events: none;
}
.mc-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 16px;
}
.mc-player button,
.mc-player select,
.mc-adlink {
  font: inherit;
  color: #fff;
  border: 1px solid #354058;
  background: #1e293d;
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 40px;
  white-space: nowrap;
}
.mc-player button {
  cursor: pointer;
}
.mc-player button:disabled {
  opacity: 0.5;
  cursor: default;
}
.mc-player :focus-visible {
  outline: 2px solid var(--mc-accent);
  outline-offset: 3px;
}
.mc-player input {
  accent-color: var(--mc-accent);
  min-width: 0;
  cursor: pointer;
}
.mc-seek {
  flex: 1;
  width: 100px;
}
.mc-volume {
  width: 70px;
}
.mc-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.mc-play {
  color: var(--mc-accent) !important;
}
.mc-adbar {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: #0c1320de;
  border-radius: 8px;
}
.mc-countdown {
  margin-right: auto;
}
.mc-adlink {
  text-decoration: none;
}
.mc-player:fullscreen {
  max-width: none;
  border-radius: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mc-player:fullscreen .mc-stage {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
}
.mc-player:fullscreen video {
  position: absolute;
  inset: 0;
}
/* Explicit range geometry avoids oversized native iOS slider thumbs. */
.mc-player .mc-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.mc-player .mc-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: #526078;
}
.mc-player .mc-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--mc-accent);
  box-shadow: none;
}
.mc-player .mc-controls input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #526078;
}
.mc-player .mc-controls input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--mc-accent);
}
@media (max-width: 640px) {
  .mc-player .mc-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0 6px;
    min-height: 0;
    padding: 0 8px 6px;
  }
  .mc-player .mc-seek {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    order: 0;
  }
  .mc-player .mc-play {
    grid-column: 1;
    grid-row: 2;
  }
  .mc-player .mc-time {
    grid-column: 2;
    grid-row: 2;
    order: 0;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }
  .mc-player .mc-mute {
    grid-column: 3;
    grid-row: 2;
  }
  .mc-player .mc-fullscreen {
    grid-column: 4;
    grid-row: 2;
    margin: 0;
  }
  /* Mobile volume remains available through the device buttons and mute. */
  .mc-player .mc-volume {
    display: none;
  }
  .mc-player .mc-controls button,
  .mc-player .mc-controls select {
    -webkit-appearance: none;
    appearance: none;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    height: 44px;
    margin: 0;
    padding: 0 6px;
    font:
      14px/1.2 system-ui,
      sans-serif;
    letter-spacing: normal;
  }
  .mc-player .mc-quality {
    grid-column: 1 / 3;
    grid-row: 3;
    max-width: 100%;
  }
  .mc-player .mc-retry {
    grid-column: 3 / 5;
    grid-row: 3;
  }
  .mc-player .mc-adbar {
    left: 6px;
    right: 6px;
    bottom: 6px;
    gap: 5px;
    font-size: 12px;
  }
  .mc-player {
    border-radius: 9px;
  }
}

.mc-player .mc-feed-poster {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #101d30;
  overflow: hidden;
  cursor: pointer;
}
.mc-feed-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mc-feed-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background: #101a2ee8;
  color: #fff;
  border-radius: 30px;
}

/* Mobile audio settings float above the controls, without adding a row. */
.mc-player .mc-audio,
.mc-player .mc-audio-panel {
  display: contents;
}
.mc-player .mc-audio-toggle {
  display: none;
}
.mc-player .mc-volume-hint {
  font-size: 12px;
}
@media (max-width: 640px) {
  .mc-player .mc-audio {
    display: block;
    position: relative;
    grid-column: 3;
    grid-row: 2;
  }
  .mc-player .mc-audio-toggle {
    display: block;
  }
  .mc-player .mc-audio-panel {
    display: none;
  }
  .mc-player .mc-audio-open .mc-audio-panel {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: calc(100% + 8px);
    width: 210px;
    max-width: calc(100vw - 32px);
    padding: 8px;
    border: 1px solid #526078;
    border-radius: 8px;
    background: #101a2e;
    box-shadow: 0 4px 16px #0006;
  }
  .mc-player .mc-audio-panel .mc-volume {
    display: block;
    flex: 1;
    width: 100px;
    min-width: 0;
  }
  .mc-player .mc-audio-panel .mc-mute {
    flex: 0 0 auto;
  }
}
