/* 好看国产剧 —— 站点微调 / 移动端 / SEO 辅助 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body,
#root {
  width: 100%;
  max-width: 100%;
}
body {
  overflow-x: hidden;
}
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
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;
}

/* 首页排行：浅色背景下的可读样式 */
.ranking-list--light .rank-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ranking-list--light .rank-row:hover {
  background: #fffbeb;
  border-color: #fcd34d;
  transform: translateY(-2px);
}
.ranking-list--light .rank-row em {
  color: #64748b;
}

/* 筛选：无分类时三列 */
.filter-grid--3 {
  grid-template-columns: 2fr 1fr 1fr;
}

/* 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;
  }
}

@media (max-width: 768px) {
  .site-header-brand .text-xl {
    font-size: 1.05rem;
    line-height: 1.2;
  }
  .site-header-brand .text-xs {
    font-size: 0.65rem;
  }
  .site-mark {
    font-size: 1.35rem;
  }
  .menu-toggle {
    min-width: 2.5rem;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-panel.open {
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-panel a {
    padding: 0.55rem 0;
    font-size: 1rem;
  }

  .hero-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .hero-section h1 {
    font-size: 1.75rem !important;
    line-height: 1.25 !important;
  }
  .hero-section .text-lg {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .hero-feature h2 {
    font-size: 1.15rem;
  }
  .hero-section .h-80,
  .hero-section img.h-80 {
    height: 14rem !important;
  }
  .hero-cta {
    gap: 0.65rem !important;
  }
  .hero-cta a {
    flex: 1 1 auto;
    text-align: center;
    min-width: calc(50% - 0.4rem);
    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.75rem !important;
    line-height: 1.25 !important;
  }
  .page-hero .text-lg {
    font-size: 0.95rem;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .section-head h2 {
    font-size: 1.25rem !important;
  }

  .movie-card .p-4 {
    padding: 0.85rem;
  }
  .movie-card h3 {
    font-size: 0.95rem;
  }
  .movie-card img.h-48 {
    height: 10.5rem;
  }
  .movie-card img.h-36 {
    height: 8.5rem;
  }

  .detail-article {
    padding: 1.15rem !important;
    border-radius: 1rem !important;
  }
  .play-hero h1 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }
  .play-hero {
    padding-top: 1.5rem !important;
    padding-bottom: 1.75rem !important;
  }
  .play-actions a {
    flex: 1 1 auto;
    text-align: center;
  }

  .container.px-4 {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .filter-grid,
  .filter-grid--3 {
    grid-template-columns: 1fr;
  }

  .category-cover {
    height: 9.5rem;
  }
  .category-cover span {
    font-size: 1.25rem;
  }

  footer .py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

@media (max-width: 380px) {
  .hero-cta a {
    min-width: 100%;
  }
}

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