/*
Theme Name: Funny Video Grid
Theme URI: https://example.com
Author: You
Description: Simple video grid homepage theme. Add a Featured Image + paste an embed code (iframe) into the post content, publish, and it appears automatically on the homepage grid. Click a thumbnail to open the video's own page.
Version: 1.5
Requires at least: 5.8
Requires PHP: 7.4
*/

* {
  box-sizing: border-box;
}

:root {
  --card-accent: #2ecc71;
  --card-accent-rgb: 46, 204, 113;
  --page-bg: #16171c;
  --header-bg: #293334;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--page-bg);
  color: #eaeaea;
}

/* ---------- HEADER: centered logo + top-right search ---------- */
.site-header {
  border-bottom: 1px solid #1a2222;
  background: var(--header-bg);
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  height: 70px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  max-width: 70%;
  margin: 0 auto;
}

.site-logo {
  display: block;
  height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.site-logo-text {
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-search-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #eaeaea;
  cursor: pointer;
  transition: background 0.15s ease;
}

.site-search-toggle:hover,
.site-search-toggle:focus-visible {
  background: #1e1e1e;
  outline: none;
}

.site-search-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 12px;
}

.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border-radius: 10px;
  padding: 6px 10px;
}

.site-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: #eaeaea;
  font-size: 14px;
  padding: 6px 2px;
}

.site-search-input:focus {
  outline: none;
}

.site-search-input::placeholder {
  color: #8a8a8a;
}

.site-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #9a9a9a;
  padding: 4px;
  cursor: pointer;
}

.site-search-submit:hover {
  color: #fff;
}

/* ---------- MAIN NAV BUTTONS (4 fixed, colored) ---------- */
.nav-buttons {
  background: var(--page-bg);
  padding: 16px 16px 4px;
}

.nav-buttons-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--nav-btn-color, #2ecc71);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  text-align: center;
  padding: 15px 12px;
  border-radius: 28px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  transition: filter 0.15s ease, transform 0.15s ease;
}

.nav-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.nav-btn-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-btn-icon-img {
  display: inline-block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.nav-btn-label {
  line-height: 1.2;
}

@media (max-width: 480px) {
  .nav-buttons {
    padding: 12px 12px 2px;
  }

  .nav-buttons-grid {
    gap: 8px;
  }

  .nav-btn {
    font-size: 12.5px;
    padding: 13px 10px;
    border-radius: 24px;
  }

  .nav-btn-icon-img {
    width: 17px;
    height: 17px;
  }
}

/* ---------- CATEGORY BUTTON NAV ---------- */
.cat-pills {
  background: var(--page-bg);
  border-bottom: 1px solid #24252c;
  padding-bottom: 6px;
}

.cat-pills-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px;
}

.cat-pills-scroll::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: 8px;
  background: #c92a2a;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.cat-pill:hover {
  background: #e03131;
  color: #fff;
}

.cat-pill.is-active {
  background: #eaeaea;
  color: #16171c;
}

@media (max-width: 480px) {
  .site-header-inner {
    height: 60px;
    padding: 0 12px;
  }

  .site-logo {
    height: 38px;
  }

  .site-logo-text {
    font-size: 21px;
  }

  .site-search-toggle {
    right: 12px;
    width: 34px;
    height: 34px;
  }

  .cat-pills-scroll {
    padding: 8px 12px;
    gap: 6px;
  }

  .cat-pill {
    padding: 7px 14px;
    font-size: 12px;
  }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 12px 60px;
}

/* ---------- TRENDING VIDEOS HEADING ---------- */
.trending-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
  padding: 10px 16px;
  background: linear-gradient(90deg, rgba(224, 49, 49, 0.16), rgba(224, 49, 49, 0));
  border-left: 3px solid #e03131;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ---------- GRID: 2 videos per row ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

