/* glowup.css */
:root {
  --clr-panel: rgba(18, 18, 18, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 1) Prevent the body from scrolling */
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

/* 2) Let only the main-content scroll vertically */
.main-content {
  height: 100vh;
  /* fill the viewport height */
  overflow-y: auto;
  /* enable vertical scrolling */
  display: flex;
  flex-direction: column;
}

/* 3) Ensure the sidebar stays full-height */
.sidebar {
  height: 100vh;
  /* match viewport height */
  overflow-y: auto;
  /* only if you want internal scrolling for many links */
}


body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: var(--fw-regular);
  background: var(--clr-bg);
  color: var(--clr-text);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--clr-accent-light);
}

img,
iframe {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ─── LAYOUT ───────────────────────────────────────────────────────── */
body {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--clr-accent);
  color: var(--clr-bg);
  padding: 0.5rem;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 1rem;
}

.sidebar {
  position: sticky;
  top: 0;
  background: rgba(18, 18, 18, 0.6);
  /* translucent dark “frosted glass” */
  backdrop-filter: blur(10px);
  /* the actual blur effect behind */
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 2rem;
  transition: left var(--transition);
  /* for mobile slide-in */
}

.sidebar a:focus,
.sidebar button:focus {
  outline: 2px dashed var(--clr-accent-light);
  outline-offset: 4px;
}

.main-content {
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--clr-panel);
  backdrop-filter: blur(10px);
}

.topbar__hamburger {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--clr-text);
  cursor: pointer;
  display: none;
}

.search {
  flex: 1;
  display: flex;
  border: 2px solid var(--clr-accent-light);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  transition: width var(--transition);
}

.search input {
  flex: 1;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  color: var(--clr-text);
}

.search button {
  padding: 0 1rem;
  border: none;
  background: var(--clr-accent);
  cursor: pointer;
  transition: background var(--transition);
}

.search button:hover {
  background: var(--clr-accent-light);
}

/* ─── SIDEBAR ───────────────────────────────────────────────────────── */
.sidebar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar__logo img {
  width: 100%;
  max-width: 220px;
}

.sidebar__logo {
  transition: all linear 190ms;
}

.sidebar__logo:hover {
  scale: 1.04;
}

/* Add this to glowup.css, under the .sidebar__close block */
.sidebar__close {
  display: none;
  /* ensure it’s visible */
  background: rgba(255, 255, 255, 0.15);
  /* light frosted circle */
  backdrop-filter: blur(10px);
  /* match the sidebar glass */
  border: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border-radius: 50%;
  color: var(--clr-text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.sidebar__close:hover,
.sidebar__close:focus {
  background: rgba(255, 255, 255, 0.25);
  color: var(--clr-accent);
  transform: scale(1.1);
  outline: none;
}

.sidebar__header {
  position: relative;
}

.sidebar__close {
  position: absolute;
  top: -0.6rem;
  right: -0.8rem;
}


.sidebar__nav ul {
  list-style: none;
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  font-size: 1.07rem;
  padding: 0;
  margin: 0;
}

.sidebar__nav li+li {
  margin-top: 1rem;
}

.sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background var(--transition);
}

.sidebar__nav a:hover {
  background: var(--clr-accent-light);
  color: black;
}

.sidebar__social {
  display: flex;
  gap: 1.7rem;
  justify-content: center;
}

.sidebar__social a {
  font-size: 1.75rem;
  color: var(--clr-text);
  transition: transform var(--transition);
}

.sidebar__social a:hover {
  transform: scale(1.2);
  color: var(--clr-accent);
}

.sidebar__footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.sidebar__footer a:hover {
  text-decoration: underline;
}

/* ─── MAIN ──────────────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.featured,
.videos {
  margin-bottom: 2rem;
}

.featured__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── HORIZONTAL SCROLL WRAPPER ───────────────────────────── */
.featured__wrapper {
  position: relative;
  margin: 1rem 0;
}

/* ─── FORCE FIXED CARD WIDTH IN CAROUSEL ───────────────────── */
.featured__list .game-card {
  /* lock width so cards never shrink */
  flex: 0 0 240px;
  /* no grow, no shrink, basis 240px */
  min-width: 240px;
  /* ensure the same on all cards */
  max-width: 240px;
  /* optional, keeps them uniform */
}


/* force one-row, snap scrolling */
.featured__list {
  display: flex;
  flex-wrap: nowrap;
  /* no wrapping */
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 2rem;
  /* give space for arrows */
}

/* each card snaps into place */
.game-card {
  flex: 0 0 auto;
  /* no flex-grow, no wrap */
  scroll-snap-align: start;
}

/* arrow buttons */
.scroll-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: var(--clr-panel);
  backdrop-filter: blur(10px);
  border: none;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 40%;
  color: var(--clr-text);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.scroll-btn:hover,
.scroll-btn:focus {
  background: var(--clr-accent);
  color: var(--clr-bg);
  transform: translateY(-50%) scale(1.1);
  outline: none;
}

.scroll-btn.prev {
  left: 0.5rem;
}

.scroll-btn.next {
  right: 0.5rem;
}




/* ─── CHANNELS BY GENRE SECTION ───────────────────────────── */
.channels {
  margin-bottom: 2rem;
}

.channels h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.channels__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.channel-card {
  background: var(--clr-darkaccent);
  backdrop-filter: blur(10px);
  border-radius: 0.75rem;
  padding: 1rem 0.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.channel-card img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.channel-card h3 {
  font-size: 0.9rem;
  margin: 0;
  color: var(--clr-text);
}

.channel-card:hover,
.channel-card:focus {
  background: var(--clr-panel);
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  outline: none;
}


.game-card {
  background: var(--clr-panel);
  border-radius: 0.75rem;
  overflow: hidden;
  flex: 1 1 200px;
  max-width: 240px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.game-card__info {
  padding: 0.75rem;
}

.game-card__info h3 {
  margin: 0;
  font-weight: var(--fw-bold);
  font-size: 1rem;
}

.game-card__info p {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  opacity: 0.8;
}

.videos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.video-card {
  background: var(--clr-panel);
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-card iframe {
  aspect-ratio: 16/9;
}

.video-card p {
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

/* ─── PAGINATION ───────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pagination__item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: var(--clr-panel);
  transition: background var(--transition);
}

.pagination__item.is-active,
.pagination__item:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
}

/* ─── FOOTER ───────────────────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 0rem;
  background: --clr-panel;
  font-size: 0.73rem;
}

.site-footer p{
  margin: 0.37rem 0;
}

.site-footer p:hover {
  text-shadow: 0px 0px 7px var(--clr-accent);
}

/* ─── MOBILE ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    width: 70%;
    height: 100%;
    transition: left var(--transition);
    z-index: 1000;
  }

  .sidebar.active {
    left: 0;
  }

  .sidebar__close {
    display: block;
  }

  .topbar__hamburger {
    display: block;
  }

  .site-footer {
    font-size: 0.5rem;
  }
}