/* ----------------------------------------------------------
   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: 40px;
}

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

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

h1 { font-size: clamp(24px, 2.5vw + 16px, 36px); }
h2 { font-size: clamp(18px, 1.8vw + 14px, 26px); }

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

/* ----------------------------------------------------------
   Hero Gradient Header (NEW)
---------------------------------------------------------- */

.hero-wrap {
  height: clamp(200px, 30vh, 380px);
  max-width: min(1100px, 100%);
  margin: 16px auto 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-gradient {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  text-align: center;
  padding: 20px;
}

.hero-text h1 {
  font-size: clamp(28px, 3vw + 14px, 42px);
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.hero-text h2 {
  font-size: clamp(18px, 2vw + 10px, 26px);
  font-weight: 400;
  opacity: 0.9;
}

/* ----------------------------------------------------------
   Search
---------------------------------------------------------- */

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

/* ----------------------------------------------------------
   Section Headers
---------------------------------------------------------- */

.section-header {
  font-size: 24px;
  font-weight: bold;
  text-align: left;
  margin: 40px 0 15px;
  cursor: pointer;
}

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

.collapsible-content {
  overflow: hidden;
  transition: max-height .4s ease, opacity .3s ease;
}

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

/* ----------------------------------------------------------
   Subgroup Styling
---------------------------------------------------------- */

.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;
}

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

#leagueGroups .subgroup-header {
  border-left-color: #0066cc;
}

#tournamentGroups .subgroup-header {
  border-left-color: #c0392b;
}

#otherGroups .subgroup-header {
  border-left-color: #555;
}

/* ----------------------------------------------------------
   Video Grid & Cards
---------------------------------------------------------- */

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

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

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

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.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;
}

/* ----------------------------------------------------------
   Camera Links
---------------------------------------------------------- */

.camera-links-desktop {
  margin-top: 12px;
  font-size: 14px;
}

.camera-links-desktop span {
  color: #0066cc;
  cursor: pointer;
  text-decoration: underline;
  display: block;
  margin: 3px 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;
}

#timestampContainer {
  background: #fff;
  color: #111;
  padding: 15px;
  margin-top: 10px;
  border-radius: 6px;
  text-align: left;
}

.timestamp-item {
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
}

.timestamp-item:hover {
  text-decoration: underline;
}