/* --------------------------------------------------
   ISG BRAND VARIABLES
-------------------------------------------------- */
:root {
  --purple: #6A0DAD;
  --blue: #1E90FF;
  --bg: #0f1115;
  --surface: #121421;
  --text: #e8eaf0;
  --muted: #9aa3b2;

  /* Tab system */
  --isg-blue: #3b82f6;   /* YouTube */
  --isg-purple: #a855f7; /* Twitch */
}

/* --------------------------------------------------
   GLOBAL RESET + BASE
-------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* --------------------------------------------------
   HEADER
-------------------------------------------------- */
.site-header {
  background: linear-gradient(90deg, var(--purple), var(--blue));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-weight: 800;
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 0.3px;
}

.nav a {
  color: #fff;
  margin-left: 1rem;
  font-weight: 600;
}
.nav a.active {
  text-decoration: underline;
}

/* --------------------------------------------------
   HERO
-------------------------------------------------- */
.hero {
  background:
    radial-gradient(1000px 400px at 20% 0%, rgba(106,13,173,0.3), transparent),
    radial-gradient(1000px 400px at 80% 0%, rgba(30,144,255,0.3), transparent);
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 0.5rem;
}

.hero p {
  color: var(--muted);
  margin: 0 auto 1.5rem;
  max-width: 680px;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-weight: 700;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-secondary {
  background: var(--purple);
  color: #fff;
  margin-left: 0.5rem;
}

/* --------------------------------------------------
   MODAL
-------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  padding: 2rem;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-content iframe {
  width: 100%;
  height: 70vh;
  border: 0;
  border-radius: 10px;
}

.custom-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--purple);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.custom-close:hover {
  background: var(--blue);
}

/* --------------------------------------------------
   VIDEO GRID + CARDS
-------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.video-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.video-card img {
  width: 100%;
  display: block;
}

.video-card h3 {
  font-size: 1rem;
  margin: 0.6rem 0 0.3rem;
  color: var(--text);
}

.video-card::after {
  content: "Click to watch video";
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* --------------------------------------------------
   TAB SYSTEM — CLEAN + CONSOLIDATED
-------------------------------------------------- */
.video-tabs {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  gap: 10px;
}

/* Base tab button */
.tab-button {
  padding: 10px 20px;
  font-size: 1.1rem;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
  overflow: visible;
}

/* Remove old conflicting active/hover rules */
.tab-button.active,
.tab-button:hover {
  background: inherit;
  border-color: inherit;
  box-shadow: inherit;
}

/* YouTube active */
.tab-button.active-youtube {
  background: var(--isg-blue);
  color: white;
}

/* Twitch active */
.tab-button.active-twitch {
  background: var(--isg-purple);
  color: white;
}

/* Hover colors */
.tab-button[data-tab="youtube"]:hover {
  background: var(--isg-blue);
  color: white;
}

.tab-button[data-tab="twitch"]:hover {
  background: var(--isg-purple);
  color: white;
}

/* Pulse animation for Twitch */
@keyframes pulsePurple {
  0% { box-shadow: 0 0 6px rgba(168, 85, 247, 0.6); }
  50% { box-shadow: 0 0 14px rgba(168, 85, 247, 1); }
  100% { box-shadow: 0 0 6px rgba(168, 85, 247, 0.6); }
}

.tab-button.active-twitch {
  animation: pulsePurple 2s infinite ease-in-out;
  animation-fill-mode: both;
}

/* Pulse animation for YT */
@keyframes pulseBlue {
  0% { box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }
  50% { box-shadow: 0 0 14px rgba(59, 130, 246, 1); }
  100% { box-shadow: 0 0 6px rgba(59, 130, 246, 0.6); }
}

.tab-button.active-youtube {
  background: var(--isg-blue);
  color: white;
  animation: pulseBlue 2s infinite ease-in-out;
  animation-fill-mode: both;
}


/* --------------------------------------------------
   VIDEO SECTIONS
-------------------------------------------------- */
.video-section {
  display: none;
}

.video-section.active {
  display: block;
}

/* --------------------------------------------------
   FEATURED EMBED ROW
-------------------------------------------------- */
.embed-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: stretch;
}

.embed-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-height: 360px;
}

.embed-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  color: var(--text);
}

.embed-card iframe {
  flex-grow: 1;
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 520px;
}

/* --------------------------------------------------
   LOAD MORE BUTTONS
-------------------------------------------------- */
.pagination {
  text-align: center;
  margin: 20px 0;
}

#loadMoreBtn,
#loadMoreTwitchBtn {
  padding: 12px 24px;
  font-size: 1.1rem;
  background-color: #0073e6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#loadMoreBtn:hover,
#loadMoreTwitchBtn:hover {
  background-color: #005bb5;
}

/* --------------------------------------------------
   SCROLL TO TOP BUTTON
-------------------------------------------------- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 20px;
  font-size: 1.2rem;
  background-color: #0073e6;
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, transform 0.2s ease;
  z-index: 1000;
}

.scroll-top:hover {
  background-color: #005bb5;
  transform: scale(1.05);
}

/* --------------------------------------------------
   RESPONSIVE TWEAKS
-------------------------------------------------- */
@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    display: grid;
    grid-auto-flow: column;
    gap: 0.5rem;
    overflow-x: auto;
  }
}

/* --------------------------------------------------
   LATEST VIDEO BLOCK
-------------------------------------------------- */
.latest-video {
  margin-top: 1.5rem;
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.latest-video h3 {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
  display: none;
  margin-bottom: 0.75rem;
}

.latest-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}

/* --------------------------------------------------
   FOOTER
-------------------------------------------------- */
.site-footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------
   FINAL CLEANUP
-------------------------------------------------- */

/* Remove any leftover legacy tab styles */
.tab-button.active {
  background: inherit;
  border-color: inherit;
  box-shadow: inherit;
}

/* Ensure tab glow is visible */
.tab-button {
  overflow: visible;
}

/* Ensure modal stays above all UI */
.modal {
  z-index: 1000;
}

/* Ensure grids never collapse */
.video-grid img {
  display: block;
}