.video-card {
  /* Per-card overrides come in via inline style="--card-glow-*"; these are the fallbacks. */
  --card-glow-rgb: var(--card-accent-rgb);
  --card-glow-intensity: 0.35;
  --card-glow-blur: 14px;
  --card-radius: 10px;

  display: block;
  text-decoration: none;
  color: inherit;
  background: #1c1d24;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid rgba(var(--card-glow-rgb), calc(var(--card-glow-intensity) * 0.75 + 0.08));
  box-shadow: 0 0 var(--card-glow-blur) rgba(var(--card-glow-rgb), var(--card-glow-intensity));
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--card-glow-rgb), calc(var(--card-glow-intensity) * 1.1 + 0.15));
  box-shadow: 0 0 calc(var(--card-glow-blur) * 1.5) rgba(var(--card-glow-rgb), calc(var(--card-glow-intensity) * 1.4));
}

/* Per-card "force off" — used when a Match Box has glow disabled */
.video-card.video-card--flat {
  border-color: #262626;
  box-shadow: none;
}

.video-card.video-card--flat:hover {
  border-color: #333;
  box-shadow: none;
}

.thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 14;
  background: #000;
  overflow: hidden;
}

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--card-accent, #2ecc71);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.4;
}

.card-rank {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  background: #ffb700;
  color: #16171c;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

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

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a; /* lighter than the page background so a card with no image is still visible, not a black void */
  color: #4a4a4a;
}

/* Play button overlay */
.thumb-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M8 5v14l11-7z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  pointer-events: none;
}

.video-info {
  /* Per-card overrides come in via inline style="--title-*/--desc-*"; these are the fallbacks. */
  --title-color: #ffffff;
  --title-size: 15px;
  --desc-color: #9a9a9a;
  --desc-size: 13px;

  position: relative;
  padding: 10px 12px 13px;
  text-align: left;
}

/* Thin accent line that echoes the card's own glow color, tying image + text together */
.video-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--card-glow-rgb, var(--card-accent-rgb)), 0.65), rgba(var(--card-glow-rgb, var(--card-accent-rgb)), 0));
}

.video-card--flat .video-info::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.video-info .v-title {
  font-size: var(--title-size);
  color: var(--title-color);
  font-weight: 700;
  letter-spacing: 0.1px;
  margin: 0 0 5px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.video-info .v-title-image {
  display: block;
  margin: 0 0 6px;
  line-height: 0;
}

.video-info .v-title-image img {
  width: var(--title-img-width, 100%);
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 4px;
}

.video-info .v-desc {
  font-size: var(--desc-size);
  color: var(--desc-color);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* ---------- SINGLE VIDEO PAGE ---------- */
.single-video-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 14px 60px;
}

.player-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.player-embed iframe,
.player-embed video,
.player-embed embed {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.single-title {
  font-size: 20px;
  margin: 0 0 8px;
}

.single-desc {
  font-size: 14px;
  color: #c7c7c7;
  line-height: 1.6;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: #9a9a9a;
  text-decoration: none;
  font-size: 13px;
}

.back-link:hover {
  color: #fff;
}

.load-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.load-more-wrap a {
  display: inline-block;
  padding: 10px 22px;
  background: #262626;
  color: #fff;
  border-radius: 24px;
  text-decoration: none;
  font-size: 13px;
}

/* ---------- PROMO BANNER ---------- */
.promo-banner-wrap {
  position: relative;
  max-width: 900px;
  margin: 12px auto 0;
  padding: 0 16px;
}

.promo-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.10), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--promo-accent, #2ecc71);
  border-radius: 16px;
  padding: 16px 54px 16px 20px;
  text-decoration: none;
  color: inherit;
}

a.promo-banner {
  cursor: pointer;
}

.promo-content {
  flex: 1;
  min-width: 0;
}

.promo-title {
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  line-height: 1.3;
}

.promo-ribbon-badge {
  flex: 0 0 auto;
  background: var(--promo-accent, #2ecc71);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
  line-height: 1;
}

.promo-icon {
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.promo-icon-image img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.promo-title-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.promo-accent {
  color: var(--promo-accent, #2ecc71);
}

.promo-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: #b8b8b8;
  line-height: 1.5;
}

.promo-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--promo-accent, #2ecc71);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #333;
  background: rgba(0, 0, 0, 0.45);
  color: #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.promo-close:hover {
  background: #1e1e1e;
  color: #fff;
}

@media (max-width: 480px) {
  .promo-banner-wrap {
    padding: 0 12px;
    margin-top: 10px;
  }

  .promo-banner {
    gap: 12px;
    padding: 14px 46px 14px 16px;
  }

  .promo-ribbon-badge {
    font-size: 9px;
    padding: 3px 7px;
  }

  .promo-title-text {
    font-size: 13.5px;
  }

  .promo-icon {
    font-size: 15px;
  }

  .promo-subtitle {
    font-size: 11.5px;
  }

  .promo-arrow {
    width: 30px;
    height: 30px;
  }

  .promo-close {
    width: 22px;
    height: 22px;
    top: 8px;
    right: 8px;
  }
}
.watch-guide {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 20px 14px;
  border-bottom: 1px solid #222;
  background: #161616;
}

.watch-guide-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.watch-guide-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #b8b8b8;
}

