/* anibee — honey & bubblegum theme */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --bg: #1e0f26;
  --bg-2: #28132f;
  --surface: #351a3f;
  --surface-2: #4b2658;
  --text: #fff6fb;
  --muted: #dcb1cf;
  --pink: #ff5fa8;
  --pink-deep: #e0337f;
  --yellow: #ffd23f;
  --yellow-deep: #f5a623;
  --accent: var(--yellow);
  --accent-2: var(--pink);
  --ink: #2a0f2a;
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Baloo 2', 'Comic Sans MS', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --stripes: repeating-linear-gradient(-45deg, var(--yellow) 0 12px, var(--pink) 12px 24px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  background-color: var(--bg);
  /* faint honeycomb + warm glows */
  background-image:
    radial-gradient(circle at 10% 15%, rgba(255,95,168,0.20), transparent 42%),
    radial-gradient(circle at 90% 6%, rgba(255,210,63,0.14), transparent 40%),
    radial-gradient(circle at 78% 85%, rgba(255,95,168,0.12), transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 L56 16 L56 49 L28 65 L0 49 L0 16 Z M28 65 L28 98' fill='none' stroke='%23ffd23f' stroke-opacity='0.045' stroke-width='2'/%3E%3C/svg%3E");
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

::selection { background: var(--pink); color: #fff; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ---------- header ---------- */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  background: rgba(40,19,47,0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 5px;
  background: var(--stripes);
  opacity: 0.9;
}

.logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  transform: rotate(-2deg);
  white-space: nowrap;
}
.logo span {
  color: var(--yellow);
  display: inline-block;
  animation: wiggle 3.5s ease-in-out infinite;
  text-shadow: 0 3px 0 var(--pink-deep);
}
.logo .bee {
  display: inline-block;
  margin-left: 4px;
  font-size: 22px;
  animation: buzz 6s ease-in-out infinite;
  text-shadow: none;
}
@keyframes wiggle {
  0%, 88%, 100% { transform: rotate(0deg); }
  92% { transform: rotate(-9deg); }
  96% { transform: rotate(9deg); }
}
@keyframes buzz {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(3px, -4px) rotate(8deg); }
  50% { transform: translate(-2px, -1px) rotate(-6deg); }
  75% { transform: translate(2px, 3px) rotate(4deg); }
}

