.ah-player {
  --player-accent: #e50914;
  --player-muted: #9a9c93;
  position: fixed;
  inset: 0;
  width: min(1240px, calc(100vw - 56px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  color: #f5f5ee;
  background: #111111;
  border: 1px solid #333333;
  border-radius: 16px;
  box-shadow: 0 35px 150px #000c;
  font-family: inherit;
  overflow: auto;
  color-scheme: dark;
}
.ah-player::backdrop { background: rgb(5 5 5 / 92%); backdrop-filter: blur(16px); }
.ah-player *, .ah-player *::before, .ah-player *::after { box-sizing: border-box; }
.ah-player [hidden] { display: none !important; }
.ah-player button { font: inherit; cursor: pointer; }
.ah-player button:focus-visible, .ah-player video:focus-visible { outline: 2px solid var(--player-accent); outline-offset: 4px; }
.ah-player__panel { background: #111111; }
.ah-player__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 28px;
}
.ah-player__heading { min-width: 0; }
.ah-player__title { margin: 0; color: #f7f7ef; font-size: clamp(18px, 2.1vw, 27px); font-weight: 500; line-height: 1.18; letter-spacing: -.035em; }
.ah-player__description { overflow: hidden; max-width: 600px; margin: 7px 0 0; color: var(--player-muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ah-player__header-actions { display: flex; align-items: center; gap: 19px; flex: 0 0 auto; }
.ah-player__close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0 0 3px; border: 1px solid #41443a; border-radius: 50%; background: transparent; color: #eee; font-size: 27px !important; font-weight: 300; line-height: 1; transition: background .15s, border-color .15s; }
.ah-player__close:hover { border-color: var(--player-accent); background: #25291e; }
.ah-player__quiet-button { min-height: 34px; padding: 6px 10px; border: 1px solid #383d30; border-radius: 6px; background: #191d15; color: #d3d8c8; font-size: 12px !important; white-space: nowrap; transition: color .15s, border-color .15s; }
.ah-player__quiet-button:hover { border-color: #78834e; color: var(--player-accent); }
.ah-player__stage { position: relative; display: grid; place-items: center; min-height: 260px; max-height: calc(100dvh - 230px); aspect-ratio: 16 / 9; background: #000; border-block: 1px solid #2a2d25; }
.ah-player__video { display: block; width: 100%; height: 100%; max-height: calc(100dvh - 230px); background: #000; object-fit: contain; accent-color: var(--player-accent); }
.ah-player__state { position: absolute; inset: 0 0 48px; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 24px; background: rgb(0 0 0 / 56%); text-align: center; pointer-events: none; }
.ah-player__spinner { width: 27px; height: 27px; margin-bottom: 18px; border: 2px solid #e5091426; border-top-color: var(--player-accent); border-radius: 50%; animation: ah-player-spin .9s linear infinite; }
.ah-player__state-title { margin: 0; color: #f5f5ee; font-size: clamp(17px, 2vw, 23px); font-weight: 500; line-height: 1.3; letter-spacing: -.025em; }
.ah-player__state-detail { max-width: 430px; margin: 11px 0 0; color: #aeb2a3; font-size: 12px; line-height: 1.7; }
.ah-player__state--error::before { content: '!'; display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 20px; border: 1px solid #e5091477; border-radius: 50%; color: var(--player-accent); font-size: 19px; font-weight: 500; }
.ah-player__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 16px 28px; }
.ah-player__playback-info, .ah-player__subtitle-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ah-player__dot { flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--player-accent); }
.ah-player__status { color: #dce1d2; font-size: 12px; white-space: nowrap; }
.ah-player__resume { padding-left: 12px; border-left: 1px solid #3d4234; color: #878e7e; font-size: 12px; white-space: nowrap; }
.ah-player__subtitle-status { overflow: hidden; max-width: 200px; color: #9fa78f; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.ah-player__file { display: none; }
.ah-player--error .ah-player__dot { background: #c8a878; }
.ah-player__panel:fullscreen { display: flex; width: 100vw; height: 100dvh; flex-direction: column; background: #000; }
.ah-player__panel:fullscreen .ah-player__header { flex: 0 0 auto; }
.ah-player__panel:fullscreen .ah-player__stage { flex: 1; min-height: 0; max-height: none; aspect-ratio: auto; }
.ah-player__panel:fullscreen .ah-player__video { max-height: none; }
.ah-player__panel:fullscreen .ah-player__footer { flex: 0 0 auto; }
@keyframes ah-player-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  .ah-player { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 10px; }
  .ah-player__header { gap: 12px; padding: 19px 16px; }
  .ah-player__description { max-width: 230px; }
  .ah-player__header-actions { gap: 8px; }
  .ah-player__header-actions .ah-player__quiet-button { display: none; }
  .ah-player__close { width: 34px; height: 34px; }
  .ah-player__stage { min-height: 230px; }
  .ah-player__video { min-height: 230px; max-height: calc(100dvh - 230px); }
  .ah-player__footer { flex-wrap: wrap; gap: 13px; padding: 15px 16px; }
  .ah-player__playback-info { flex-wrap: wrap; gap: 8px; }
  .ah-player__subtitle-actions { margin-left: auto; }
  .ah-player__subtitle-status { max-width: 145px; }
  .ah-player__resume { font-size: 12px; }
  .ah-player__state-detail { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ah-player__spinner { animation-duration: 2s; }
  .ah-player button { transition: none; }
}
