/* 全集影库网 —— 站点微调 / 移动端 / 缺失 utility 补齐 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html,
body,
#root {
  width: 100%;
  max-width: 100%;
}
body {
  overflow-x: hidden;
  margin: 0;
}

/* 勿对布局内 img/video 强制 height:auto，否则会破坏 aspect-video */
img {
  max-width: 100%;
}
.aspect-video > img,
.aspect-\[16\/9\] > img,
.aspect-video video,
.player-video {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.aspect-video video,
.player-video {
  object-fit: contain;
}

.flex-1 {
  flex: 1 1 auto;
}
.min-h-screen {
  min-height: 100vh;
  min-height: 100dvh;
}
.shrink-0 {
  flex-shrink: 0;
}
.min-w-0 {
  min-width: 0;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 补齐 app.css 可能缺失的响应式类 */
@media (min-width: 640px) {
  .sm\:items-center {
    align-items: center;
  }
  .sm\:justify-between {
    justify-content: space-between;
  }
}
@media (min-width: 768px) {
  .md\:py-24 {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
  .md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .md\:items-center {
    align-items: center;
  }
  .md\:justify-between {
    justify-content: space-between;
  }
}

.group:hover .group-hover\:bg-black\/40 {
  background-color: rgb(0 0 0 / 0.4);
}

@media (min-width: 768px) {
  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

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

/* 播放器控制条 */
.player-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.player-controls__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.player-controls__time {
  font-size: 0.8rem;
  color: #d1d5db;
  white-space: nowrap;
}

/* 播放页 —— 全屏弹层（对齐 huizhunbei.com） */
.play-modal {
  z-index: 60;
}
.play-stage:hover .play-controls-overlay {
  opacity: 1;
}
.play-seo {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.slider {
  background: linear-gradient(
    to right,
    #9333ea 0%,
    #9333ea var(--value, 0%),
    #4b5563 var(--value, 0%),
    #4b5563 100%
  );
}
.slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgb(147, 51, 234);
  cursor: pointer;
  border: 2px solid rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.2) 0 2px 4px;
}
.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgb(147, 51, 234);
  cursor: pointer;
  border: 2px solid rgb(255, 255, 255);
  box-shadow: rgba(0, 0, 0, 0.2) 0 2px 4px;
}
.play-volume-slider {
  min-width: 5rem;
}

/* 登录 / 注册弹窗 —— 不透明实色 */
.auth-modal {
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.75);
}
.auth-modal-card {
  width: 100%;
  max-width: 28rem;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  margin: 0 auto;
  background: #1e1635;
  border: 1px solid #5b3a8c;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.auth-input {
  font-size: 16px;
  box-sizing: border-box;
  width: 100%;
  padding: 0.625rem 1rem 0.625rem 2.5rem;
  background: #111827 !important;
  border: 1px solid #4b5563;
  border-radius: 0.5rem;
  color: #fff;
}
.auth-input::placeholder {
  color: #6b7280;
}
.auth-input:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 1px #9333ea;
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.25rem;
  background: #111827;
  border-radius: 0.75rem;
}
.auth-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.auth-tab:hover {
  color: #fff;
}
.auth-tab--active {
  background: #9333ea;
  color: #fff;
}

@media (max-width: 768px) {
  .site-header-brand .text-xl {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .hero-home {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .hero-home h1 {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
  }
  .hero-home h1 .text-2xl {
    font-size: 1.1rem !important;
  }
  .hero-home .hero-desc {
    font-size: 0.95rem !important;
  }
  .hero-home .p-8 {
    padding: 1rem !important;
  }
  .hero-home .grid-cols-3 {
    gap: 0.75rem !important;
  }

  .video-card-body {
    padding: 0.75rem !important;
  }
  .video-card-body h3 {
    font-size: 0.9rem;
    margin-bottom: 0.35rem !important;
  }
  .video-card-desc,
  .video-card-tags {
    display: none;
  }

  .play-modal {
    padding: 0.75rem !important;
  }
  .play-stage h2 {
    font-size: 0.95rem !important;
  }
  .play-volume-slider {
    width: 4rem !important;
    min-width: 4rem;
  }
  .player-controls__left {
    gap: 0.5rem 0.75rem;
  }
  .player-controls .text-sm {
    font-size: 0.75rem;
  }

  .cat-page {
    padding-top: 1.5rem !important;
  }
  .cat-page-title {
    font-size: 1.65rem !important;
  }
  .cat-page .grid.grid-cols-2 {
    gap: 0.75rem !important;
  }
  .cat-page .grid.grid-cols-2 .text-2xl {
    font-size: 1.35rem !important;
  }

  footer {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .ababseo-mark__plane,
  .ababseo-mark__trail {
    animation: none;
  }
  .hover\:scale-105:hover,
  .group:hover .group-hover\:scale-110 {
    transform: none !important;
  }
}
