:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --text: #17191c;
  --muted: #616a73;
  --line: #d8dde3;
  --accent: #c23b4b;
  --accent-dark: #8d2734;
  --soft: #eef3f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.site-header {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}

.banner-ad {
  background: #17191c;
  padding: 12px 20px;
}

.banner-ad a {
  align-items: center;
  background: linear-gradient(90deg, var(--accent-dark), #17191c);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 64px;
  padding: 12px 18px;
  text-align: center;
  text-decoration: none;
}

.banner-ad span {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  text-transform: uppercase;
}

.banner-ad strong {
  font-size: 20px;
  line-height: 1.2;
}

.banner-ad em {
  color: #ffd9df;
  font-style: normal;
  font-weight: 700;
}

.brand {
  color: var(--accent-dark);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.nav a,
.tag,
.category-link,
.pagination a,
.pagination span {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  padding: 7px 10px;
  text-decoration: none;
}

.category-link {
  color: var(--accent-dark);
  display: inline-flex;
  font-weight: 700;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 20px 48px;
}

.hero {
  display: grid;
  gap: 12px;
  padding: 22px 0 30px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 36px;
  line-height: 1.12;
  margin-bottom: 8px;
}

h2 {
  font-size: 24px;
}

.hero p,
.section-heading p,
.listing-header p,
.video-hero p,
.video-card p {
  color: var(--muted);
}

section {
  margin-top: 28px;
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.category-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.subcategory-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.keyword-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.subcategory-card,
.keyword-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 142px;
  padding: 16px;
  text-decoration: none;
}

.category-card strong,
.subcategory-card strong,
.keyword-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.category-card span,
.subcategory-card span,
.keyword-card span {
  color: var(--accent-dark);
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p,
.subcategory-card p,
.keyword-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.video-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.thumb {
  aspect-ratio: 16 / 9;
  background: var(--soft);
  display: block;
  overflow: hidden;
}

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

.video-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.video-card h3 {
  font-size: 18px;
  line-height: 1.28;
  margin-bottom: 0;
}

.video-card h3 a {
  text-decoration: none;
}

.video-card p {
  font-size: 14px;
  margin-bottom: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  background: #fbfbfc;
  color: var(--muted);
  padding: 5px 8px;
}

.listing-header,
.video-hero {
  max-width: 780px;
}

.player-shell {
  aspect-ratio: 16 / 9;
  background: #101214;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
}

.player-shell iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.video-meta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 16px;
}

.video-meta div {
  padding: 14px;
}

.video-meta dt {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.video-meta dd {
  font-weight: 700;
  margin: 0;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.pagination span {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin: 0 auto;
  max-width: 1180px;
  padding: 26px 20px 36px;
}

@media (max-width: 900px) {
  .site-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .subcategory-grid,
  .keyword-grid,
  .video-grid,
  .video-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 28px;
  }

  .category-grid,
  .subcategory-grid,
  .keyword-grid,
  .video-grid,
  .video-meta {
    grid-template-columns: 1fr;
  }

  .banner-ad a {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }
}
