/* jxzltn 补丁：无障碍、移动端、播放器与 ABABSEO */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  background: #111827;
  color: #34d399;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  font-weight: 700;
  text-decoration: none;
}

[data-mobile-panel] {
  display: none;
}

[data-mobile-panel].open {
  display: block;
}

.break-words {
  overflow-wrap: break-word;
  word-break: break-word;
}

.-mt-6 {
  margin-top: -1.5rem;
}

.category-filters {
  margin-top: -1.5rem;
}

.focus\:ring-green-500:focus {
  --tw-ring-color: rgb(34 197 94 / 0.5);
  box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
}

/* ── 首页 Hero ── */

.home-hero {
  display: flex;
  align-items: center;
  min-height: 70vh;
  min-height: min(70vh, 560px);
  background-color: #111827;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.5;
}

.home-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.15));
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.home-hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero__btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.home-hero__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── 播放页标签 ── */

.watch-tabs {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.watch-tabs::-webkit-scrollbar {
  display: none;
}

.watch-tabs button {
  flex-shrink: 0;
  white-space: nowrap;
}

.watch-episodes button {
  min-height: 2.5rem;
  font-size: 0.8125rem;
}

.relative {
  position: relative;
}

.z-10 {
  z-index: 10;
}

/* jxzltn 构建缺失的关键工具类 */
.bg-gray-900 {
  background-color: #111827;
}

.from-gray-900 {
  --tw-gradient-from: #111827 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(17 24 39 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-black {
  --tw-gradient-to: #000 var(--tw-gradient-to-position);
}

.from-black\/80 {
  --tw-gradient-from: rgb(0 0 0 / 0.8) var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.via-black\/50 {
  --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgb(0 0 0 / 0.5) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

.bg-green-50 {
  background-color: #f0fdf4;
}

.border-green-100 {
  border-color: #dcfce7;
}

.min-h-\[70vh\] {
  min-height: 70vh;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.opacity-50 {
  opacity: 0.5;
}

/* ── 页脚（深色背景对比度修复） ── */

.site-footer {
  color: #f3f4f6;
}

.site-footer__tagline,
.site-footer__desc,
.site-footer__link,
.site-footer__muted {
  color: #d1d5db;
}

.site-footer__link {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__link:hover {
  color: #4ade80;
}

.site-footer__tag {
  display: inline-block;
  color: #e5e7eb;
  background: rgba(55, 65, 81, 0.85);
  border: 1px solid rgba(107, 114, 128, 0.45);
}

.site-footer__divider {
  border-color: #374151;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.hover\:text-green-400:hover {
  color: #4ade80;
}

.lg\:grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.text-gray-400 {
  color: #9ca3af;
}

.text-gray-500 {
  color: #9ca3af;
}

/* jxzltn 构建缺失的布局/间距/响应式工具类 */
.block {
  display: block;
}

.gap-3 {
  gap: 0.75rem;
}

.mx-2 {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.mx-4 {
  margin-left: 1rem;
  margin-right: 1rem;
}

.mt-10 {
  margin-top: 2.5rem;
}

.mt-16 {
  margin-top: 4rem;
}

.p-5 {
  padding: 1.25rem;
}

.px-5 {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-6 {
  padding-top: 1.5rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.pb-16 {
  padding-bottom: 4rem;
}

.pr-4 {
  padding-right: 1rem;
}

.bottom-4 {
  bottom: 1rem;
}

.left-2 {
  left: 0.5rem;
}

.right-2 {
  right: 0.5rem;
}

.top-1\/2 {
  top: 50%;
}

.-translate-y-1\/2 {
  transform: translateY(-50%);
}

.justify-end {
  justify-content: flex-end;
}

.overflow-x-auto {
  overflow-x: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duration-500 {
  transition-duration: 500ms;
}

.max-w-md {
  max-width: 28rem;
}

.min-h-\[10rem\] {
  min-height: 10rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-5xl {
  font-size: 3rem;
  line-height: 1;
}

.text-green-200 {
  color: #bbf7d0;
}

.text-green-700 {
  color: #15803d;
}

.text-white\/85 {
  color: rgb(255 255 255 / 0.85);
}

.border-gray-100 {
  border-color: #f3f4f6;
}

.bg-white\/10 {
  background-color: rgb(255 255 255 / 0.1);
}

.bg-gray-800\/50 {
  background-color: rgb(31 41 55 / 0.5);
}

.from-gray-800 {
  --tw-gradient-from: #1f2937 var(--tw-gradient-from-position);
  --tw-gradient-to: rgb(31 41 55 / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.focus\:border-transparent:focus {
  border-color: transparent;
}

.focus\:ring-white\/40:focus {
  --tw-ring-color: rgb(255 255 255 / 0.4);
  box-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
}

.hover\:bg-green-200:hover {
  background-color: #bbf7d0;
}

.hover\:bg-white\/20:hover {
  background-color: rgb(255 255 255 / 0.2);
}

@media (min-width: 640px) {
  .sm\:bottom-6 {
    bottom: 1.5rem;
  }

  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .sm\:flex-shrink-0 {
    flex-shrink: 0;
  }

  .sm\:gap-4 {
    gap: 1rem;
  }

  .sm\:gap-6 {
    gap: 1.5rem;
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sm\:mb-8 {
    margin-bottom: 2rem;
  }

  .sm\:mb-10 {
    margin-bottom: 2.5rem;
  }

  .sm\:p-6 {
    padding: 1.5rem;
  }

  .sm\:p-8 {
    padding: 2rem;
  }

  .sm\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .sm\:py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .sm\:py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .sm\:py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .sm\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .sm\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .sm\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .sm\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .sm\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .sm\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }

  .home-hero__inner {
    padding: 4rem 1.5rem;
  }

  .home-hero__content h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:justify-between {
    justify-content: space-between;
  }

  .md\:mb-4 {
    margin-bottom: 1rem;
  }

  .md\:py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .home-hero__content h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

.target-player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  object-fit: contain;
  background: #000;
}

@media (max-width: 767px) {
  header input[type='search'] {
    font-size: 16px;
  }

  .target-player-video {
    max-height: 56vh;
    min-height: 220px;
  }

  .home-hero {
    min-height: 52vh;
    min-height: min(52vh, 480px);
  }

  .home-hero__content h1 {
    font-size: 1.25rem;
    line-height: 1.5;
  }

  .category-filters {
    margin-top: -0.75rem;
  }

  .category-filters select {
    width: 100%;
    max-width: 100%;
  }

  .watch-related__thumb {
    width: 5rem;
  }

  .watch-related__title {
    font-size: 0.75rem;
  }

  .ababseo-fly {
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    transform: scale(0.92);
    transform-origin: left bottom;
  }
}

/* ── ABABSEO 飞行装饰（无胶囊） ── */

.ababseo-fly {
  position: fixed;
  left: max(14px, env(safe-area-inset-left, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  pointer-events: none;
  user-select: none;
}

.ababseo-fly__inner {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  animation: ababseo-drift 4.5s ease-in-out infinite;
}

.ababseo-fly__plane-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  animation: ababseo-fly-path 5s ease-in-out infinite;
}

.ababseo-fly__plane {
  width: 1.4rem;
  height: 1.4rem;
  transform: rotate(-14deg);
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.45));
}

.ababseo-fly__trail {
  position: absolute;
  left: -0.75rem;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.7));
  opacity: 0;
  animation: ababseo-trail 5s ease-in-out infinite;
}

.ababseo-fly__trail {
  width: 0.75rem;
  bottom: 0.35rem;
}

.ababseo-fly__trail--2 {
  width: 0.5rem;
  bottom: 0.65rem;
  left: -0.5rem;
  animation-delay: 0.35s;
}

.ababseo-fly__label {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #a7f3d0 0%, #34d399 45%, #059669 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 2px rgba(5, 150, 105, 0.25));
  animation: ababseo-label-shine 5s ease-in-out infinite;
}

@keyframes ababseo-drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes ababseo-fly-path {
  0%,
  100% {
    transform: translate(0, 0) rotate(-14deg);
  }
  30% {
    transform: translate(3px, -5px) rotate(-8deg);
  }
  60% {
    transform: translate(6px, -2px) rotate(-16deg);
  }
  80% {
    transform: translate(2px, -6px) rotate(-10deg);
  }
}

@keyframes ababseo-trail {
  0%,
  100% {
    opacity: 0;
    transform: translateX(4px) scaleX(0.4);
  }
  30%,
  80% {
    opacity: 0.9;
    transform: translateX(-6px) scaleX(1);
  }
}

@keyframes ababseo-label-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ababseo-fly__inner,
  .ababseo-fly__plane-wrap,
  .ababseo-fly__trail,
  .ababseo-fly__label {
    animation: none;
  }
}

@media print {
  .ababseo-fly,
  .skip-link {
    display: none !important;
  }
}

/* ── 播放页相关推荐侧栏 ── */

.watch-related__item {
  display: flex;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.watch-related__item:hover {
  background-color: #f9fafb;
}

.watch-related__thumb {
  flex-shrink: 0;
  width: 6rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.375rem;
  background: #f3f4f6;
}

.watch-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.watch-related__title {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  color: #111827;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.watch-related__item:hover .watch-related__title {
  color: #16a34a;
}

.watch-related__meta {
  font-size: 0.75rem;
  color: #6b7280;
}