.watch-guide-steps li {
  margin-bottom: 2px;
}

/* ---------- BELOW-GRID PARAGRAPH ("below-info" card) ---------- */
.below-info {
  --below-accent-rgb: 46, 204, 113;

  position: relative;
  margin-top: 32px;
  border-radius: 16px;
  border: 1px solid rgba(var(--below-accent-rgb), 0.25);
  background:
    radial-gradient(120px 120px at calc(100% + 20px) -20px, rgba(var(--below-accent-rgb), 0.28), transparent 70%),
    linear-gradient(160deg, rgba(var(--below-accent-rgb), 0.08), rgba(255, 255, 255, 0.015));
  overflow: hidden;
}

.below-info-inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
}

.below-info-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--below-accent-rgb), 0.16);
  border: 1px solid rgba(var(--below-accent-rgb), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

.below-info-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}

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

.below-info-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.35;
}

.below-info-body {
  color: #c2c2c2;
  font-size: 13.5px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.below-info-body p {
  margin: 0 0 12px;
}

.below-info-body p:last-child {
  margin-bottom: 0;
}

.below-info-body h1,
.below-info-body h2,
.below-info-body h3 {
  color: #fff;
  margin: 18px 0 8px;
}

.below-info-body h1:first-child,
.below-info-body h2:first-child,
.below-info-body h3:first-child {
  margin-top: 0;
}

.below-info-body a {
  color: rgb(var(--below-accent-rgb));
}

@media (max-width: 480px) {
  .below-info {
    margin-top: 24px;
    border-radius: 14px;
  }

  .below-info-inner {
    padding: 16px;
    gap: 10px;
  }

  .below-info-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
  }

  .below-info-icon img {
    width: 18px;
    height: 18px;
  }

  .below-info-title {
    font-size: 15px;
  }

  .below-info-body {
    font-size: 13px;
  }
}

/* ---------- BELOW-GRID SEO WIDGET AREA (Appearance → Widgets) ---------- */
.below-grid {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #222;
  color: #b8b8b8;
  font-size: 13px;
  line-height: 1.7;
}

.below-grid + .below-grid,
.below-info + .below-grid {
  border-top: none;
  padding-top: 0;
  margin-top: 20px;
}

.below-grid p {
  margin: 0 0 12px;
}

.below-grid p:last-child {
  margin-bottom: 0;
}

.below-grid h1,
.below-grid h2,
.below-grid h3 {
  color: #fff;
}

.below-grid-title {
  font-size: 16px;
  margin: 0 0 10px;
}

.below-grid-widget {
  margin-bottom: 18px;
}

/* ---------- STATIC PAGES (About Us, etc.) ---------- */
.page-content-wrap {
  max-width: 700px;
  margin: 0 auto;
  color: #c7c7c7;
}

.page-title {
  font-size: 22px;
  color: #fff;
  margin: 0 0 14px;
}

.page-body {
  font-size: 14px;
  line-height: 1.7;
}

.page-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ---------- HEADER: menu icon, right-side buttons ---------- */
.site-header-inner {
  justify-content: space-between;
}

.site-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #eaeaea;
  cursor: pointer;
  flex: 0 0 auto;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  background: #1e1e1e;
  outline: none;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  padding: 8px 16px;
  border-radius: 8px;
  background: #e03131;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.header-btn:hover {
  background: #c92a2a;
}

.site-search-toggle {
  position: static;
  transform: none;
}

.site-menu-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 4px 16px 14px;
  border-bottom: 1px solid #222;
}

