/* 超清国产在线永久 —— 站点微调 / 移动端 / SEO 辅助 */

/* 补齐目标站 app.css 未打进包的 Tailwind 响应式类（页脚/播放页会用到） */
@media (min-width: 768px) {
  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .md\:justify-between {
    justify-content: space-between;
  }
  .md\:space-y-0 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(0px * var(--tw-space-y-reverse));
  }
}
@media (min-width: 1024px) {
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.max-h-\[70vh\] {
  max-height: 70vh;
}

/* 首页 Hero 按钮组 —— 桌面横排、移动端纵排（原规则缺少基础 display:flex，导致布局靠 <a> 默认 inline 侥幸排列） */
.hero-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* 页脚四栏 —— 不依赖可能缺失的 utility */
.site-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body,
#root {
  width: 100%;
  max-width: 100%;
}
body {
  overflow-x: hidden;
}
img,
video {
  max-width: 100%;
  height: auto;
}

.flex-1 {
  flex: 1 1 auto;
}
.min-h-screen {
  min-height: 100vh;
  min-height: 100dvh;
}
.flex-col {
  flex-direction: column;
}
.min-w-0 {
  min-width: 0;
}
.shrink-0 {
  flex-shrink: 0;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* 播放器 */
.player-box {
  position: relative;
  width: 100%;
  background: #000;
}
.player-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* 移动端菜单 */
.mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.mobile-panel.open {
  max-height: min(80vh, 36rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.category-chip-scroll {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-chip-scroll::-webkit-scrollbar {
  display: none;
}

/* ABABSEO —— 无胶囊、无链接、会飞 */
.ababseo-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  user-select: none;
}
.ababseo-mark__plane {
  position: relative;
  display: inline-flex;
  color: #f59e0b;
  animation: ababseo-fly 3.6s ease-in-out infinite;
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.45));
}
.ababseo-mark__trail {
  position: absolute;
  right: 100%;
  top: 50%;
  width: 18px;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(to left, rgba(245, 158, 11, 0.85), transparent);
  animation: ababseo-trail 3.6s ease-in-out infinite;
}
.ababseo-mark__text {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #f59e0b, #f97316, #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@keyframes ababseo-fly {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(3px, -4px) rotate(-6deg);
  }
  50% {
    transform: translate(7px, 0) rotate(0deg);
  }
  75% {
    transform: translate(3px, 4px) rotate(6deg);
  }
}
@keyframes ababseo-trail {
  0%,
  100% {
    opacity: 0.25;
    width: 10px;
  }
  50% {
    opacity: 0.95;
    width: 22px;
  }
}

/* blob anim (home decorative) */
@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}
.animate-blob {
  animation: blob 7s infinite;
}
.animation-delay-2000 {
  animation-delay: 2s;
}
.animation-delay-4000 {
  animation-delay: 4s;
}

/* custom player range */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
}

@media (max-width: 768px) {
  .site-header-brand {
    max-width: calc(100% - 3rem);
  }
  .site-header-brand .text-xl {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .menu-toggle {
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-panel a {
    font-size: 0.95rem;
  }
  .mobile-cat-grid a {
    padding: 0.45rem 0.5rem;
  }

  .hero-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .hero-section h1 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
    word-break: break-word;
  }
  .hero-section .text-xl {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .hero-cta {
    flex-direction: column !important;
    gap: 0.65rem !important;
  }
  .hero-cta a {
    flex: 1 1 auto;
    text-align: center;
    width: 100%;
    padding: 0.7rem 1rem !important;
    font-size: 0.9rem;
  }

  .page-hero {
    padding-top: 2.25rem !important;
    padding-bottom: 2.25rem !important;
  }
  .page-hero h1 {
    font-size: 1.55rem !important;
    line-height: 1.3 !important;
    word-break: break-word;
  }

  .play-hero {
    padding-left: 0;
    padding-right: 0;
  }
  .play-hero > .max-w-7xl {
    padding-top: 1rem !important;
    padding-bottom: 1.5rem !important;
  }
  .play-hero h1 {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    word-break: break-word;
  }
  .detail-article {
    padding: 1rem !important;
  }
  .breadcrumbs {
    flex-wrap: wrap;
    row-gap: 0.25rem;
  }

  [data-movie-grid] {
    gap: 0.75rem;
  }
  .video-card-body {
    padding: 0.75rem !important;
  }
  .video-card-body h3 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem !important;
  }
  .video-card-body > p {
    display: none;
  }
  .video-card-meta {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.35rem;
  }
  .video-card-tags {
    display: none;
  }

  footer .py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

@media (max-width: 380px) {
  .site-header-brand .text-xl {
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ababseo-mark__plane,
  .ababseo-mark__trail {
    animation: none;
  }
}
