:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --ink: #222222;
  --ink-soft: #444444;
  --ink-mute: #888888;
  --border: #e6e6e6;
  --brand: #c8102e;
  --brand-dark: #a30c25;
  --link: #1056a3;
  --surface: #ffffff;
}

html[data-theme="dark"] {
  --bg: #15171a;
  --bg-soft: #1e2125;
  --ink: #e9eaec;
  --ink-soft: #b6bac0;
  --ink-mute: #7e828a;
  --border: #2c3036;
  --brand: #ef3b54;
  --brand-dark: #c8102e;
  --link: #6aa9e0;
  --surface: #1a1d21;
}

html {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

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

a:hover {
  color: var(--brand);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: "Merriweather", Georgia, serif;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 50;
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 26px;
  background: var(--border);
}

.brand-go {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.brand-go-mark {
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
}

.nav-main a {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-main a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav-main a.active {
  color: var(--brand);
  font-weight: 500;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  border: 0;
}

.icon-btn:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.feedback-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feedback-btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.subnav {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 40;
}

.subnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.subnav-inner::-webkit-scrollbar {
  display: none;
}

.subnav a {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.subnav a:hover {
  color: var(--ink);
}

.subnav a.active {
  color: var(--brand);
  font-weight: 500;
  border-bottom-color: var(--brand);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
}

.layout {
  display: block;
}

.main {
  min-width: 0;
}

.section-title {
  font-family: "Merriweather", serif;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title .more {
  font-family: "Roboto", sans-serif;
  font-size: 13px;
  color: var(--link);
  font-weight: 400;
}

.ep-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 20px;
}

.ep-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.ep-item:hover .ep-item-title {
  color: var(--brand);
}

.ep-item-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #ddd;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px;
}

.ep-item-thumb img {
  transition: transform 0.35s;
}

.ep-item:hover .ep-item-thumb img {
  transform: scale(1.04);
}

.ep-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ep-item-thumb .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 500;
}

.ep-item-thumb .podcast-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== Nhận biết loại Audio / Video ===== */
.ep-item-thumb .media-mark {
  position: absolute;
  top: 8px;
  left: 8px;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.ep-item-thumb .media-mark.is-audio {
  background: var(--brand);
}

.ep-item-thumb .media-mark.is-video {
  background: rgba(17, 17, 17, 0.82);
}

.ep-item-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ep-item-title {
  font-family: "Merriweather", serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 8px;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ep-item-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.section {
  margin-bottom: 36px;
}

.section.is-hidden {
  display: none;
}

.section.title-hidden .section-title {
  display: none;
}

.section.title-hidden .load-more-wrap {
  display: none;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 28px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.15s;
}

.load-more:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.load-more:active {
  transform: scale(0.98);
}

.load-more.loading {
  pointer-events: none;
  opacity: 0.7;
}

.load-more .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lm-spin 0.7s linear infinite;
  display: none;
}

.load-more.loading .spinner {
  display: inline-block;
}

.load-more.loading .label-default,
.load-more .label-done {
  display: none;
}

.load-more.done {
  color: var(--ink-mute);
  background: var(--bg-soft);
  border-color: var(--border);
  cursor: default;
  pointer-events: none;
}

.load-more.done .label-default,
.load-more.done .spinner {
  display: none;
}

.load-more.done .label-done {
  display: inline;
}

@keyframes lm-spin {
  to {
    transform: rotate(360deg);
  }
}

.ep-item.is-new {
  animation: lm-fadein 0.35s ease both;
}

@keyframes lm-fadein {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.compact-list {
  display: flex;
  flex-direction: column;
}

.compact-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.compact-row:first-child {
  padding-top: 0;
}

.compact-row:hover h4 {
  color: var(--brand);
}

.compact-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: #ddd;
}

.compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-thumb .duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
}

.compact-row h4 {
  font-family: "Merriweather", serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.4;
  color: var(--ink);
}

.compact-row .compact-meta {
  font-size: 12px;
  color: var(--ink-mute);
}

.compact-row .compact-meta .time-ago {
  color: var(--brand);
  font-weight: 500;
}

footer {
  background: var(--bg-soft);
  border-top: 3px solid var(--brand);
  padding: 32px 20px 24px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

footer h5 {
  font-family: "Merriweather", serif;
  color: var(--ink);
  font-size: 14px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

footer ul li a:hover {
  color: var(--brand);
}

.footer-about p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.footer-bottom {
  max-width: 1180px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
}

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  color: #fff;
  border-top: 1px solid #2a2a2a;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
  z-index: 300;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.player.is-hidden {
  transform: translateY(110%);
  pointer-events: none;
}

.player-progress {
  position: relative;
  height: 4px;
  background: #333;
  cursor: pointer;
  transition: height 0.15s;
  touch-action: none;
  user-select: none;
}

.player-progress:hover,
.player-progress.dragging {
  height: 6px;
}

.player-progress-fill {
  position: absolute;
  inset: 0;
  width: 38%;
  background: linear-gradient(90deg, var(--brand) 0%, #e74c3c 100%);
  pointer-events: none;
}

.player-progress-fill::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--brand);
  border-radius: 50%;
  opacity: 0;
  transition:
    opacity 0.15s,
    transform 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.player-progress:hover .player-progress-fill::after,
.player-progress.dragging .player-progress-fill::after {
  opacity: 1;
}

.player-progress.dragging .player-progress-fill::after {
  transform: translateY(-50%) scale(1.15);
}

.player-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 60px;
}

.player-track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #333;
}

.player-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  min-width: 0;
  flex: 1;
}

.player-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.player-series {
  font-size: 11.5px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.player-series:hover {
  color: var(--brand);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-time {
  font-size: 11px;
  color: #999;
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
  padding: 0 4px;
}

.player-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: #ccc;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s,
    transform 0.15s;
  padding: 0;
}

.player-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.player-btn.play {
  width: 38px;
  height: 38px;
  background: #fff;
  color: #111;
  margin: 0 2px;
}

.player-btn.play:hover {
  transform: scale(1.06);
  background: #fff;
}

.player-btn.play.playing svg.icon-play {
  display: none;
}

.player-btn.play svg.icon-pause {
  display: none;
}

.player-btn.play.playing svg.icon-pause {
  display: block;
}

.player-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-volume-bar {
  width: 80px;
  height: 4px;
  background: #333;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.player-volume-fill {
  position: absolute;
  inset: 0;
  width: 70%;
  background: #ccc;
  border-radius: 2px;
  pointer-events: none;
}

.player-volume-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s;
}

.player-volume-bar:hover .player-volume-fill::after,
.player-volume-bar.dragging .player-volume-fill::after {
  opacity: 1;
}

.player-volume-bar:hover .player-volume-fill,
.player-volume-bar.dragging .player-volume-fill {
  background: #fff;
}

.player-volume-btn .icon-muted {
  display: none;
}

.player-volume-btn.muted .icon-sound {
  display: none;
}

.player-volume-btn.muted .icon-muted {
  display: block;
}

.player-volume-btn.muted {
  color: var(--brand);
}

.player-speed {
  font-size: 12px;
  color: #ccc;
  background: transparent;
  border: 1px solid #3a3a3a;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition:
    border-color 0.15s,
    color 0.15s;
}

.player-speed:hover {
  border-color: #666;
  color: #fff;
}

.nav-toggle {
  display: none;
}

.nav-toggle-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}

