/* ============================================================
   MCbytess Player — estilos del reproductor
   ============================================================ */

:root {
  --brand: #0a527a;
  --brand-dark: #073b59;
  --brand-light: #0e6a9e;
}

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

/* Keyboard hints */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding: 0 0.4rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  color: rgba(11,13,18,0.75);
  background: rgba(11,13,18,0.04);
  border: 1px solid rgba(11,13,18,0.12);
  border-bottom-width: 2px;
  border-radius: 0.375rem;
}

/* ============================================================
   Control buttons
   ============================================================ */
.ctrl-btn {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.6rem;
  color: white;
  background: transparent;
  transition: background-color 0.15s ease, transform 0.1s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.12); }
.ctrl-btn:active { transform: scale(0.94); }
.ctrl-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ============================================================
   Volume slider
   ============================================================ */
.volume-group:hover .volume-slider-wrap,
.volume-group:focus-within .volume-slider-wrap {
  width: 90px;
  padding-right: 6px;
  padding-left: 2px;
}
.volume-slider-wrap {
  width: 0;
  padding: 0;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: var(--vol-pct, 100%) 100%;
  background-repeat: no-repeat;
  transition: height 0.15s ease;
}
.volume-slider:hover { height: 6px; }

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.15s ease;
}
.volume-slider:hover::-webkit-slider-thumb { transform: scale(1.15); }

.volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.volume-slider::-moz-range-track {
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}
.volume-slider::-moz-range-progress {
  height: 4px;
  background: var(--brand);
  border-radius: 999px;
}

/* ============================================================
   Player: auto-hide controls
   ============================================================ */
.player .controls-top,
.player .controls-bottom {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.player.idle .controls-top { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.player.idle .controls-bottom { opacity: 0; transform: translateY(6px); pointer-events: none; }
.player.idle { cursor: none; }

.player.paused .controls-top,
.player.paused .controls-bottom {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

.player.paused { cursor: default !important; }

/* Smooth show on hover/touch */
.player:hover .controls-top,
.player:hover .controls-bottom,
.player:focus-within .controls-top,
.player:focus-within .controls-bottom {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ============================================================
   Quality menu items
   ============================================================ */
.quality-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
}
.quality-item:hover { background: rgba(255,255,255,0.08); }
.quality-item.active {
  color: var(--brand);
  background: rgba(10,82,122,0.1);
  font-weight: 600;
}
.quality-item .check {
  opacity: 0;
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.quality-item.active .check { opacity: 1; }

/* ============================================================
   Live dot state
   ============================================================ */
#live-btn.at-live #live-dot {
  background: var(--brand);
  box-shadow: 0 0 0 0 rgba(10,82,122,0.7);
  animation: live-pulse 2s infinite;
}
#live-btn.behind-live #live-dot {
  background: rgba(255,255,255,0.4);
  animation: none;
}
#live-btn.behind-live span:last-child {
  color: rgba(255,255,255,0.6);
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(10,82,122,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(10,82,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(10,82,122,0); }
}

/* ============================================================
   Center feedback pulse
   ============================================================ */
#center-feedback-icon.show {
  opacity: 1;
  animation: feedback-pop 0.5s ease-out forwards;
}
@keyframes feedback-pop {
  0%   { transform: scale(0.6); opacity: 0.9; }
  80%  { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* ============================================================
   Fullscreen corrections
   ============================================================ */
.player:fullscreen,
.player:-webkit-full-screen {
  border-radius: 0;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  aspect-ratio: auto;
}
.player:fullscreen video {
  width: 100%;
  height: 100%;
}

/* ============================================================
   Focus ring for menu items
   ============================================================ */
.quality-item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

/* ============================================================
   Small screens
   ============================================================ */
@media (max-width: 640px) {
  .ctrl-btn { width: 2.25rem; height: 2.25rem; }
  .volume-group:hover .volume-slider-wrap { width: 0; padding: 0; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
