/* =========================================================
   EnoPlayer – RESPONSIVE
   - Base font-size scaling for portrait/landscape
   - Phone / tablet / desktop component tweaks
   ========================================================= */

/* ========= Base font-size: PORTRAIT ========= */
@media screen and (max-width: 320px) and (orientation: portrait) {
  body, html { --base-font-size: 2.6vw; }
}

@media screen and (min-width: 321px) and (max-width: 480px) and (orientation: portrait) {
  body, html { --base-font-size: 2vw; }
}

@media screen and (min-width: 481px) and (max-width: 1024px) and (orientation: portrait) {
  body, html { --base-font-size: 1.3vw; }
}

@media screen and (min-width: 1025px) and (max-width: 1919px) and (orientation: portrait) {
  body, html { --base-font-size: 0.9vw; }
}

@media screen and (min-width: 1920px) and (max-width: 3839px) and (orientation: portrait) {
  body, html { --base-font-size: 0.8vw; }
}

@media screen and (min-width: 3840px) and (orientation: portrait) {
  body, html { --base-font-size: 16px; }
}

/* ========= Base font-size: LANDSCAPE ========= */
@media screen and (max-width: 480px) and (orientation: landscape) {
  body, html { --base-font-size: 1.8vw; }
}

@media screen and (min-width: 481px) and (max-width: 1024px) and (orientation: landscape) {
  body, html { --base-font-size: 1.3vw; }
}

@media screen and (min-width: 1025px) and (max-width: 1919px) and (orientation: landscape) {
  body, html { --base-font-size: 0.8vw; }
}

@media screen and (min-width: 1920px) and (max-width: 3839px) and (orientation: landscape) {
  body, html { --base-font-size: 0.7vw; }
}

@media screen and (min-width: 3840px) and (orientation: landscape) {
  body, html { --base-font-size: 18px; }
}


@media (max-width: 480px) {
  .tv-label {
    display: none;
  }
}

@media (max-width: 600px) {
  .enoplayer-tv-toggle {
    display: none !important;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .enoplayer-tv-toggle {
    display: none !important;
  }
}

/* === TABLET + PHONE (≤840px) === */
@media (max-width: 840px) {
  .enoplayer-container {
    max-width: 100%;
    padding: 1rem;
    border-radius: 18px;
    box-shadow: none;
  }
  .enoplayer {
    margin: 4px auto 18px;
    border-radius: 18px;
    padding-bottom: 56.25%;
  }
  .enoplayer-controls {
    padding: 50px 10px 10px;
  }
  .controls-bottom {
    flex-wrap: wrap;
    margin-top: 18px;
  }
  .controls-center {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }
  .enoplayer-progress {
    bottom: 60px;
    left: 6%;
    right: 6%;
    height: 5px;
  }
  .enoplayer-chapter-marker {
    width: 2px;
    margin-left: -1px;
  }
  .enoplayer-seek-thumb-img {
    width: 130px;
    height: 73px;
  }
  .enoplayer-seek-thumb-time {
    font-size: 0.8rem;
    padding: 5px 14px;
  }
  .enoplayer-settings {
    bottom: 65px;
    width: min(260px, 80vw);
    box-shadow: 0 12px 32px rgba(0,0,0,0.65);
  }
  .volume-slider-container {
    width: 70px;
    opacity: 1;
    overflow: visible;
    margin-left: 4px;
  }
  .volume-slider {
    height: 3px;
    margin-left: 4px;
  }
  .volume-thumb {
    width: 10px;
    height: 10px;
    opacity: 1;
  }
  .volume-btn:hover + .volume-slider-container,
  .volume-slider-container:hover {
    width: 70px;
  }
  .loading-spinner {
    width: 34px;
    height: 34px;
    border-width: 2px;
  }
  .enoplayer-next {
    max-width: calc(100vw - 2.5rem);
    right: 1.5rem;
    bottom: 7rem;
  }
}

/* === PHONES (≤480px) === */
@media (max-width: 480px) {
  .enoplayer-container {
    padding: 0.9rem 0.8rem;
    border-radius: 16px;
  }
  .enoplayer {
    border-radius: 16px;
    margin: 4px auto 16px;
  }
  .enoplayer-big-play {
    transform: translate(-50%, -40%);
  }
  .enoplayer-controls {
    padding: 40px 12px 12px;
  }
  .enoplayer-meta-badges {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 4px;
  }
  .enoplayer-meta-badge {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    padding: 2px 7px;
  }
  .enoplayer-progress {
    bottom: 54px;
    left: 6%;
    right: 6%;
    height: 4px;
  }
  .progress-thumb {
    width: 14px;
    height: 8px;
  }
  .progress-played::after {
    width: 10px;
    height: 10px;
    right: -5px;
    opacity: 0.7;
  }
  .controls-bottom {
    margin-top: 14px;
    gap: 10px;
  }
  .controls-left,
  .controls-right {
    gap: 10px;
  }
  .controls-center {
    order: -1;
    width: 100%;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 6px;
  }
  .control-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
  }
  .controls-center .control-btn {
    width: 38px;
    height: 38px;
  }
  .controls-center .recap-btn {
    width: 46px;
    height: 46px;
  }
  .control-btn span {
    width: 16px;
    height: 16px;
  }
  .icon-recap {
    width: 24px !important;
    height: 24px !important;
  }
  .time-display {
    font-size: 12px;
    margin-left: 4px;
  }
  .enoplayer-seek-thumb {
    bottom: 135%;
    gap: 3px;
  }
  .enoplayer-seek-thumb-img {
    width: 120px;
    height: 68px;
    border-radius: 6px;
  }
  .enoplayer-seek-thumb-time {
    padding: 4px 12px;
    font-size: 0.78rem;
    border-radius: 14px;
  }
  /*.enoplayer-settings {
    left: 8px;
    right: 8px;
    bottom: 65px;
    width: auto;
    max-height: 30vh !important;
    font-size: 0.76rem !important;
    max-width: none;
    border-radius: 14px;
    background: rgba(10,15,30,0.96);
  }
  .enoplayer-settings-header {
    padding: 4px 8px;
  }
  .enoplayer-settings-header span {
    font-size: 8.5px;
    letter-spacing: 0.14em;
  }

  .enoplayer-settings-group {
    margin-bottom: 6px;
  }

  .enoplayer-settings-body {
    max-height: calc(26vh - 32px);  
    overflow-y: auto;
    padding: 4px 7px 6px;
  }
  .enoplayer-settings-item {
    padding: 2px 7px;
    margin: 2px 3px;
    font-size: 10.5px;
    border-radius: 999px;
  }*/
  .enoplayer-chapter-tooltip {
    padding: 10px 12px;
    border-radius: 16px;
    max-width: 220px;
    font-size: 0.82rem;
    line-height: 1.3;
  }
  .enoplayer-chapter-tooltip-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .enoplayer-chapter-thumb-wrap {
    width: 180px;
    height: 102px;
    border-radius: 10px;
  }
  .enoplayer-chapter-label {
    font-size: 0.9rem;
    max-width: 180px;
    white-space: normal;
    overflow: visible;
  }
  .enoplayer-chapter-tooltip::after {
    bottom: -10px;
    border-width: 10px 10px 0 10px;
  }
  .enoplayer-next {
    right: 1rem;
    bottom: 7rem;
    width: min(420px, 95vw);
  }
  .enoplayer-next__actions {
    width: 130px;
  }
}