.site-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-menu-list a {
  display: block;
  padding: 10px 8px;
  color: #eaeaea;
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
}

.site-menu-list a:hover {
  background: #1a1a1a;
}

@media (max-width: 480px) {
  .header-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }
}

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid #222;
  background: var(--page-bg); /* matches body -- previously a slightly different near-black shade, which read as a stray color band */
  margin-top: 24px;
}

.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 16px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  max-width: 420px;
}

.footer-brand .site-logo,
.footer-logo {
  height: 28px;
  width: auto;
  display: block;
  margin-bottom: 10px;
}

.footer-brand .site-logo-text {
  display: block;
  margin-bottom: 10px;
}

.footer-description {
  color: #9a9a9a;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #cfcfcf;
  transition: background 0.15s ease, color 0.15s ease;
}

.footer-social-icon:hover {
  background: var(--card-accent, #2ecc71);
  color: #0f0f0f;
}

.footer-links {
  max-width: 500px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-content: flex-start;
}

.footer-links a {
  display: inline-block;
  color: #cfcfcf;
  font-size: 14px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copyright {
  border-top: 1px solid #1a1a1a;
  padding: 14px 16px;
  max-width: 900px;
  margin: 0 auto;
  color: #8a8a8a;
  font-size: 13px;
  text-align: center;
}

@media (max-width: 480px) {
  .site-footer-inner {
    flex-direction: column;
    padding: 22px 12px 14px;
  }
}

/* ---------- POPUP / ANNOUNCEMENT ---------- */
.site-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.site-popup {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #161616;
  border: 1px solid #262626;
  border-radius: 14px;
  padding: 24px 20px 20px;
  text-align: center;
}

.site-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: #262626;
  color: #eaeaea;
  cursor: pointer;
}

.site-popup-close:hover {
  background: #333;
}

.site-popup-image {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 14px;
}

.site-popup-text {
  color: #eaeaea;
  font-size: 14px;
  line-height: 1.6;
}

.site-popup-text p:last-child {
  margin-bottom: 0;
}

.site-popup-button {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--card-accent, #2ecc71);
  color: #0f0f0f;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
}

.site-popup-button:hover {
  opacity: 0.9;
}

/* ---------- View count: small, non-layout-changing card overlay ---------- */
.video-card .thumb-wrap { position: relative; }
.cc-view-count {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
@media (max-width: 480px) {
  .cc-view-count { left: 7px; bottom: 7px; font-size: 10px; padding: 3px 6px; }
}


/* ---------- Natural, polished video-site styling ---------- */
body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; letter-spacing: 0; }
.site-header { background:#202426; border-bottom:1px solid #303437; }
.site-header-inner { max-width:980px; height:74px; padding:0 18px; }
.site-logo { height:48px; }
.site-logo-text { font-size:24px; font-weight:750; letter-spacing:-.2px; }
.site-search-toggle, .site-menu-toggle { width:38px; height:38px; }
.site-search-toggle:hover, .site-menu-toggle:hover { background:#303437; }

.nav-buttons { padding:14px 16px 6px; }
.nav-buttons-grid { max-width:980px; gap:8px; }
.nav-btn { min-height:44px; padding:11px 14px; border-radius:8px; font-size:12px; font-weight:700; letter-spacing:.25px; box-shadow:none; transition:filter .15s ease, background .15s ease; }
.nav-btn:hover { transform:none; filter:brightness(1.06); }

.cat-pills { border-bottom:1px solid #292d30; }
.cat-pills-scroll { max-width:980px; justify-content:flex-start; padding:9px 16px 11px; gap:7px; }
.cat-pill { padding:7px 12px; border-radius:6px; font-size:11px; font-weight:700; letter-spacing:.2px; }

.container { max-width:980px; padding:22px 16px 52px; }
.trending-heading { margin:0 0 14px; padding:0 0 9px 11px; background:none; border-left:3px solid #e03131; border-radius:0; font-size:15px; font-weight:750; letter-spacing:.1px; text-transform:none; }
.video-grid { gap:18px 14px; }
.video-card { border-radius:8px; background:#202226; border-color:rgba(var(--card-glow-rgb), .18); box-shadow:0 3px 12px rgba(0,0,0,.16); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.video-card { min-width:0; }
.video-info { min-width:0; }
.video-info .v-title, .video-info .v-desc { overflow-wrap:anywhere; }
.video-card:hover { transform:translateY(-2px); box-shadow:0 7px 18px rgba(0,0,0,.22); border-color:rgba(var(--card-glow-rgb), .35); }
.video-card.video-card--flat { border-color:#2b2e32; box-shadow:0 3px 12px rgba(0,0,0,.13); }
.thumb-wrap { aspect-ratio:9/13; }
.thumb-wrap::after { width:42px; height:42px; background-color:rgba(0,0,0,.55); background-size:18px; }
.card-badge, .card-rank { top:9px; padding:4px 7px; border-radius:4px; font-size:9px; font-weight:750; letter-spacing:.35px; box-shadow:none; }
.card-badge { left:9px; }
.card-rank { right:9px; }
.cc-view-count { left:9px; bottom:9px; padding:4px 6px; border-radius:5px; background:rgba(12,13,14,.72); font-size:10px; font-weight:600; backdrop-filter:blur(3px); }
.video-info { padding:10px 11px 12px; }
.video-info::before { display:none; }
.video-info .v-title { margin:0 0 4px; font-size:14px; line-height:1.3; font-weight:700; letter-spacing:-.05px; }
.video-info .v-desc { font-size:12px; line-height:1.45; color:#a8adb1; }

.load-more-wrap { margin-top:26px; }
.load-more-wrap a { padding:9px 18px; border-radius:7px; background:#2b2e32; font-size:12px; font-weight:650; box-shadow:none; }
.load-more-wrap a:hover { background:#35393d; }

.promo-banner-wrap { margin-top:12px; }
.promo-banner { gap:13px; border-radius:9px; padding:13px 46px 13px 15px; box-shadow:none; }
.promo-title-text { font-size:14px; font-weight:700; }
.promo-subtitle { font-size:12px; }
.promo-arrow { width:30px; height:30px; border-radius:7px; }

.watch-guide { max-width:980px; padding:11px 18px 12px; background:#1b1e20; border-bottom:1px solid #292d30; }
.watch-guide-title { font-size:11px; letter-spacing:.25px; }
.watch-guide-steps { font-size:12px; line-height:1.55; }

.below-info { margin-top:28px; border-radius:9px; }
.below-info-inner { padding:17px 18px; gap:12px; }
.below-info-title { font-size:15px; margin-bottom:6px; }
.below-info-body { font-size:12.5px; line-height:1.65; }

.site-footer { margin-top:18px; background:#1b1e20; border-top:1px solid #303437; }
.site-footer-inner { max-width:980px; padding:30px 18px 24px; gap:28px; }
.footer-brand { max-width:460px; }
.footer-brand .site-logo, .footer-logo { height:30px; margin-bottom:12px; }
.footer-description { margin:0 0 14px; color:#9da3a7; font-size:12.5px; line-height:1.65; }
.footer-social { gap:7px; }
.footer-social-icon { width:31px; height:31px; border-radius:7px; background:#25292c; }
.footer-links { gap:8px 18px; align-content:flex-start; }
.footer-links a { color:#b8bdc0; font-size:12.5px; font-weight:550; }
.footer-links a:hover { color:#fff; text-decoration:none; }
.footer-copyright { max-width:980px; padding:13px 18px 16px; color:#747b80; font-size:11.5px; }

.header-buttons { gap:6px; }
.header-btn { padding:7px 11px; border-radius:6px; font-size:10.5px; font-weight:700; letter-spacing:.15px; box-shadow:none; }
.header-btn:hover { background:#d42e2e; }

@media (max-width:600px) {
  .site-header-inner { height:62px; padding:0 12px; }
  .site-logo { height:39px; }
  .site-logo-text { font-size:20px; }
  .nav-buttons { padding:11px 12px 5px; }
  .nav-buttons-grid { gap:7px; }
  .nav-btn { min-height:40px; padding:9px 8px; font-size:10.5px; letter-spacing:.1px; }
  .cat-pills-scroll { padding:8px 12px 9px; }
  .cat-pill { padding:6px 10px; font-size:10.5px; }
  .container { padding:18px 10px 42px; }
  .video-grid { gap:12px 9px; }
  .video-card { border-radius:7px; }
  .thumb-wrap { aspect-ratio:9/13; }
  .video-info { padding:8px 9px 10px; }
  .video-info .v-title { font-size:12.5px; line-height:1.28; }
  .video-info .v-desc { font-size:10.5px; line-height:1.4; }
  .cc-view-count { left:7px; bottom:7px; font-size:9px; padding:3px 5px; }
  .card-badge, .card-rank { top:7px; font-size:8px; padding:3px 6px; }
  .card-badge { left:7px; } .card-rank { right:7px; }
  .trending-heading { margin-bottom:11px; font-size:14px; }
  .site-footer-inner { padding:24px 14px 18px; gap:20px; }
  .footer-links { gap:8px 14px; }
  .footer-links a { font-size:12px; }
}

/* =========================================================
   FRONT-END POLISH — screenshot-matched spacing/typography
   Keeps the existing markup, card system and controls intact.
   ========================================================= */
:root {
  --page-bg: #232323;
  --header-bg: #263231;
}

html { background: var(--page-bg); }
body {
  background: var(--page-bg);
  color: #f4f4f4;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Header: compact, centered and balanced like the reference. */
.site-header { background: #263231; border-bottom: 1px solid #34403f; }
.site-header-inner {
  max-width: 980px;
  height: 68px;
  padding: 0 18px;
}
.site-logo-link { max-width: 64%; }
.site-logo { height: 45px; }
.site-logo-text {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.site-search-toggle,
.site-menu-toggle {
  width: 40px;
  height: 40px;
  color: #fff;
}
.site-search-toggle:hover,
.site-menu-toggle:hover,
.site-search-toggle:focus-visible,
.site-menu-toggle:focus-visible { background: rgba(255,255,255,.07); }

/* Four primary action buttons: large touch targets, centered text, no awkward wraps. */
.nav-buttons { padding: 14px 16px 8px; background: #232323; }
.nav-buttons-grid {
  max-width: 570px;
  gap: 8px;
}
.nav-btn {
  min-height: 62px;
  padding: 12px 12px;
  border-radius: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .1px;
  line-height: 1.15;
  text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(0,0,0,.16);
  white-space: normal;
}
.nav-btn-label { line-height: 1.15; }
.nav-btn-icon { font-size: 17px; }
.nav-btn-icon-img { width: 21px; height: 21px; }
.nav-btn:hover { transform: none; filter: brightness(1.05); }

/* Category controls: compact pill buttons with predictable wrapping. */
.cat-pills {
  background: #232323;
  border-bottom: 0;
}
.cat-pills-scroll {
  max-width: 620px;
  padding: 8px 16px 12px;
  gap: 8px;
  justify-content: center;
}
.cat-pill {
  padding: 11px 17px;
  min-height: 42px;
  border-radius: 7px;
  background: #ef073e;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05px;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
}
.cat-pill:hover { background: #f51b4c; }
.cat-pill.is-active { background: #fff; color: #222; }

/* Main content/card area: preserve the 2-column card architecture. */
.container {
  max-width: 640px;
  padding: 22px 12px 54px;
}
.trending-heading {
  margin: 0 0 16px;
  padding: 10px 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid #484848;
  border-left: 3px solid #d7a900;
  border-radius: 12px;
  background: #2c2c2c;
  color: #f7f7f7;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .05px;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.video-grid { gap: 16px 12px; }
.video-card {
  background: #202020;
  border-radius: 9px;
  border-color: rgba(var(--card-glow-rgb), .15);
  box-shadow: 0 3px 12px rgba(0,0,0,.2);
}
.thumb-wrap { aspect-ratio: 9 / 13; }
.thumb-wrap::after {
  width: 44px;
  height: 44px;
  background-color: rgba(0,0,0,.56);
  background-size: 19px;
}
.card-badge,
.card-rank {
  top: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}
.cc-view-count {
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(0,0,0,.70);
  font-size: 10px;
  font-weight: 600;
}
.video-info { padding: 10px 10px 12px; }
.video-info .v-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}
.video-info .v-desc { font-size: 12px; line-height: 1.45; }

/* Keep the surrounding modules visually quiet so the cards remain the focus. */
.load-more-wrap { margin-top: 24px; }
.load-more-wrap a {
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 12px;
}

@media (max-width: 600px) {
  .site-header-inner { height: 64px; padding: 0 12px; }
  .site-logo { height: 39px; }
  .site-logo-text { font-size: 20px; }
  .site-logo-link { max-width: 62%; }
  .site-search-toggle,
  .site-menu-toggle { width: 38px; height: 38px; }

  .nav-buttons { padding: 12px 12px 7px; }
  .nav-buttons-grid { max-width: 570px; gap: 8px; }
  .nav-btn {
    min-height: 62px;
    padding: 10px 8px;
    border-radius: 17px;
    font-size: 14px;
  }
  .nav-btn-icon-img { width: 20px; height: 20px; }

  .cat-pills-scroll {
    max-width: 620px;
    padding: 8px 12px 12px;
    gap: 8px;
  }
  .cat-pill {
    min-height: 40px;
    padding: 10px 15px;
    font-size: 12px;
    border-radius: 7px;
  }

  .container { max-width: 640px; padding: 18px 12px 42px; }
  .trending-heading {
    min-height: 46px;
    margin-bottom: 14px;
    padding: 9px 12px;
    font-size: 15px;
    border-radius: 11px;
  }
  .video-grid { gap: 14px 10px; }
  .video-card { border-radius: 8px; }
  .thumb-wrap { aspect-ratio: 9 / 13; }
  .video-info { padding: 8px 8px 10px; }
  .video-info .v-title { font-size: 12.5px; }
  .video-info .v-desc { font-size: 10.5px; }
  .cc-view-count { left: 7px; bottom: 7px; font-size: 9px; padding: 3px 5px; }
}


/* =========================================================
   HEADER REFINEMENT — MEME-STREAM STYLE
   Matches the supplied reference: wide dark teal header,
   centered logo, boxed hamburger left, large search right.
   ========================================================= */

.site-header {
  background: #263332 !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 2px 10px rgba(0,0,0,.20);
}

.site-header-inner {
  width: 100%;
  max-width: none;
  height: 112px;
  padding: 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 70%;
  margin: 0;
  z-index: 1;
}

.site-logo {
  height: 72px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.site-header-right {
  margin-left: auto;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.site-menu-toggle {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 2px solid rgba(190,205,205,.42);
  border-radius: 8px;
  background: rgba(20,28,28,.20);
  color: #d8dddd;
}

.site-menu-toggle svg {
  width: 34px;
  height: 34px;
}

.site-menu-toggle:hover,
.site-menu-toggle:focus-visible {
  background: rgba(255,255,255,.07);
  border-color: rgba(210,220,220,.65);
}

.site-search-toggle {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  color: #f2f4f4;
  background: transparent;
}

.site-search-toggle svg {
  width: 42px;
  height: 42px;
}

.site-search-toggle:hover,
.site-search-toggle:focus-visible {
  background: rgba(255,255,255,.07);
}

.site-search-panel {
  max-width: none;
  padding: 0 44px 18px;
  background: #263332;
}

.site-search-form {
  max-width: 900px;
  margin: 0 auto;
}

.site-menu-panel {
  max-width: none;
  padding: 8px 44px 18px;
  background: #263332;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

@media (max-width: 700px) {
  .site-header-inner {
    height: 82px;
    padding: 0 14px;
  }

  .site-logo {
    height: 50px;
  }

  .site-logo-link {
    max-width: 64%;
  }

  .site-menu-toggle {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 7px;
  }

  .site-menu-toggle svg {
    width: 28px;
    height: 28px;
  }

  .site-header-right {
    gap: 5px;
  }

  .site-search-toggle {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .site-search-toggle svg {
    width: 34px;
    height: 34px;
  }

  .site-search-panel {
    padding: 0 14px 12px;
  }

  .site-menu-panel {
    padding: 6px 14px 14px;
  }
}


/* Footer alignment: center all footer content and links */
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer-brand {
  width: 100%;
  max-width: 700px;
  text-align: center;
}
.footer-links {
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.footer-copyright {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