.nav-toggle-btn:hover {
  background: var(--bg-soft);
}

@media (max-width: 900px) {
  .player-extras .player-volume,
  .player-extras .player-speed {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 62px;
  }

  .player-inner {
    padding: 8px 12px;
    gap: 10px;
    grid-template-columns: 1fr auto;
    min-height: 52px;
  }

  .player-thumb {
    width: 40px;
    height: 40px;
  }

  .player-controls {
    gap: 4px;
  }

  .player-time,
  .player-extras {
    display: none;
  }

  /* Mobile: ẩn tua nhanh nhưng GIỮ nút Tập trước / Tập sau. */
  .player-btn[aria-label="Lùi 15 giây"],
  .player-btn[aria-label="Tiến 30 giây"] {
    display: none;
  }

  .player-btn.play {
    width: 36px;
    height: 36px;
    margin: 0;
  }

  /* Tua dễ hơn: thanh cao hơn + núm luôn hiện và to hơn. */
  .player-progress {
    height: 6px;
  }

  .player-progress-fill::after {
    opacity: 1;
    width: 16px;
    height: 16px;
    right: -8px;
  }
}

@media (max-width: 1024px) {
  .topbar-inner,
  .subnav-inner,
  .container,
  .footer-inner,
  .footer-bottom {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ep-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav-main a {
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (max-width: 820px) {
  .ep-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .ep-item-title {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .topbar-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .brand-logo {
    height: 36px;
  }

  .brand-divider {
    height: 22px;
  }

  .brand-go-mark {
    font-size: 10px;
    padding: 2px 6px;
  }

  .topbar-inner {
    gap: 8px;
  }

  .nav-toggle-btn {
    display: inline-flex;
    order: 3;
  }

  /* Dồn nhóm bên phải (dark mode + menu) sát mép phải, cạnh nhau */
  .topbar-right {
    margin-left: auto;
    gap: 4px;
  }

  .nav-main {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    margin-left: 0;
    gap: 0;
  }

  .nav-main a {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-main a:last-child {
    border-bottom: 0;
  }

  .nav-toggle:checked ~ .topbar-inner .nav-main {
    display: flex;
  }

  .feedback-btn {
    padding: 8px;
  }

  .feedback-btn-text {
    display: none;
  }

  .subnav-inner {
    padding: 0 14px;
  }

  .subnav a {
    padding: 11px 10px;
    font-size: 13px;
  }

  .container {
    padding: 18px 14px;
  }

  .section-title {
    font-size: 18px;
    padding-bottom: 10px;
    margin-bottom: 14px;
  }

  .section-title .more {
    font-size: 12px;
  }

  .section {
    margin-bottom: 26px;
  }

  .ep-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ep-item-title {
    font-size: 16px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .ep-item-desc {
    font-size: 13px;
  }

  .ep-item-thumb {
    aspect-ratio: 16 / 9;
    margin-bottom: 10px;
  }

  .ep-item-thumb .duration {
    font-size: 11px;
    padding: 2px 6px;
  }

  .ep-item-thumb .podcast-mark {
    font-size: 10px;
    padding: 2px 6px;
  }

  .compact-row {
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 12px 0;
  }

  .compact-row h4 {
    font-size: 14px;
  }

  .compact-row .compact-meta {
    font-size: 11px;
  }

  footer {
    padding: 28px 14px 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 380px) {
  .brand-logo {
    height: 32px;
  }

  .brand-divider {
    display: none;
  }

  .brand-go-mark {
    font-size: 9px;
    padding: 2px 5px;
  }

  .section-title {
    font-size: 16px;
  }

  .ep-item-title {
    font-size: 15px;
  }

  .compact-row {
    grid-template-columns: 90px 1fr;
  }
}

/* ===== Chi tiết bài nghe (overlay trong trang) ===== */
/* Player lớn nằm TRONG luồng trang (không che header/subnav/footer). */
.detail-overlay {
  display: none;
  background: var(--bg);
}

.detail-overlay.open {
  display: block;
  animation: detail-in 0.28s ease both;
}

@keyframes detail-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-overlay-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

.detail-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  margin-bottom: 14px;
}

.detail-close:hover {
  color: var(--brand);
}

.audio-card {
  background: linear-gradient(160deg, #1a1a1a 0%, #2a1416 100%);
  color: #fff;
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.audio-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(
    circle,
    rgba(200, 16, 46, 0.22) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.audio-card-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
  position: relative;
}

.audio-card-thumb {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  background: #333;
}

.audio-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.audio-card-info {
  min-width: 0;
  flex: 1;
}

.audio-card-series {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f4b223;
  margin-bottom: 10px;
}

.audio-card-title {
  font-family: "Merriweather", serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.audio-card-desc {
  font-size: 14px;
  color: #c8ccd2;
  line-height: 1.6;
  margin: 0 0 14px;
}

.audio-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #9aa0a6;
}

.audio-card-meta .dot {
  width: 3px;
  height: 3px;
  background: #666;
  border-radius: 50%;
}

.ac-progress {
  position: relative;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 8px;
  touch-action: none;
  user-select: none;
}

.ac-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--brand) 0%, #e74c3c 100%);
  border-radius: 3px;
  pointer-events: none;
}

.ac-progress-fill::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ac-times {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

.ac-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.ac-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  color: #ddd;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    color 0.15s,
    background 0.15s;
}

.ac-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ac-btn.play {
  width: 56px;
  height: 56px;
  background: #fff;
  color: #000;
}

.ac-btn.play:hover {
  transform: scale(1.06);
  background: #fff;
}

.ac-btn.play.playing svg.icon-play {
  display: none;
}

.ac-btn.play svg.icon-pause {
  display: none;
}

.ac-btn.play.playing svg.icon-pause {
  display: block;
}

.ac-speed {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ddd;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.ac-speed:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

@media (max-width: 720px) {
  .audio-card-head {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  .audio-card-thumb {
    width: 100%;
    height: 200px;
  }

  .audio-card-title {
    font-size: 20px;
  }
}

@media (max-width: 640px) {
  .detail-overlay-inner {
    padding: 12px 14px 32px;
  }

  .audio-card {
    padding: 20px;
  }

  .audio-card-thumb {
    height: 180px;
  }

  .audio-card-title {
    font-size: 18px;
  }

  .ac-controls {
    gap: 8px;
  }

  .ac-btn.play {
    width: 48px;
    height: 48px;
  }

  .ac-speed {
    position: static;
    transform: none;
    margin-left: auto;
  }

  /* Tua dễ hơn trên player lớn: thanh cao hơn + núm to hơn. */
  .ac-progress {
    height: 9px;
  }

  .ac-progress-fill::after {
    width: 20px;
    height: 20px;
    right: -10px;
  }
}

/* ===== Thẻ lớn dạng VIDEO (player chi tiết) ===== */
.video-card {
  background: linear-gradient(160deg, #1a1a1a 0%, #2a1416 100%);
  color: #fff;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

.video-card::before {
  content: "";
  position: absolute;
  top: 30%;
  right: -10%;
  width: 60%;
  height: 70%;
  background: radial-gradient(circle, rgba(200, 16, 46, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  z-index: 1;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.3s;
}

.video-poster-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-play-big {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.5);
}

.video-poster-overlay:hover .video-play-big {
  transform: scale(1.08);
  background: var(--brand-dark);
}

.video-poster-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #fff;
  pointer-events: none;
}

.video-poster-badge .live-dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.7);
  animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.7);
  }

  100% {
    box-shadow: 0 0 0 12px rgba(196, 30, 58, 0);
  }
}

.video-card-body {
  padding: 24px 28px 28px;
  position: relative;
  z-index: 1;
}

.video-card-series {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f4b223;
  margin-bottom: 10px;
}

.video-card-title {
  font-family: "Merriweather", serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.video-card-desc {
  font-size: 14px;
  color: #c8ccd2;
  line-height: 1.6;
  margin: 0 0 14px;
}

.video-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #9aa0a6;
}

.video-card-meta .dot {
  width: 3px;
  height: 3px;
  background: #666;
  border-radius: 50%;
}

@media (max-width: 720px) {
  .video-card-title {
    font-size: 20px;
  }

  .video-card-body {
    padding: 20px 20px 24px;
  }

  .video-play-big {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 640px) {
  .video-card-title {
    font-size: 18px;
  }

  .video-card-desc {
    font-size: 13px;
  }

  .video-card-body {
    padding: 18px 16px 22px;
  }

  .video-poster-badge {
    font-size: 10px;
    padding: 4px 10px;
    top: 12px;
    left: 12px;
  }

  .video-play-big {
    width: 56px;
    height: 56px;
  }

  .video-play-big svg {
    width: 24px;
    height: 24px;
  }
}
