/*
 * ND Short Player
 * Standalone vertical short-drama player skin.
 */

:root {
  --ndsp-bg: #05070c;
  --ndsp-panel: rgba(9, 12, 20, 0.86);
  --ndsp-border: rgba(255, 255, 255, 0.18);
  --ndsp-text: #ffffff;
  --ndsp-muted: #c6d0e8;
  --ndsp-accent: #FF8F0C;
  --ndsp-accent-2: #FFB24A;
}

.ndsp-shell,
.ndsp-shell * {
  box-sizing: border-box;
}

.ndsp-shell {
  width: min(100%, 430px);
  height: min(86vh, 860px);
  min-height: 560px;
  margin: 0 auto;
  color: var(--ndsp-text);
  background: var(--ndsp-bg);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  user-select: none;
  touch-action: manipulation;
}

.ndsp-shell.ndsp-landscape {
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
}

.ndsp-stage {
  position: relative;
  width: 100%;
  height: 100%;
  background: #02040a;
  overflow: hidden;
}

.ndsp-video,
.ndsp-ad-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}


.ndsp-video.ndsp-fill,
.ndsp-ad-video.ndsp-fill {
  object-fit: cover;
}

.ndsp-poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ndsp-shell.ndsp-show-poster .ndsp-poster {
  opacity: 1;
}

.ndsp-float-title {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 15;
  max-width: min(76%, 320px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.78);
}

.ndsp-float-name {
  display: inline;
  font: inherit;
}

.ndsp-float-episode {
  display: inline;
  color: rgba(226, 233, 255, 0.76);
  font: inherit;
}

.ndsp-shell.ndsp-controls-hidden.ndsp-playing .ndsp-float-title {
  opacity: 0.82;
  transform: translateY(0);
}

.ndsp-shell.ndsp-controls-hidden.ndsp-playing .ndsp-float-title:hover {
  opacity: 0.9;
}
.ndsp-hit-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  cursor: pointer;
}

.ndsp-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 16;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(2, 4, 10, 0.78), rgba(2, 4, 10, 0));
  pointer-events: none;
}

.ndsp-titlewrap {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.ndsp-titlebox {
  min-width: 0;
  flex: 1 1 auto;
  pointer-events: auto;
}

.ndsp-title {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.ndsp-episode {
  margin-top: 2px;
  color: var(--ndsp-muted);
  font-size: 12px;
  font-weight: 700;
}

.ndsp-icon-btn,
.ndsp-back-btn {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(6, 8, 14, 0.56);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  text-decoration: none;
}

.ndsp-icon-btn:hover,
.ndsp-icon-btn.ndsp-on,
.ndsp-back-btn:hover {
  border-color: rgba(255, 143, 12, 0.78);
  background: rgba(255, 143, 12, 0.22);
}

.ndsp-back-btn {
  color: #FF8F0C !important;
}

.ndsp-icon-btn:disabled {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

.ndsp-icon-btn svg,
.ndsp-back-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ndsp-center-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 18;
  width: 78px;
  height: 78px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.ndsp-center-play svg {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  fill: currentColor;
}

.ndsp-shell.ndsp-playing .ndsp-center-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.ndsp-buffering {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 19;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.24);
  border-top-color: #fff;
  display: none;
  animation: ndsp-spin 0.8s linear infinite;
}

.ndsp-shell.ndsp-waiting .ndsp-buffering {
  display: block;
}

@keyframes ndsp-spin {
  to {
    transform: rotate(360deg);
  }
}

.ndsp-subtitle {
  position: absolute;
  left: 50%;
  bottom: 112px;
  z-index: 14;
  max-width: calc(100% - 28px);
  transform: translateX(-50%);
  color: #fff;
  font-size: 21px;
  line-height: 1.36;
  font-weight: 700;
  text-align: center;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 3px 12px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  display: none;
}

.ndsp-subtitle.ndsp-show {
  display: block;
}

.ndsp-notice {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 26;
  width: max-content;
  max-width: calc(100% - 28px);
  transform: translateX(-50%) translateY(-12px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.86);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ndsp-notice.ndsp-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ndsp-consent {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 42;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.38);
  pointer-events: auto;
}

.ndsp-consent.ndsp-show {
  display: flex;
}

.ndsp-consent-box {
  width: min(86%, 320px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 11, 19, 0.88);
  padding: 18px;
  color: #fff;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px) saturate(1.12);
}

.ndsp-consent-title {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.ndsp-consent-text {
  margin-top: 8px;
  color: #d9e2f7;
  font-size: 13px;
  line-height: 1.55;
}

.ndsp-consent-btn {
  width: 100%;
  height: 42px;
  margin-top: 15px;
  border: 0;
  border-radius: 999px;
  background: #FF8F0C;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.ndsp-ad-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: #000;
  display: none;
}

.ndsp-ad-layer.ndsp-show {
  display: block;
}

.ndsp-ad-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
}

.ndsp-ad-skip {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ndsp-html-ad {
  position: absolute;
  z-index: 32;
  display: none;
  pointer-events: auto;
}

.ndsp-html-ad.ndsp-show {
  display: block;
}

.ndsp-html-ad.ndsp-bottom-banner {
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  min-height: var(--ndsp-bottom-ad-height, 56px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(6, 8, 14, 0.92);
  box-shadow: 0 -10px 22px rgba(0, 0, 0, 0.26);
}

.ndsp-html-ad.ndsp-center-ad {
  left: 50%;
  top: 50%;
  width: min(92%, 336px);
  min-height: 180px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(6, 8, 14, 0.9);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.ndsp-html-ad.ndsp-top-banner {
  left: 50%;
  top: 58px;
  width: min(96%, 380px);
  min-height: 50px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(6, 8, 14, 0.82);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.ndsp-html-ad-content {
  width: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
}

.ndsp-html-ad-content iframe,
.ndsp-html-ad-content ins,
.ndsp-html-ad-content img {
  max-width: 100%;
}

.ndsp-html-ad-close {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
}

.ndsp-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 12px 12px;
  background: linear-gradient(0deg, rgba(2, 4, 10, 0.88), rgba(2, 4, 10, 0));
  transition: bottom 0.24s ease, opacity 0.18s ease, transform 0.18s ease;
}

.ndsp-shell.ndsp-bottom-ad-visible .ndsp-bottom {
  bottom: var(--ndsp-bottom-ad-height, 56px);
}

.ndsp-shell.ndsp-controls-hidden .ndsp-topbar,
.ndsp-shell.ndsp-controls-hidden .ndsp-bottom {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.ndsp-slim-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 34;
  height: 2px;
  transition: bottom 0.24s ease;
  overflow: hidden;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
}

.ndsp-shell.ndsp-bottom-ad-visible .ndsp-slim-progress {
  bottom: var(--ndsp-bottom-ad-height, 56px);
}
.ndsp-slim-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--ndsp-accent);
  box-shadow: 0 0 8px rgba(255, 143, 12, 0.52);
  transition: width 0.18s linear;
}
.ndsp-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ndsp-time {
  min-width: 38px;
  color: #d9e2f7;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.ndsp-range {
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ndsp-accent) var(--ndsp-progress, 0%), rgba(255, 255, 255, 0.28) var(--ndsp-progress, 0%));
  outline: none;
  cursor: pointer;
}

.ndsp-range::-webkit-slider-thumb {
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--ndsp-accent);
}