/* === EXTRA SMALL PHONES (≤400px) === */
@media (max-width: 400px) {
  .enoplayer-container {
    padding: 0.8rem 0.7rem;
    border-radius: 14px;
  }
  .enoplayer {
    border-radius: 14px;
  }
  .controls-center {
    gap: 1rem;
  }
  .control-btn {
    width: 28px;
    height: 28px;
    padding: 5px;
  }
  .controls-center .control-btn {
    width: 34px;
    height: 34px;
  }
  .controls-center .recap-btn {
    width: 42px;
    height: 42px;
  }
  .control-btn span {
    width: 14px;
    height: 14px;
  }
  .time-display {
    font-size: 11px;
  }
  .volume-slider-container {
    width: 60px !important;
  }
  .volume-thumb {
    width: 9px;
    height: 9px;
  }
  .enoplayer-next {
    width: 95vw;
    padding: 0.8rem 0.9rem;
  }
  .enoplayer-next__actions {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* === TINY SHORT WINDOWS (≤480w & ≤420h) === */
@media (max-width: 480px) and (max-height: 420px) {
  .enoplayer-controls {
    padding: 38px 10px 10px;
  }
  .controls-bottom {
    margin-top: 12px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .controls-center {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 4px;
  }
  .controls-left,
  .controls-right {
    flex: 1 1 0;
    justify-content: space-between;
  }
  .control-btn {
    width: 30px;
    height: 30px;
    padding: 6px;
  }
  .controls-center .control-btn {
    width: 34px;
    height: 34px;
  }
  .controls-center .recap-btn {
    width: 40px;
    height: 40px;
  }
  .enoplayer-progress {
    bottom: 46px;
  }
}

/* ===========================================
   YOUTUBE-STYLE SETTINGS – SMALL SCREENS
   =========================================== */
@media (max-width: 768px) {
  .enoplayer-settings {
    /* Float over video, not inside player */
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 80px !important;          /* sits above the controls bar */
    top: auto !important;
    transform: none !important;

    /* Size + look (YouTube-like) */
    max-height: 50vh !important;      /* prevents full-cover */
    border-radius: 22px !important;
    background: rgba(10, 15, 30, 0.78) !important;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    font-size: 0.82rem !important;
    overflow: hidden !important;
    z-index: 9999 !important;
  }

  /* Header row: "SETTINGS" + X */
  .enoplayer-settings-header {
    padding: 6px 10px !important;
  }

  .enoplayer-settings-header span {
    font-size: 0.8rem !important;
    letter-spacing: 0.14em;
  }

  /* Body: scroll only inside this area */
  .enoplayer-settings-body {
    max-height: calc(50vh - 40px) !important; /* header height */
    overflow-y: auto !important;
    padding: 6px 10px 8px !important;
  }

  /* Section titles (QUALITY, ENOSOUND, etc.) */
  .enoplayer-settings-title {
    font-size: 0.76rem !important;
    margin-bottom: 4px !important;
  }

  /* “Pills” for options – slightly smaller */
  .enoplayer-settings-item {
    font-size: 0.78rem !important;
    padding: 4px 10px !important;
    margin: 3px 4px 3px 0 !important;
    border-radius: 999px !important;
  }

  /* Optional: slimmer scrollbar, like YouTube */
  .enoplayer-settings-body::-webkit-scrollbar {
    width: 4px;
  }
  .enoplayer-settings-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
  }
}

/* =========================================================
   SEEK THUMB — COMPLETE RESPONSIVE (Normal + Mini + TV)
   Drop this near the END of your CSS
   ========================================================= */

/* ---------- Global defaults (Normal player) ---------- */
:root{
  /* Thumbnail size (16:9) */
  --seek-thumb-w: 176px;
  --seek-thumb-h: 99px;

  /* Time chip sizing */
  --seek-time-fs: 0.95rem;
  --seek-time-py: 6px;
  --seek-time-px: 18px;
  --seek-time-radius: 20px;

  /* Vertical spacing above the bar */
  --seek-thumb-offset: 14px;
}

/* ---------- Base thumb wrapper positioning ---------- */
.enoplayer-seek-thumb{
  position: absolute;
  left: 50%;
  bottom: calc(100% + var(--seek-thumb-offset));
  transform: translateX(-50%) translateY(6px) scale(.98);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 140;

  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s linear .16s;
}

.enoplayer-seek-thumb.is-visible{
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition:
    opacity .16s ease,
    transform .16s ease,
    visibility 0s;
}

/* ---------- Thumbnail frame ---------- */
.enoplayer-seek-thumb-img{
  width: var(--seek-thumb-w);
  height: var(--seek-thumb-h);
  border-radius: var(--enoplayer-radius-sm);

  background: var(--enoplayer-seek-bg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  box-shadow:
    0 10px 26px var(--enoplayer-seek-glow-main),
    0 0 0 1px var(--enoplayer-seek-glow-ring),
    inset 0 0 20px var(--enoplayer-seek-glow-inner);

  overflow: hidden;
  position: relative;
}

/* Notch pointer under the thumbnail (Netflix-like) */
.enoplayer-seek-thumb-img::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  transform: translateX(-50%) rotate(45deg);
  width:12px;
  height:12px;

  background: rgba(2,6,23,0.78);
  border-right: 1px solid rgba(255,255,255,0.14);
  border-bottom: 1px solid rgba(255,255,255,0.14);

  box-shadow: 0 10px 18px rgba(0,0,0,0.35);
  border-bottom-right-radius: 3px;
  pointer-events:none;
}

/* ---------- Time chip (your original style, variable-controlled) ---------- */
.enoplayer-seek-thumb-time{
  background: rgba(0, 112, 255, 0.82);
  padding: var(--seek-time-py) var(--seek-time-px);
  border-radius: var(--seek-time-radius);
  font-size: var(--seek-time-fs);
  font-weight: 700;
  color: #fff;

  text-shadow: 0 0 6px rgba(0,0,0,0.8);
  box-shadow:
    0 4px 16px rgba(0,112,255,0.45),
    inset 0 0 6px rgba(255,255,255,0.25);
}

/* =========================================================
   MODE OVERRIDES
   ========================================================= */

/* Mini mode (EnoFloat) — compact */
.enofloat-mini-mode{
  --seek-thumb-w: 128px;
  --seek-thumb-h: 72px;

  --seek-time-fs: 0.78rem;
  --seek-time-py: 4px;
  --seek-time-px: 12px;
  --seek-time-radius: 14px;

  --seek-thumb-offset: 12px;
}

/* TV mode — big and readable */
.enoplayer-tvmode{
  --seek-thumb-w: 280px;
  --seek-thumb-h: 158px;

  --seek-time-fs: 1rem;
  --seek-time-py: 7px;
  --seek-time-px: 16px;
  --seek-time-radius: 999px;

  --seek-thumb-offset: 18px;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (Normal player sizing)
   These apply to normal player only; mini/tv override above.
   ========================================================= */

/* Tablet + phone */
@media (max-width: 840px){
  :root{
    --seek-thumb-w: 140px;
    --seek-thumb-h: 79px;

    --seek-time-fs: 0.84rem;
    --seek-time-py: 5px;
    --seek-time-px: 14px;
    --seek-time-radius: 16px;

    --seek-thumb-offset: 12px;
  }
}

/* Phones */
@media (max-width: 480px){
  :root{
    --seek-thumb-w: 124px;
    --seek-thumb-h: 70px;

    --seek-time-fs: 0.78rem;
    --seek-time-py: 4px;
    --seek-time-px: 12px;
    --seek-time-radius: 14px;

    --seek-thumb-offset: 10px;
  }
}

/* Extra small phones */
@media (max-width: 400px){
  :root{
    --seek-thumb-w: 112px;
    --seek-thumb-h: 63px;
  }
}



