@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --gray: #F5F5F5;
  --crimson: #C62828;
  --white: #FFFFFF;
  --purple: #4527A0;
  --sidebar-w: 220px;
}

body.q4-body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background: var(--gray);
  color: #333;
  line-height: 1.6;
}

h1, h2, h3, .q4-display {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.q4-shell {
  min-height: 100vh;
  padding-left: var(--sidebar-w);
  box-sizing: border-box;
}

.q4-sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 2px 0 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.q4-sidebar-logo {
  padding: 20px 16px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

.q4-sidebar-logo a {
  color: var(--crimson);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.q4-sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 12px 0;
  flex: 1;
}

.q4-sidebar-nav li a {
  display: block;
  padding: 12px 20px;
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.q4-sidebar-nav li a:hover {
  background: var(--gray);
  border-left-color: var(--crimson);
  color: var(--crimson);
}

.q4-sidebar-badge {
  margin: 0 16px 12px;
  padding: 8px;
  background: rgba(198,40,40,0.1);
  color: var(--crimson);
  border-radius: 6px;
  font-size: 0.75rem;
  text-align: center;
  font-weight: 700;
}

.q4-sidebar-quick {
  padding: 12px 16px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q4-sidebar-quick a {
  color: #888;
  text-decoration: none;
  font-size: 0.8rem;
}

.q4-shell > #adSwitch {
  max-width: 100%;
  z-index: 1;
}

.q4-content {
  margin-left: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 24px 32px;
}

.q4-leagues-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}

.q4-league-item {
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-width: 72px;
  flex-shrink: 0;
}

.q4-league-item img { width: 44px; height: 44px; object-fit: contain; display: block; margin: 0 auto 4px; }
.q4-league-item span { font-size: 0.75rem; color: #555; font-family: 'Lato', sans-serif; }

.q4-news-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.q4-news-hero {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.q4-news-hero img { width: 100%; height: 260px; object-fit: cover; }

.q4-news-hero-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.q4-news-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q4-news-side a {
  background: var(--white);
  padding: 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 0.9rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.q4-section {
  font-size: 1.2rem;
  color: var(--crimson);
  margin: 24px 0 12px;
}

.q4-body .site-subtitle { color: var(--purple); font-family: 'Lato', sans-serif; font-weight: 400; }
.q4-body .match_filter_item.on a { background: var(--crimson) !important; color: #fff !important; }
.q4-body .info_right.start a { background: var(--purple) !important; color: #fff !important; }

.q4-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.q4-video-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding-bottom: 10px;
  transition: transform 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.q4-video-card:hover { transform: scale(1.03); }
.q4-video-card img { width: 100%; height: 100px; object-fit: cover; background: #ddd; }
.q4-video-card div { padding: 8px 10px 0; font-size: 0.85rem; font-family: 'Lato', sans-serif; }
.q4-video-card span { font-size: 0.75rem; color: #888; }

.q4-players-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.q4-player-chip {
  text-align: center;
  text-decoration: none;
  color: inherit;
  min-width: 80px;
  flex-shrink: 0;
}

.q4-player-chip img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--crimson);
  margin-bottom: 6px;
}

.q4-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.q4-team-cell {
  background: var(--white);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.q4-team-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(198,40,40,0.15);
}

.q4-team-cell img { width: 48px; height: 48px; object-fit: contain; }
.q4-team-cell span { display: block; font-size: 0.78rem; margin-top: 6px; font-family: 'Lato', sans-serif; }

.q4-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  border-radius: 8px;
}

.q4-tags-group a {
  padding: 6px 14px;
  background: rgba(69,39,160,0.08);
  color: var(--purple);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
}

.q4-footer.footer-wrapper {
  margin-left: 0;
  background: var(--crimson);
  color: rgba(255,255,255,0.9);
}

.q4-body > .friend-wrapper,
.q4-body > .footer-wrapper {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  box-sizing: border-box;
}

.q4-footer p, .q4-footer .footer-desc { text-align: center; color: rgba(255,255,255,0.9); }
.q4-footer a { color: #fff; }

.q4-body .container {  max-width: 1200px; }
.q4-body .position { background: var(--gray); }

.q4-body .header { display: none !important; }
.q4-body .second-header { display: none !important; }

.q4-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 24px;
}
.q4-breadcrumb { padding: 12px 0; font-size: 0.85rem; color: #888; font-family: 'Lato', sans-serif; }
.q4-breadcrumb a { color: var(--crimson); text-decoration: none; }

.q4-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  align-items: start;
}

.q4-list-main {
  background: var(--white);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  min-width: 0;
}

.q4-aside-box { background: var(--white); border-radius: 8px; padding: 14px; margin-bottom: 14px; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }
.q4-aside-box h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--crimson); font-family: 'Rajdhani', sans-serif; }
.q4-aside-link { display: block; padding: 7px 0; font-size: 0.82rem; color: #555; text-decoration: none; font-family: 'Lato', sans-serif; border-bottom: 1px solid #f5f5f5; }
.q4-aside-link:hover { color: var(--crimson); }
.q4-aside-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.q4-aside-tags a { padding: 4px 10px; background: rgba(69,39,160,0.08); color: var(--purple); border-radius: 999px; font-size: 0.75rem; text-decoration: none; font-family: 'Lato', sans-serif; }

.q4-detail h1 { margin: 0 0 12px; font-size: 1.35rem; color: #222; font-family: 'Rajdhani', sans-serif; line-height: 1.4; }
.q4-detail-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #999; margin-bottom: 18px; font-family: 'Lato', sans-serif; }
.q4-detail-meta a { color: var(--crimson); text-decoration: none; }
.q4-detail-body { line-height: 1.8; word-break: break-word; font-family: 'Lato', sans-serif; }
.q4-detail-body a { color: var(--crimson); }
.q4-detail-video { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 18px; }
.q4-detail-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.q4-prenext { margin-top: 20px; padding-top: 14px; border-top: 1px solid #eee; display: flex; flex-direction: column; gap: 8px; }
.q4-prenext a { color: #555; text-decoration: none; font-size: 0.88rem; font-family: 'Lato', sans-serif; }

@media (max-width: 900px) {
  .q4-shell {
    padding-left: 0;
  }

  .q4-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .q4-content {
    padding: 0 16px 24px;
  }

  .q4-body > .friend-wrapper,
  .q4-body > .footer-wrapper {
    margin-left: 0;
    width: 100%;
  }

  .q4-news-split { grid-template-columns: 1fr; }
  .q4-video-grid { grid-template-columns: repeat(2, 1fr); }
  .q4-list-layout { grid-template-columns: 1fr; }
}

.q4-body .container.flex-between:has(.ny_leftside) {
  display: grid !important;
  grid-template-columns: 120px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
  float: none !important;
}

.q4-body .container.flex-between:not(:has(.ny_leftside)) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  float: none !important;
}

.q4-body .container.flex-between:has(.ny_leftside) .ny_leftside {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  float: none !important;
}

.q4-body .container.flex-between:has(.ny_leftside) .ny_leftside .all {
  background: var(--crimson);
  width: 100%;
}

.q4-body .container_left,
.q4-body .container_right {
  width: 100% !important;
  float: none !important;
  min-width: 0;
}

.q4-body .container_left .match-item {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.q4-main .match_zhibo_list,
.q4-content > .match_zhibo_list {
  display: block;
}

@media (max-width: 900px) {
  .q4-body .container.flex-between:has(.ny_leftside),
  .q4-body .container.flex-between:not(:has(.ny_leftside)) {
    grid-template-columns: 1fr;
  }
}