.user-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.user-control .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--yellow), var(--pink));
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}
.user-control button {
  background: var(--surface);
  border: 2px solid var(--surface-2);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.user-control button:hover {
  border-color: var(--pink);
  transform: translateY(-2px) rotate(-1.5deg);
}

/* ---------- layout ---------- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 90px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0 14px;
}
.section-head .section-title { margin: 0; }

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  margin: 32px 0 14px;
  font-weight: 700;
}
.section-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 5px;
  margin-top: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--pink));
}
.section-title:first-child, .section-head:first-child { margin-top: 0; }

.search {
  display: block;
  position: relative;
  width: min(280px, 100%);
}
.search input {
  width: 100%;
  background: var(--surface);
  border: 3px solid var(--surface-2);
  color: var(--text);
  padding: 9px 14px 9px 38px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  transition: border-color 0.15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--yellow); }
.search svg {
  position: absolute;
  left: 13px; top: 50%;
  width: 17px; height: 17px;
  transform: translateY(-50%);
  color: var(--muted);
}

/* ---------- cards ---------- */

.show-grid, .continue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 3px solid var(--surface-2);
  box-shadow: 0 5px 0 rgba(0,0,0,0.25);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), border-color 0.18s ease, box-shadow 0.18s ease;
  animation: card-in 0.4s cubic-bezier(.34,1.56,.64,1) both;
}
.card:nth-child(odd):hover { transform: translateY(-5px) rotate(-1deg) scale(1.02); }
.card:nth-child(even):hover { transform: translateY(-5px) rotate(1deg) scale(1.02); }
.card:hover {
  border-color: var(--yellow);
  box-shadow: 0 10px 0 var(--pink-deep);
}
.card:active { transform: translateY(-1px) scale(0.99) !important; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.card-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(150deg, var(--pink), var(--yellow-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 800;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 4px 0 rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-cover .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,15,38,0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card-cover .play-badge span {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 var(--pink-deep);
  transform: scale(0.7);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.card-cover .play-badge svg { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .play-badge { opacity: 1; }
.card:hover .play-badge span { transform: scale(1); }

.ep-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  padding: 1px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--pink-deep);
}

.progress-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 7px;
  background: rgba(30,15,38,0.6);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  border-radius: 0 999px 999px 0;
}

.card-body { padding: 11px 12px 14px; }
.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  padding: 24px;
  background: var(--surface);
  border: 3px dashed var(--surface-2);
  border-radius: var(--radius);
}
.empty-state code {
  background: var(--bg-2);
  color: var(--yellow);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 13px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  transition: transform 0.15s ease, color 0.15s ease;
}
.back-link:hover { color: var(--yellow); transform: translateX(-4px); }

/* ---------- show page ---------- */

.show-hero {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.show-hero .card-cover {
  width: 150px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 3px solid var(--surface-2);
  box-shadow: 0 8px 0 var(--pink-deep);
  transform: rotate(-2deg);
}
.show-hero-info { flex: 1; min-width: 220px; }
.show-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 6px;
}
.show-desc { color: var(--muted); font-size: 15px; margin: 0 0 14px; line-height: 1.5; }
.show-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.episode-list { display: flex; flex-direction: column; gap: 10px; }
.episode-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  cursor: pointer;
  border: 3px solid var(--surface-2);
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.episode-row:hover {
  border-color: var(--yellow);
  transform: translateX(6px);
}
.episode-row.current { border-color: var(--pink); }
.episode-num {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--pink), var(--yellow-deep));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}
.episode-row.watched .episode-num { background: var(--yellow); color: var(--ink); }
.episode-info { flex: 1; min-width: 0; }
.episode-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
}
.episode-progress-track {
  height: 7px;
  background: var(--bg-2);
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}
.episode-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--yellow));
  border-radius: 999px;
}
.episode-status {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 700;
  background: var(--bg-2);
  padding: 5px 11px;
  border-radius: 999px;
}
.episode-row.watched .episode-status { color: var(--yellow); }

/* ---------- buttons ---------- */

.nav-buttons { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 3px solid var(--surface-2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(0,0,0,0.25);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.nav-btn svg { width: 16px; height: 16px; }
.nav-btn:hover:not(:disabled) {
  border-color: var(--pink);
  transform: translateY(-3px);
  box-shadow: 0 7px 0 rgba(0,0,0,0.28);
}
.nav-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,0.25); }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.nav-btn.primary {
  background: var(--yellow);
  color: var(--ink);
  border-color: var(--yellow);
  box-shadow: 0 4px 0 var(--pink-deep);
}
.nav-btn.primary:hover:not(:disabled) { border-color: var(--yellow); box-shadow: 0 7px 0 var(--pink-deep); }
.nav-btn.pink {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 4px 0 #9c1f5a;
}
.nav-btn.pink:hover:not(:disabled) { border-color: var(--pink); box-shadow: 0 7px 0 #9c1f5a; }
.nav-btn.small { padding: 6px 13px; font-size: 13px; border-width: 2px; }
.nav-btn.big { padding: 13px 26px; font-size: 16px; }

/* ---------- player page ---------- */

.player-wrap { max-width: 1000px; margin: 0 auto; padding: 22px 24px 90px; transition: max-width 0.3s ease; }
body.theater .player-wrap { max-width: 1500px; }

.player-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.player-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}
.player-show-link { color: var(--muted); font-size: 14px; font-weight: 700; }
.player-show-link:hover { color: var(--yellow); }

.keys-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 3px dashed var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--muted);
}
.keys-legend > span { display: inline-flex; align-items: center; gap: 5px; }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11.5px;
  color: var(--ink);
  background: var(--yellow);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--pink-deep);
}

