/* ============================================================
   好看视频 - Main Stylesheet
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --red:        #f40;           /* primary accent */
  --red-dark:   #d93600;
  --red-light:  rgba(255,68,0,.08);
  --bg:         #f4f4f4;
  --header-bg:  #fff;
  --card-bg:    #fff;
  --text-1:     #1a1a1a;
  --text-2:     #555;
  --text-3:     #999;
  --border:     #e8e8e8;
  --shadow-xs:  0 1px 3px rgba(0,0,0,.07);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.09);
  --shadow-md:  0 6px 20px rgba(0,0,0,.12);
  --radius-sm:  6px;
  --radius:     10px;
  --header-h:   58px;
  --catnav-h:   46px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; line-height: 1; }
ul, ol { list-style: none; }
input { font-family: inherit; }

/* ── Layout container ────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--header-bg);
  box-shadow: var(--shadow-xs);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  user-select: none;
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--red);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.logo:hover .logo-icon { background: var(--red-dark); }
.logo-img {
  display: block;
  height: 32px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  font-size: 19px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .5px;
  white-space: nowrap;
}

/* Search */
.search-form {
  flex: 1;
  max-width: 580px;
}
.search-wrap {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  background: #fafafa;
}
.search-wrap:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255,68,0,.1);
  background: #fff;
}
.search-input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
  color: var(--text-1);
}
.search-input::placeholder { color: var(--text-3); }
.search-btn {
  width: 46px;
  height: 38px;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
  border-radius: 0 22px 22px 0;
}
.search-btn:hover { background: var(--red-dark); }

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-download {
  display: inline-block;
  padding: 6px 18px;
  background: var(--red);
  border: none;
  border-radius: 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-download:hover {
  background: var(--red-dark);
  color: #fff;
}

/* ============================================================
   CATEGORY NAV
   ============================================================ */
.cat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 199;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.cat-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 16px;
  display: flex;
  align-items: flex-start;
}
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 0;
}
.cat-link {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 18px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 500;
  transition: all .18s;
}
.cat-link:hover {
  color: var(--red);
  background: var(--red-light);
}
.cat-link.active {
  color: var(--red);
  background: var(--red-light);
  font-weight: 700;
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  min-height: calc(100vh - var(--header-h) - 140px);
  outline: none;
}

/* ============================================================
   VIDEO GRID
   ============================================================ */
.video-section { padding-top: 4px; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================
   VIDEO CARD
   ============================================================ */
.video-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .22s ease, box-shadow .22s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card-thumb-link { display: block; }
.card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.video-card:hover .card-thumb img { transform: scale(1.06); }
.card-duration {
  position: absolute;
  bottom: 7px;
  right: 7px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  letter-spacing: .3px;
  pointer-events: none;
}
.card-info { padding: 10px 12px 13px; }
.card-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-1);
}
.card-title a:hover { color: var(--red); }
.card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.meta-dot { color: #d0d0d0; }
.card-cat {
  color: var(--red);
  font-weight: 500;
  transition: opacity .2s;
}
.card-cat:hover { opacity: .75; }

/* ============================================================
   VIDEO DETAIL PAGE
   ============================================================ */
.video-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  padding-top: 16px;
}
.video-main { min-width: 0; }

/* Player */
.player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.player-aspect {
  position: relative;
  padding-bottom: 56.25%;
}
.player-inner {
  position: absolute;
  inset: 0;
}
.player-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.28);
  cursor: pointer;
  transition: background .2s;
}
.play-overlay:hover { background: rgba(0,0,0,.38); }
.play-overlay:focus { outline: 3px solid var(--red); outline-offset: -3px; }
.play-btn-big {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,.93);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  transition: transform .2s, background .2s;
}
.play-overlay:hover .play-btn-big {
  transform: scale(1.1);
  background: #fff;
}

/* Video info */
.video-info { padding: 16px 0; }
.video-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-1);
}
.video-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 14px;
}
.video-stats svg { vertical-align: middle; margin-right: 3px; }
.stat-sep { color: #d0d0d0; }
.stat-cat { color: var(--red); font-weight: 500; }
.stat-cat:hover { text-decoration: underline; }

/* Actions */
.video-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: #f2f2f2;
  transition: all .18s;
}
.action-btn:hover {
  background: var(--red-light);
  color: var(--red);
}
.action-btn.active {
  background: var(--red-light);
  color: var(--red);
}

/* Description */
.video-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}
.episode-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.ep-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
  transition: all .15s;
}
.ep-btn:hover, .ep-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}
.video-content {
  margin-top: 24px;
  font-size: 15px;
  color: var(--text-1);
  line-height: 1.8;
}
.video-content h1,.video-content h2,.video-content h3 {
  margin: 1em 0 .5em;
  font-weight: 600;
}
.video-content p { margin: .75em 0; }
.video-content img { max-width: 100%; border-radius: 6px; }
.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  padding: 4px 12px;
  background: var(--red-light);
  color: var(--red);
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 500;
  transition: background .2s;
}
.tag:hover { background: rgba(255,68,0,.16); }

/* Sidebar */
.video-sidebar {}
.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--red);
  color: var(--text-1);
}
.related-list { display: flex; flex-direction: column; gap: 14px; }
.related-item { display: flex; gap: 10px; }
.related-thumb-link { flex-shrink: 0; }
.related-thumb {
  position: relative;
  width: 128px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}
.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.related-item:hover .related-thumb img { transform: scale(1.05); }
.related-info { flex: 1; min-width: 0; }
.related-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.42;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-1);
}
.related-title a:hover { color: var(--red); }
.related-meta {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
}
.empty-tip { font-size: 13px; color: var(--text-3); }

