:root {
  --clr-bg: #ffffff;
  --clr-surface: #fafafa;
  --clr-border: #e0e0e0;
  --clr-text: #212121;
  --clr-muted: #757575;
  --clr-primary: #e91e63;
  --clr-primary-hover: #c2185b;
  --radius-md: 16px;
  --radius-pill: 999px;
  --gap: clamp(1rem, 2vw, 1.5rem);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

/* ---------- Header ---------- */
header#top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--clr-border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--clr-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.nav-main a {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  color: var(--clr-muted);
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-main a:hover {
  color: var(--clr-primary);
  background: var(--clr-surface);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--clr-border);
  border-radius: 10px;
  background: var(--clr-bg);
  color: var(--clr-text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.menu-btn:hover {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

/* ---------- Container & Layout ---------- */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gap);
}

.layout-three {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.sidebar-left,
.sidebar-right {
  position: sticky;
  top: 80px;
  height: fit-content;
}

/* ---------- Sidebar Left ---------- */
.sidebar-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sidebar-card h3 {
  font-size: 14px;
  color: var(--clr-text);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr-border);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-list a {
  display: block;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--clr-muted);
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.category-list a:hover {
  color: var(--clr-primary);
  background: var(--clr-bg);
}

/* ---------- Main Content ---------- */
.main-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ---------- Hero ---------- */
.hero-banner {
  background: linear-gradient(135deg, #e91e63 0%, #f06292 100%);
  border-radius: 16px;
  padding: 3rem 2rem;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: center;
  animation: fadeUp 0.6s ease both;
}

.hero-text h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.hero-text p {
  margin: 0 0 1.5rem;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  background: #fff;
  color: var(--clr-primary);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn-hero svg {
  flex-shrink: 0;
}

.hero-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Section ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-title {
  font-size: 19px;
  position: relative;
  padding-left: 14px;
  letter-spacing: 0.5px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--clr-primary);
}

.section-more {
  font-size: 13px;
  color: var(--clr-muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.section-more:hover {
  color: var(--clr-primary);
}

/* ---------- Video Grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.video-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: fadeUp 0.5s ease both;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 30, 99, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--clr-surface);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  border-radius: 4px;
  padding: 4px 8px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.duration-badge svg {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.video-info {
  padding: 12px 14px 14px;
}

.video-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.9em;
  min-height: 2.9em;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--clr-text);
  transition: color 0.2s ease;
}

.video-card:hover .video-title {
  color: var(--clr-primary);
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.uploader-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--clr-surface);
}

.uploader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.uploader-info {
  min-width: 0;
  flex: 1;
}

.uploader-name {
  font-size: 12.5px;
  color: var(--clr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--clr-muted);
}

.video-stats span {
  white-space: nowrap;
}

/* ---------- Live Grid ---------- */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}

.live-card {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.live-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233, 30, 99, 0.35);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.live-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--clr-surface);
}

.live-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.live-card:hover .live-thumb img {
  transform: scale(1.05);
}

.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--clr-primary);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.2;
  border-radius: 4px;
  padding: 4px 8px;
}

.live-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.4s ease-in-out infinite;
}

.online-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11.5px;
  line-height: 1.2;
  border-radius: 4px;
  padding: 4px 8px;
  font-variant-numeric: tabular-nums;
}

.live-info {
  padding: 12px 14px 14px;
}

.live-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 2.9em;
  min-height: 2.9em;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--clr-text);
  transition: color 0.2s ease;
}

.live-card:hover .live-title {
  color: var(--clr-primary);
}

.live-host {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--clr-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- News List ---------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.news-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--clr-border);
  transition: background-color 0.2s ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--clr-bg);
}

.news-item time {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 2px;
}

.news-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--clr-muted);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item.open {
  border-color: rgba(233, 30, 99, 0.4);
}

.faq-q {
  position: relative;
  padding: 14px 46px 14px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--clr-text);
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-q:hover {
  color: var(--clr-primary);
}