/* episode strip under the player */
.ep-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
}
.ep-strip .ep-chip {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: 170px;
  background: var(--surface);
  border: 3px solid var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ep-strip .ep-chip:hover { border-color: var(--yellow); transform: translateY(-3px); }
.ep-strip .ep-chip.current { border-color: var(--pink); background: var(--surface-2); }
.ep-chip .ep-chip-num { font-size: 11px; color: var(--yellow); font-weight: 800; }
.ep-chip .ep-chip-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-chip .episode-progress-track { margin-top: 6px; height: 5px; }

/* ---------- the custom video player ---------- */

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  border: 3px solid var(--surface-2);
  box-shadow: 0 8px 0 var(--pink-deep), 0 20px 50px rgba(0,0,0,0.45);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* fullscreen: no border, no rounding, edge to edge.
   (separate rules so a browser that doesn't know one selector doesn't drop the rest) */
.player:fullscreen { border: 0; border-radius: 0; box-shadow: none; }
.player:-webkit-full-screen { border: 0; border-radius: 0; box-shadow: none; }
.player:fullscreen::backdrop { background: #000; }
/* fallback for browsers that fullscreen the <video> itself (iPhone) */
video:fullscreen { border: 0; border-radius: 0; }
video:-webkit-full-screen { border: 0; border-radius: 0; }

.player.is-fs {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* the title bar only shows in fullscreen (it's already under the player otherwise) */
.player:not(.is-fs) .shade-top,
.player:not(.is-fs) .top-title { display: none; }

.player.hide-ui { cursor: none; }

.player .shade-top, .player .shade-bottom {
  position: absolute;
  left: 0; right: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.player .shade-top {
  top: 0;
  height: 90px;
  background: linear-gradient(rgba(20,6,24,0.75), transparent);
}
.player .shade-bottom {
  bottom: 0;
  height: 150px;
  background: linear-gradient(transparent, rgba(20,6,24,0.9));
}

.player .top-title {
  position: absolute;
  top: 14px; left: 18px; right: 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.25s ease;
}
.player .top-title small { color: var(--yellow); font-size: 14px; margin-right: 8px; }

.player.hide-ui .shade-top,
.player.hide-ui .shade-bottom,
.player.hide-ui .top-title,
.player.hide-ui .controls { opacity: 0; pointer-events: none; }

.player .controls {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 14px 10px;
  transition: opacity 0.25s ease;
}

.ctrl-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ctrl-row .spacer { flex: 1; }
.ctrl-btn {
  position: relative;
  background: none;
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}
.ctrl-btn svg { width: 24px; height: 24px; }
.ctrl-btn:hover { background: rgba(255,255,255,0.12); color: var(--yellow); transform: scale(1.08); }
.ctrl-btn.on { color: var(--yellow); }
.ctrl-btn.on::after {
  content: '';
  position: absolute;
  bottom: 5px; left: 30%; right: 30%;
  height: 3px;
  border-radius: 99px;
  background: var(--pink);
}
.ctrl-btn[hidden] { display: none; }
.ctrl-btn .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.ctrl-btn:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.ctrl-row .ctrl-btn:last-child .tip { left: auto; right: 0; transform: translateY(4px); }
.ctrl-row .ctrl-btn:last-child:hover .tip { transform: none; }

.time {
  font-size: 13.5px;
  font-weight: 800;
  margin-left: 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.time .dur { color: var(--muted); }

.volume {
  display: flex;
  align-items: center;
}
.volume input {
  width: 0;
  opacity: 0;
  transition: width 0.2s ease, opacity 0.2s ease;
}
.volume:hover input, .volume input:focus-visible { width: 80px; opacity: 1; margin: 0 6px; }

input[type=range].slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pink) var(--fill, 100%), rgba(255,255,255,0.25) var(--fill, 100%));
  cursor: pointer;
}
input[type=range].slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: none;
}
input[type=range].slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--yellow);
  border: none;
}