.ndsp-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--ndsp-accent);
}

.ndsp-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.ndsp-controls-left,
.ndsp-controls-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ndsp-pill {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.62);
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.ndsp-pill:hover,
.ndsp-pill.ndsp-on {
  border-color: rgba(255, 143, 12, 0.78);
  background: rgba(255, 143, 12, 0.22);
}

.ndsp-menu-wrap {
  position: relative;
}

.ndsp-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: 178px;
  max-height: 240px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.32) transparent;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(8, 11, 19, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
  display: none;
}

.ndsp-menu.ndsp-open {
  display: block;
}

.ndsp-menu-btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d9e2f7;
  padding: 9px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ndsp-menu-btn:hover,
.ndsp-menu-btn.ndsp-active {
  background: rgba(255, 143, 12, 0.22);
  color: #fff;
}

.ndsp-episodes {
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 82px;
  z-index: 24;
  max-height: min(46vh, 260px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.32) transparent;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(8, 11, 19, 0.72);
  backdrop-filter: blur(14px) saturate(1.18);
}


.ndsp-episodes::-webkit-scrollbar {
  width: 6px;
}

.ndsp-episodes::-webkit-scrollbar-track {
  background: transparent;
}

.ndsp-episodes::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.ndsp-episodes::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42);
}
.ndsp-episodes.ndsp-open {
  display: grid;
}

.ndsp-ep-btn {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ndsp-ep-btn.ndsp-active {
  border-color: var(--ndsp-accent);
  background: var(--ndsp-accent);
}

.ndsp-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 28;
  width: min(88%, 340px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(8, 11, 19, 0.92);
  color: #fff;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  display: none;
}

.ndsp-error.ndsp-show {
  display: block;
}

@media (max-width: 760px) {
  .ndsp-shell {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .ndsp-title {
    font-size: 16px;
  }

  .ndsp-float-title {
    left: 12px;
    top: 12px;
    max-width: 78%;
    padding: 0;
    font-size: 11px;
  }
  .ndsp-center-play {
    width: 68px;
    height: 68px;
  }

  .ndsp-subtitle {
    bottom: 118px;
    font-size: 19px;
  }




@media (max-width: 420px) {
  .ndsp-bottom {
    padding-left: 10px;
    padding-right: 10px;
  }

  .ndsp-controls-row {
    gap: 5px;
  }

  .ndsp-controls-left,
  .ndsp-controls-right {
    gap: 5px;
  }

  .ndsp-icon-btn {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .ndsp-icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .ndsp-pill {
    min-width: 40px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .ndsp-quality {
    min-width: 42px;
  }
}

@media (max-width: 360px) {
  .ndsp-bottom {
    padding-left: 8px;
    padding-right: 8px;
  }

  .ndsp-controls-row {
    gap: 4px;
  }

  .ndsp-controls-left,
  .ndsp-controls-right {
    gap: 4px;
  }

  .ndsp-icon-btn {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .ndsp-icon-btn svg {
    width: 17px;
    height: 17px;
  }

  .ndsp-pill {
    min-width: 38px;
    height: 30px;
    padding: 0 7px;
    font-size: 11px;
  }

  .ndsp-fullscreen {
    display: none;
  }
}