/* Aleff cinema player — proporção real, contain, controles unificados */
.aplayer {
  --ap-line: rgba(255, 255, 255, 0.12);
  --ap-mute: rgba(255, 255, 255, 0.42);
  --ap-text: #f2eee8;
  --ap-fill: #f2eee8;
  --ap-w: 16;
  --ap-h: 9;
  position: relative;
  display: block;
  width: min(88vw, calc(78vh * (var(--ap-w) / var(--ap-h))));
  max-width: min(88vw, 1100px);
  max-height: 78vh;
  aspect-ratio: var(--ap-w) / var(--ap-h);
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.04), transparent 55%),
    #0a0a0a;
  border: 1px solid var(--ap-line);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.72);
  isolation: isolate;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.aplayer.is-portrait {
  width: min(42vh, 88vw, 420px);
  max-height: 82vh;
}
.aplayer.is-square {
  width: min(72vh, 88vw, 640px);
  max-height: 78vh;
}
.aplayer.is-landscape {
  width: min(88vw, calc(78vh * (var(--ap-w) / var(--ap-h))), 1100px);
}

.aplayer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050505;
}
.aplayer video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #050505;
  outline: none;
}

.aplayer-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.35) 28%, transparent 52%),
    linear-gradient(to bottom, rgba(5, 5, 5, 0.35) 0%, transparent 18%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}
.aplayer.is-paused .aplayer-shade,
.aplayer:hover .aplayer-shade,
.aplayer.is-chrome .aplayer-shade { opacity: 1; }

.aplayer-big {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 3;
}
.aplayer.is-paused .aplayer-big,
.aplayer.is-loading .aplayer-big {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.aplayer-big::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
  margin-left: 3px;
}
.aplayer.is-loading .aplayer-big::after {
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  margin: 0;
  animation: ap-spin 0.8s linear infinite;
}
@keyframes ap-spin { to { transform: rotate(360deg); } }

.aplayer-chrome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
  z-index: 4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.aplayer.is-paused .aplayer-chrome,
.aplayer:hover .aplayer-chrome,
.aplayer.is-chrome .aplayer-chrome {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.aplayer-progress {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  touch-action: none;
}
.aplayer-progress:hover { height: 5px; }
.aplayer-buf {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.18);
}
.aplayer-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--ap-fill);
  box-shadow: 0 0 12px rgba(242, 238, 232, 0.25);
}
.aplayer-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.aplayer-progress:hover .aplayer-knob,
.aplayer.is-seeking .aplayer-knob { transform: translate(-50%, -50%) scale(1); }

.aplayer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.aplayer-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ap-text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.aplayer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.aplayer-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aplayer-vol {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  border-radius: 12px;
  transition: background .2s;
}
.aplayer-vol:hover,
.aplayer.is-vol-drag .aplayer-vol {
  background: rgba(255, 255, 255, 0.04);
}
.aplayer-vol-step {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
}
.aplayer-vol-step svg {
  width: 14px;
  height: 14px;
}
.aplayer-vol-track {
  position: relative;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  touch-action: none;
  margin: 0 4px;
}
.aplayer-vol-track:hover,
.aplayer.is-vol-drag .aplayer-vol-track {
  height: 6px;
}
.aplayer-vol-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 85%;
  border-radius: inherit;
  background: var(--ap-fill);
  box-shadow: 0 0 10px rgba(242, 238, 232, 0.2);
  pointer-events: none;
}
.aplayer-vol-knob {
  position: absolute;
  top: 50%;
  left: 85%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.aplayer-vol-track:hover .aplayer-vol-knob,
.aplayer.is-vol-drag .aplayer-vol-knob {
  transform: translate(-50%, -50%) scale(1);
}
.aplayer-vol-pct {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ap-mute);
  min-width: 32px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.aplayer.is-muted .aplayer-vol-fill {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.aplayer-time {
  margin-left: 4px;
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ap-mute);
  font-variant-numeric: tabular-nums;
  min-width: 92px;
}
.aplayer-spacer { flex: 1; min-width: 8px; }
.aplayer-tag {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 700;
  margin-right: 4px;
}

.aplayer.is-fs {
  width: 100vw !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  height: 100vh !important;
  aspect-ratio: auto !important;
  border-radius: 0;
  border: none;
}
.aplayer.is-fs .aplayer-stage {
  inset: 0;
}
.aplayer.is-fs video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .aplayer {
    width: min(94vw, calc(70vh * (var(--ap-w) / var(--ap-h))));
    max-height: 70vh;
    border-radius: 12px;
  }
  .aplayer.is-portrait {
    width: min(86vw, 420px);
    max-height: 78vh;
  }
  .aplayer-big { width: 60px; height: 60px; }
  .aplayer-tag { display: none; }
  .aplayer-vol-track { width: 52px; }
  .aplayer-vol-pct { display: none; }
  .aplayer-time { min-width: 78px; font-size: 10px; }
}
@media (max-width: 400px) {
  .aplayer-vol-step { display: none; }
}