/* timeline */
.timeline {
  position: relative;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.tl-track {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.22);
  transition: height 0.15s ease;
}
.timeline:hover .tl-track, .timeline.dragging .tl-track { height: 8px; }
.tl-buffered, .tl-played, .tl-seg {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  border-radius: 99px;
}
.tl-buffered { background: rgba(255,255,255,0.3); }
.tl-played { background: linear-gradient(90deg, var(--pink), var(--yellow)); }
.tl-seg {
  background: repeating-linear-gradient(-45deg, rgba(255,210,63,0.55) 0 4px, rgba(255,210,63,0.15) 4px 8px);
  border-radius: 0;
}
.tl-seg.outro { background: repeating-linear-gradient(-45deg, rgba(255,95,168,0.6) 0 4px, rgba(255,95,168,0.15) 4px 8px); }
.tl-thumb {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px var(--pink);
  transform: translateY(-50%) scale(0);
  transition: transform 0.15s ease;
}
.timeline:hover .tl-thumb, .timeline.dragging .tl-thumb { transform: translateY(-50%) scale(1); }
.tl-tooltip {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.tl-tooltip em { font-style: normal; color: var(--pink-deep); margin-left: 5px; }
.timeline:hover .tl-tooltip, .timeline.dragging .tl-tooltip { opacity: 1; }

/* center stuff: big play button, spinner, on-screen feedback */
.big-play {
  position: absolute;
  top: 50%; left: 50%;
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  border: none;
  background: var(--yellow);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 0 var(--pink-deep), 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
}
.big-play svg { width: 38px; height: 38px; margin-left: 5px; }
.big-play:hover { transform: scale(1.1) rotate(-4deg); }
.big-play[hidden] { display: none; }

.spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  border: 6px solid rgba(255,255,255,0.15);
  border-top-color: var(--yellow);
  border-right-color: var(--pink);
  animation: spin 0.8s linear infinite;
  pointer-events: none;
  display: none;
}
.player.buffering .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.osd {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(30,15,38,0.82);
  border: 3px solid var(--yellow);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  padding: 10px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.osd svg { width: 24px; height: 24px; color: var(--yellow); }
.osd.show { animation: osd-pop 0.75s ease forwards; }
.osd.left { left: 20%; }
.osd.right { left: 80%; }
@keyframes osd-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  30% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* skip intro / next episode floating buttons */
.float-btn {
  position: absolute;
  right: 22px;
  bottom: 86px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 3px solid var(--yellow);
  background: rgba(30,15,38,0.85);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 5px 0 rgba(0,0,0,0.35);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, bottom 0.25s ease;
  animation: pop-in 0.3s cubic-bezier(.34,1.56,.64,1);
}
.float-btn svg { width: 20px; height: 20px; position: relative; }
.float-btn span { position: relative; }
.float-btn:hover { background: var(--yellow); color: var(--ink); transform: translateY(-3px); }
.float-btn.next { border-color: var(--pink); }
.float-btn.next:hover { background: var(--pink); color: #fff; }
.float-btn[hidden] { display: none; }
.player.hide-ui .float-btn { bottom: 24px; }
/* progress fill inside the button when it's counting down */
.float-btn .fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(255,95,168,0.45);
}
.float-btn.counting .fill { animation: fill-up var(--count, 8s) linear forwards; }
@keyframes fill-up { to { width: 100%; } }

/* end card */
.endcard {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,15,38,0.8);
  backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}
.endcard[hidden] { display: none; }
.endcard-inner { text-align: center; padding: 20px; max-width: 90%; }
.endcard-label { color: var(--yellow); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; }
.endcard-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 3.5vw, 34px);
  margin: 4px 0 18px;
}
.endcard-ring {
  width: 92px; height: 92px;
  margin: 0 auto 18px;
  position: relative;
  cursor: pointer;
}
.endcard-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.endcard-ring circle { fill: none; stroke-width: 7; }
.endcard-ring .bg { stroke: rgba(255,255,255,0.15); }
.endcard-ring .fg {
  stroke: var(--yellow);
  stroke-linecap: round;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
}
.endcard-ring.counting .fg { animation: ring var(--count, 8s) linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
.endcard-ring .num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
}
.endcard .nav-buttons { justify-content: center; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* settings popover */
.menu {
  position: absolute;
  right: 14px;
  bottom: 64px;
  min-width: 230px;
  background: rgba(40,19,47,0.96);
  border: 3px solid var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: pop-in 0.2s cubic-bezier(.34,1.56,.64,1);
  z-index: 5;
}
.menu[hidden] { display: none; }
.menu-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  padding: 6px 8px 4px;
}
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.menu-row:hover { background: rgba(255,255,255,0.07); }
.speed-opts { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 8px; }
.speed-opts button {
  background: var(--surface);
  border: 2px solid var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
}
.speed-opts button.on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