.faq-q::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--clr-primary);
  background: var(--clr-surface);
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.faq-item.open .faq-q::after {
  transform: translateY(-50%) rotate(45deg);
  background: var(--clr-primary);
  color: #fff;
}

.faq-a {
  display: none;
  padding: 0 16px 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--clr-muted);
}

.faq-item.open .faq-a {
  display: block;
}

/* ---------- About ---------- */
.about-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-text p {
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--clr-muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag {
  display: inline-block;
  padding: 5px 14px;
  font-size: 12.5px;
  color: var(--clr-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-pill);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.tag:hover {
  color: var(--clr-primary);
  border-color: var(--clr-primary);
  background: rgba(233, 30, 99, 0.06);
}

/* ---------- Sidebar Right ---------- */
.sidebar-title {
  font-size: 15px;
  margin-bottom: 0.75rem;
  padding-left: 12px;
  position: relative;
}

.sidebar-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--clr-primary);
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 0.75rem;
}

.tab-btn {
  flex: 1;
  padding: 7px 4px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--clr-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tab-btn:hover {
  color: var(--clr-primary);
  border-color: var(--clr-primary);
}

.tab-btn.active {
  color: #fff;
  background: var(--clr-primary);
  border-color: var(--clr-primary);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.rank-item:hover {
  background: var(--clr-surface);
}

.rank-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  border-radius: 6px;
  background: var(--clr-surface);
  color: var(--clr-muted);
  font-variant-numeric: tabular-nums;
}

.rank-item:nth-child(-n+3) .rank-num {
  background: var(--clr-primary);
  color: #fff;
}

.rank-link {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.rank-item:hover .rank-link {
  color: var(--clr-primary);
}

.rank-value {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--clr-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 2rem;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 2.5rem 0 1.5rem;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

.footer-title {
  font-size: 14px;
  margin-bottom: 0.75rem;
  color: var(--clr-text);
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-list a {
  font-size: 13px;
  color: var(--clr-muted);
  transition: color 0.2s ease;
}

.footer-list a:hover {
  color: var(--clr-primary);
}

.friend-links {
  max-width: 1440px;
  margin: 1.75rem auto 0;
  padding: 1.25rem var(--gap) 0;
  border-top: 1px solid var(--clr-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12.5px;
}

.friend-links-label {
  color: var(--clr-text);
  font-weight: 600;
}

.friend-links a {
  color: var(--clr-muted);
  transition: color 0.2s ease;
}

.friend-links a:hover {
  color: var(--clr-primary);
}

.footer-bottom {
  max-width: 1440px;
  margin: 1.25rem auto 0;
  padding: 1rem var(--gap) 0;
  border-top: 1px solid var(--clr-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: var(--clr-muted);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .layout-three {
    grid-template-columns: 1fr 280px;
  }

  .sidebar-left {
    display: none;
  }

  .hero-banner {
    grid-template-columns: 1fr 260px;
    padding: 2.5rem 1.75rem;
  }
}

@media (max-width: 768px) {
  .layout-three {
    grid-template-columns: 1fr;
  }

  .sidebar-right {
    display: none;
  }

  .nav-main {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .header-inner {
    height: 56px;
  }

  .hero-banner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem 1.25rem;
  }

  .hero-thumb {
    order: -1;
  }

  .hero-text p {
    font-size: 13.5px;
    margin-bottom: 1.25rem;
  }

  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .video-title {
    font-size: 13px;
  }

  .video-info {
    padding: 10px 10px 12px;
  }

  .live-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .section-title {
    font-size: 17px;
  }

  .news-item {
    flex-direction: column;
    gap: 4px;
    padding: 0.875rem 1rem;
  }

  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .video-grid,
  .live-grid {
    gap: 0.625rem;
  }

  .video-meta {
    gap: 8px;
  }

  .video-stats {
    gap: 6px;
    font-size: 11px;
  }
}