/* =========================================================
   Base / Typography
========================================================= */

html {
  box-sizing: border-box;
  font-size: clamp(14px, 1.1vw + 10px, 18px);
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: Verdana, Geneva, sans-serif;
  margin: 0;
  line-height: 1.7;
  text-align: center;
  color: #111;
  background: #fff;
  padding-bottom: 64px; /* prevents sticky bar overlap */
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

h1, h2 {
  margin: 1rem 0 .5rem;
  line-height: 1.25;
}

h1 { font-size: clamp(22px, 2.2vw + 16px, 32px); }
h2 { font-size: clamp(18px, 1.8vw + 14px, 26px); }

p {
  margin: 0 auto 1rem;
  max-width: 80ch;
  padding: 0 1rem;
}

/* =========================================================
   HERO
========================================================= */

.hero-wrap {
  height: auto;
  max-width: min(1100px, 100%);
  margin: 16px auto;
  overflow: hidden;
  border-radius: 6px;
  animation: heroFade 0.9s ease-out;
}

.hero {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.6s ease;
}

.hero:hover {
  transform: scale(1.01);
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Search
========================================================= */

#searchBar {
  margin: 20px auto;
  max-width: 600px;
  width: 90%;
  padding: 10px;
  font-size: 18px;
  border: 1px solid #aaa;
  border-radius: 6px;
  transition: box-shadow 0.2s ease;
}

#searchBar:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.15);
}

/* =========================================================
   Pill Filter (Algeria modern layout)
========================================================= */

.pill-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 25px 0 35px;
  flex-wrap: wrap;
}

.pill {
  border: none;
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  background: #f1f3f5;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  font-size: 14px;
}

.pill:hover {
  background: #e2e6ea;
}

.pill.active {
  background: #0066cc;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,102,204,0.25);
  transform: translateY(-2px);
}

/* =========================================================
   Section Headers (Gray Nth legacy layout)
========================================================= */

.section-header {
  font-size: 24px;
  font-weight: bold;
  text-align: left;
  margin: 40px 0 15px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.section-header:hover {
  background: #f5f7fa;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.section-count {
  font-weight: normal;
  font-size: 18px;
  color: #666;
  margin-left: 6px;
}

/* Section collapse container (Gray Nth) */
.collapsible-content {
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease;
}

.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Subgroups (Gray Nth + optional reuse)
========================================================= */

.subgroup {
  margin-bottom: 40px;
}

.subgroup-header {
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  padding: 10px 12px;
  margin-bottom: 15px;
  background: #f1f3f5;
  border-left: 4px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s ease;
  user-select: none;
}

.subgroup-header:hover {
  background: #e2e6ea;
}

/* Accents if those IDs exist (Gray Nth) */
#leagueGroups .subgroup-header { border-left-color: #0066cc; }
#tournamentGroups .subgroup-header { border-left-color: #c0392b; }
#otherGroups .subgroup-header { border-left-color: #555; }

/* Toggle icon animation support */
.toggle-icon {
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.subgroup-header.expanded .toggle-icon {
  transform: rotate(90deg);
}

/* =========================================================
   Video Grid (works for both pill view + subgroup accordion)
========================================================= */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 20px;

  /* For animated collapse on subgroup grids (Gray Nth) */
  overflow: hidden;
  transition: max-height 0.45s ease, opacity 0.3s ease;
  max-height: 5000px;
}

.video-grid.collapsed {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* =========================================================
   Video Cards
========================================================= */

.video-card-wrapper {
  position: relative;
}

.video-card {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 14px;
  border-radius: 8px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.thumbnail {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* =========================================================
   Video Title
========================================================= */

.video-card h3 {
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.25;
  margin: 8px 0 10px;
  letter-spacing: 0.2px;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;

  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* =========================================================
   Metadata
========================================================= */

.meta {
  font-size: clamp(11px, 0.6vw + 7px, 13px);
  color: #444;
  margin-bottom: 12px;
  line-height: 1.4;
}

.meta div {
  margin: 2px 0;
}

.missing-info {
  color: #c0392b;
  font-weight: 700;
  background: #fdecea;
  padding: 4px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* =========================================================
   Multi Angle Badge
========================================================= */

.thumb-wrapper {
  position: relative;
}

.multi-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #ffcc00, #ff9900);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* =========================================================
   Camera Buttons
========================================================= */

.camera-links-desktop {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.camera-links-desktop span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.camera-links-desktop span:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.camera-links-desktop span:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Camera color differentiation */
.camera-links-desktop span:nth-child(1) { background: #0066cc; } /* XbotGo */
.camera-links-desktop span:nth-child(2) { background: #2e7d32; } /* GoPro */
.camera-links-desktop span:nth-child(3) { background: #6a1b9a; } /* MiniDV */

/* =========================================================
   Scroll Reveal
========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Modal
========================================================= */

#videoModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 30px 0;
}

#modalContent {
  width: 90%;
  max-width: 900px;
  background: #000;
  padding: 10px;
  border-radius: 8px;
}

#modalClose {
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  float: right;
  margin-bottom: 10px;
}

/* =========================================================
   Sticky Tournament Fee Bar (Gray Nth compatibility)
========================================================= */

.sticky-fee-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
}

.sticky-fee-bar span {
  max-width: 260px;
  text-align: center;
}

.sticky-fee-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #fff;
  background: #ffcc00;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sticky-fee-close {
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 50%;
  border: 1px solid #fff;
}

@media (max-width: 600px) {
  .sticky-fee-bar {
    flex-direction: column;
    padding: 10px;
  }
/* =========================================================
   Pill Slider Animation
========================================================= */

.pill-filter {
  position: relative;
}

.pill-slider {
  position: absolute;
  height: 36px;
  background: #0066cc;
  border-radius: 999px;
  top: 0;
  left: 0;
  transition: all 0.35s cubic-bezier(.25,.8,.25,1);
  z-index: 0;
}

.pill {
  position: relative;
  z-index: 1;
  background: transparent;
  color: #333;
}

.pill.active {
  color: #fff;
}
/* =========================================================
   Empty State
========================================================= */

.empty-state {
  margin: 60px 0;
  font-size: 18px;
  color: #666;
  font-weight: 500;
}
}