.toggle {
  position: relative;
  width: 40px; height: 22px;
  border-radius: 99px;
  background: var(--surface-2);
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1);
}
.toggle.on { background: var(--pink); }
.toggle.on::after { transform: translateX(18px); background: var(--yellow); }

/* keyboard help overlay */
.help {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,15,38,0.88);
  backdrop-filter: blur(6px);
  z-index: 6;
  animation: fade-in 0.2s ease;
}
.help[hidden] { display: none; }
.help-inner { padding: 20px; max-width: 520px; width: 100%; }
.help h3 { font-family: var(--font-display); font-size: 24px; margin: 0 0 12px; text-align: center; }
.help-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
  align-items: center;
}
.help-grid > div:nth-child(odd) { text-align: right; white-space: nowrap; }
.help-grid kbd { margin-left: 3px; }
.help p { text-align: center; color: var(--muted); font-size: 12.5px; margin: 16px 0 0; }

/* captions: lift them above the control bar while it's showing (chrome/safari) */
.player video::-webkit-media-text-track-container {
  transition: transform 0.25s ease;
}
.player:not(.hide-ui) video::-webkit-media-text-track-container {
  transform: translateY(-64px);
}
#settings-btn.on .tip { display: none; }

/* captions */
.player video::cue {
  background: rgba(30,15,38,0.78);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
}

/* ---------- modal / misc ---------- */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,6,24,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  width: 320px;
  max-width: calc(100vw - 32px);
  border: 3px solid var(--pink);
  box-shadow: 0 10px 0 var(--pink-deep);
  animation: pop-in 0.3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop-in {
  from { transform: scale(0.85) rotate(-2deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 800;
}
.modal p { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.modal input {
  width: 100%;
  background: var(--bg-2);
  border: 3px solid var(--surface-2);
  color: var(--text);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 14px;
}
.modal input::placeholder { color: var(--muted); font-weight: 600; }
.modal input:focus { outline: none; border-color: var(--yellow); }
.modal button {
  width: 100%;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--yellow);
  padding: 12px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 800;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 4px 0 var(--pink-deep);
  transition: transform 0.14s ease;
}
.modal button:hover { transform: translateY(-3px); }
.modal button:active { transform: translateY(1px); }

.feedback-bubble {
  position: fixed;
  bottom: 16px;
  right: 16px;
  max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 3px solid var(--pink);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 5px 0 var(--pink-deep);
  z-index: 50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1);
}
.feedback-bubble:hover { transform: translateY(-4px) rotate(-1deg); }
.feedback-bubble a { color: var(--yellow); font-weight: 800; }

@media (max-width: 640px) {
  .header { padding: 12px 16px; }
  .container, .player-wrap { padding-left: 14px; padding-right: 14px; }
  .player { border-radius: var(--radius-sm); }
  .ctrl-btn { width: 36px; height: 36px; }
  .ctrl-btn svg { width: 21px; height: 21px; }
  .ctrl-btn.desktop-only, .volume input, .keys-legend { display: none; }
  /* double-tap the sides of the video to skip on phones */
  #back-btn, #fwd-btn { display: none; }
  .time { font-size: 12px; margin-left: 4px; }
  .float-btn { right: 12px; bottom: 70px; font-size: 15px; padding: 8px 16px; }
  .big-play { width: 66px; height: 66px; margin: -33px 0 0 -33px; }
  .big-play svg { width: 30px; height: 30px; }
  .top-title { font-size: 15px; }
  .show-hero .card-cover { width: 110px; }
  .show-title { font-size: 28px; }
}
@media (max-width: 480px) {
  .feedback-bubble {
    white-space: normal;
    font-size: 11.5px;
    left: 16px;
  }
}

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