/* ============================================================
   CATEGORY / SEARCH PAGES
   ============================================================ */
.page-header { margin-bottom: 20px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.breadcrumb a:hover { color: var(--red); }
.breadcrumb-sep { color: #ccc; font-size: 15px; }
.page-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-1);
}
.page-sub { font-size: 13px; color: var(--text-3); }
.page-sub strong { color: var(--red); }

.search-header { margin-bottom: 20px; }
.search-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}
.search-kw { color: var(--red); }
.search-count {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 8px;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 54px; margin-bottom: 18px; }
.empty-state h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
}
.empty-state p { font-size: 14px; color: var(--text-3); margin-bottom: 20px; }
.btn-back {
  display: inline-block;
  padding: 9px 24px;
  background: var(--red);
  color: #fff;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 500;
  transition: background .2s;
}
.btn-back:hover { background: var(--red-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 28px 16px 24px;
  text-align: center;
  margin-top: 40px;
}
.footer-inner { max-width: 1280px; margin: 0 auto; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
  margin-bottom: 14px;
}
.footer-nav a {
  font-size: 13px;
  color: var(--text-3);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--red); }
.footer-icp, .footer-copy {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  line-height: 1.7;
}

/* ============================================================
   RESPONSIVE – Tablet  ≤ 1080px
   ============================================================ */
@media (max-width: 1080px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   RESPONSIVE – Small Tablet  ≤ 860px
   ============================================================ */
@media (max-width: 860px) {
  .video-page {
    grid-template-columns: 1fr;
  }
  .video-sidebar {
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
  .related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .related-item { flex-direction: column; }
  .related-thumb { width: 100%; }
}

/* ============================================================
   RESPONSIVE – Mobile  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .btn-download { display: none; }
  .video-title { font-size: 17px; }
  .play-btn-big { width: 54px; height: 54px; }
}

/* ============================================================
   RESPONSIVE – Small Mobile  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 17px; }
  .related-list { grid-template-columns: 1fr; }
  .related-item { flex-direction: row; }
  .related-thumb { width: 120px; }
  .video-actions { flex-wrap: wrap; gap: 6px; }
  .container { padding: 12px 12px 32px; }
}

/* ============================================================
   DOC PAGES（关于/协议/隐私/反馈）
   ============================================================ */
.doc-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 0 48px;
}
.doc-title {
  font-size: 26px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--text-1);
}
.doc-subtitle {
  font-size: 14px;
  color: var(--text-3);
  margin-bottom: 24px;
}
.doc-update {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
}
.doc-body {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  padding: 32px 36px;
}
.doc-notice {
  background: var(--red-light);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.6;
}
.doc-section {
  margin-bottom: 28px;
}
.doc-section:last-child { margin-bottom: 0; }
.doc-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.doc-section p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 10px;
}
.doc-section p:last-child { margin-bottom: 0; }
.doc-list {
  list-style: none;
  padding: 0;
}
.doc-list li {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.8;
  padding: 4px 0 4px 18px;
  position: relative;
}
.doc-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--red);
  font-weight: 700;
}

/* 关于我们 - 联系方式 */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 4px;
}
.contact-item {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.contact-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.contact-value {
  font-size: 14px;
  color: var(--text-1);
  font-weight: 500;
}

/* 意见反馈 - 表单 */
.feedback-form { margin-bottom: 36px; }
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr; }
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.required { color: var(--red); margin-left: 2px; }
.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: #fafafa;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-light);
  background: #fff;
}
.form-textarea { resize: vertical; line-height: 1.6; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-actions { margin-top: 8px; }
.btn-submit {
  padding: 10px 32px;
  background: var(--red);
  color: #fff;
  border-radius: 22px;
  font-size: 15px;
  font-weight: 600;
  transition: background .2s, transform .15s;
}
.btn-submit:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-submit:active { transform: none; }
.feedback-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: #f0faf4;
  border: 1.5px solid #52c41a;
  border-radius: var(--radius-sm);
  color: #389e0d;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 32px;
}

/* 意见反馈 - 其他联系方式 */
.feedback-channels h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.channel-list { display: flex; flex-direction: column; gap: 10px; }
.channel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.channel-icon { font-size: 20px; flex-shrink: 0; }
.channel-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.channel-desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }

@media (max-width: 600px) {
  .doc-body { padding: 20px 16px; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGINATION
   ============================================================ */

/* PC numbered pagination — hidden on mobile */
.pagination-pc {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 32px 0 8px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-1);
  font-size: 14px;
  transition: border-color .15s, background .15s, color .15s;
}
.page-btn:hover {
  border-color: var(--red);
  color: var(--red);
}
.page-btn.page-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 600;
  pointer-events: none;
}
.page-gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  color: var(--text-3);
  font-size: 14px;
  letter-spacing: .05em;
}

/* Mobile load-more — hidden on PC */
.loadmore-wrap {
  display: none;
  justify-content: center;
  margin: 28px 0 8px;
}
.btn-loadmore {
  padding: 10px 40px;
  border-radius: 999px;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.btn-loadmore:hover { background: var(--red); color: #fff; }
.btn-loadmore:disabled {
  opacity: .5;
  pointer-events: none;
}
.btn-loadmore.loading::after {
  content: "…";
}
.no-more {
  color: var(--text-3);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 768px) {
  .pagination-pc  { display: none; }
  .loadmore-wrap  { display: flex; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .header, .cat-nav, .footer, .video-actions, .btn-follow { display: none; }
  .video-page { grid-template-columns: 1fr; }
  .player-wrap { display: none; }
}
