/* ============================================================
   Eforie City Video Player – Styles
   ============================================================ */

:root {
  --ecp-bg:        #0a0a0e;
  --ecp-accent:    #00b4d8;
  --ecp-accent2:   #0077b6;
  --ecp-ctrl-bg:   rgba(0,0,0,.72);
  --ecp-text:      #f0f4f8;
  --ecp-radius:    10px;
  --ecp-ctrl-h:    46px;
  --ecp-trans:     .22s cubic-bezier(.4,0,.2,1);
}

/* ── WRAPPER ── */
.eforie-player-wrap {
  position: relative;
  display: block;
  background: var(--ecp-bg);
  border-radius: var(--ecp-radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  font-family: 'Segoe UI', system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  max-width: 100%;
}

/* ── VIDEO ── */
.ecp-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ── PRE-ROLL loading dots ── */
.ecp-preroll-loading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ecp-preroll-loading div {
  width: 10px; height: 10px;
  background: var(--ecp-accent);
  border-radius: 50%;
  animation: ecpBounce 1.4s ease-in-out infinite both;
}
.ecp-preroll-loading div:nth-child(1) { animation-delay: -.32s; }
.ecp-preroll-loading div:nth-child(2) { animation-delay: -.16s; }
.ecp-preroll-loading div:nth-child(3) { animation-delay:  0s;   }

/* ── PRE-ROLL LAYER ── */
.ecp-preroll {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.ecp-preroll.active {
  opacity: 1;
  pointer-events: all;
}
.ecp-preroll img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.ecp-preroll video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── SKIP BUTTON ── */
.ecp-skip-btn {
  position: absolute;
  bottom: 64px;
  right: 14px;
  z-index: 30;
  background: rgba(0,0,0,.78);
  color: var(--ecp-text);
  border: 2px solid var(--ecp-accent);
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, background var(--ecp-trans), transform .15s;
  letter-spacing: .3px;
}
.ecp-skip-btn.visible {
  opacity: 1;
  pointer-events: all;
}
.ecp-skip-btn.ready {
  background: var(--ecp-accent);
  color: #fff;
}
.ecp-skip-btn.ready:hover {
  background: var(--ecp-accent2);
  transform: scale(1.04);
}

/* ── CONTROLS BAR ── */
.ecp-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--ecp-ctrl-h);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
  z-index: 10;
  opacity: 0;
  transition: opacity var(--ecp-trans);
}
.eforie-player-wrap:hover .ecp-controls,
.eforie-player-wrap.ecp-paused .ecp-controls,
.eforie-player-wrap.ecp-show-ctrl .ecp-controls {
  opacity: 1;
}

/* ── GENERIC BUTTON ── */
.ecp-btn {
  background: none;
  border: none;
  color: var(--ecp-text);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color var(--ecp-trans), background var(--ecp-trans);
}
.ecp-btn:hover { background: rgba(255,255,255,.12); color: var(--ecp-accent); }
.ecp-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  pointer-events: none;
}

/* ── PROGRESS ── */
.ecp-progress-wrap {
  flex: 1;
  cursor: pointer;
  padding: 10px 4px;
  position: relative;
}
.ecp-progress-bg {
  height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: height .15s;
}
.ecp-progress-wrap:hover .ecp-progress-bg,
.ecp-progress-wrap:focus .ecp-progress-bg { height: 6px; }
.ecp-progress-buffered,
.ecp-progress-played {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 4px;
}
.ecp-progress-buffered { background: rgba(255,255,255,.35); }
.ecp-progress-played   { background: var(--ecp-accent); }
.ecp-progress-thumb {
  position: absolute;
  top: 50%; right: 0;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  transform: translate(50%, -50%);
  opacity: 0;
  transition: opacity .15s;
  box-shadow: 0 0 4px rgba(0,0,0,.5);
}
.ecp-progress-wrap:hover .ecp-progress-thumb,
.ecp-progress-wrap:focus .ecp-progress-thumb { opacity: 1; }

/* ── TIME ── */
.ecp-time {
  color: var(--ecp-text);
  font-size: 12px;
  white-space: nowrap;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
  opacity: .85;
}

/* ── VOLUME ── */
.ecp-volume {
  width: 72px;
  flex-shrink: 0;
  -webkit-appearance: none;
  background: rgba(255,255,255,.2);
  height: 4px;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}
.ecp-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
}
@media (max-width: 480px) { .ecp-volume { display: none; } }

/* ── LIVE BADGE ── */
.ecp-live-badge {
  color: #ff3c41;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  display: none;
  flex-shrink: 0;
}
.ecp-is-live .ecp-live-badge { display: inline; }
.ecp-is-live .ecp-time       { display: none; }
.ecp-is-live .ecp-progress-wrap { pointer-events: none; opacity: .5; }

/* ── SPINNER ── */
.ecp-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.ecp-spinner.active { opacity: 1; }
.ecp-spinner div {
  width: 10px; height: 10px;
  background: var(--ecp-accent);
  border-radius: 50%;
  margin: 0 5px;
  animation: ecpBounce 1.4s ease-in-out infinite both;
}
.ecp-spinner div:nth-child(1) { animation-delay: -.32s; }
.ecp-spinner div:nth-child(2) { animation-delay: -.16s; }
.ecp-spinner div:nth-child(3) { animation-delay: 0s; }
.ecp-spinner div:nth-child(4) { animation-delay: .16s; }
@keyframes ecpBounce {
  0%,80%,100% { transform: scale(0); opacity: .4; }
  40%         { transform: scale(1); opacity: 1; }
}

/* ── BIG PLAY OVERLAY ── */
.ecp-big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 8;
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s;
}
.eforie-player-wrap.ecp-paused .ecp-big-play { opacity: 1; }
.ecp-big-play svg {
  width: 72px; height: 72px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.ecp-big-play circle { fill: rgba(0,0,0,.5); stroke: rgba(255,255,255,.6); stroke-width: 2; }
.ecp-big-play polygon { fill: #fff; }

/* ── FULLSCREEN ── */
:fullscreen             .eforie-player-wrap,
:-webkit-full-screen    .eforie-player-wrap,
:-moz-full-screen       .eforie-player-wrap { border-radius: 0; }

/* ── MOBILE tweaks ── */
@media (max-width: 600px) {
  .ecp-controls { gap: 2px; padding: 0 6px; }
  .ecp-btn svg  { width: 18px; height: 18px; }
}
