/* Stream details two-column layout */
.stream-details-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.stream-details-left {
  min-width: 0;
}
.stream-details-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.stream-details-right .club-link {
  display: block;
}
.stream-details-right .channel-avatar-img {
  /* keep original aspect ratio, limit dimensions instead of forcing width/height */
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}
.stream-details-right .club-name-right {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 900px) {
  .stream-details-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .stream-details-right .channel-avatar-img {
    max-width: 72px;
    max-height: 72px;
    width: auto;
    height: auto;
  }
  .stream-details-right .club-name-right {
    font-size: 16px;
  }
}
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;700&display=swap');

:root {
  --bg: #131417;
  --bg-2: #1a1c21;
  --panel: #23262d;
  --panel-offset: #1d2026;
  --line: #3b3f47;
  --text: #f1f4fa;
  --muted: #a8afb9;
  --accent: #EC1C24;
  --accent-2: #0048ff;
  --accent-3: #ffd400;
  --danger: #b50000;
  --warning: #ff9f0a;
  --card-width: 230px;
  --card-gap: 14px;
  --cards-max-columns: 8;
}

* {
  box-sizing: border-box;
  border-radius: 0 !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--bg);
}

/* Ensure the app container fills the viewport and uses column flex layout
   so the footer is pinned to the bottom when content is short. */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--bg-2);
  border-bottom: 2px solid var(--accent);
  flex-wrap: wrap;
}

.logo {
  font-size: 20px;
  font-weight: 100;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-transform: uppercase;
}

.logo-image {
  height: 34px;
  display: inline-block;
  vertical-align: middle;
}

.footer-logo {
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

/* Combined logo unit: icon + text image */
.logo-unit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  height: 26px;
  display: inline-block;
  vertical-align: middle;
}

/* Slightly reduce spacing on small screens */
@media (max-width: 840px) {
  .logo-image { height: 30px; }
  .logo-text { height: 22px; }
  .logo-unit { gap: 8px; }
}

.nav-links,
.nav-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a,
.nav-actions .muted {
  color: #f3f3f3;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
  padding: 6px 6px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  will-change: opacity;
  transition: opacity 360ms cubic-bezier(0.2, 0, 0, 1);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  opacity: 1;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: #2a2f37;
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 12px;
  font-weight: 400;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  border-color: var(--accent);
}

.button.accent {
  background: var(--accent);
  border-color: transparent;
  color: #ffffff;
}

/* Navbar-specific button hover: fade the accent behind the label (no size change). */
.nav-actions .button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.nav-actions .button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--accent);
  opacity: 0;
  z-index: 0;
  transition: opacity 420ms cubic-bezier(0.2, 0, 0, 1);
}

.nav-actions .button .btn-label {
  position: relative;
  z-index: 1;
}

.nav-actions .button:hover::before,
.nav-actions .button:focus::before {
  opacity: 1;
}

.language-toggle {
  min-width: auto;
  padding: 0;
  font-weight: 400;
  border: none;
  background: transparent;
  color: #f3f3f3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus {
  color: var(--accent);
  outline: none;
}

.button.success {
  background: #1f8f3a;
  border-color: #0f4d1f;
  color: #ffffff;
}

.button.danger {
  background: var(--danger);
  border-color: #5c0000;
  color: #ffffff;
}

.button:disabled,
.button[disabled] {
  background: #3a3f48;
  border-color: #4a5059;
  color: #939aa5;
  cursor: not-allowed;
  transform: none !important;
  opacity: 0.85;
}

.button.is-loading {
  position: relative;
}

.button.is-loading::before {
  content: '';
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50% !important;
  animation: button-spin 0.75s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

main {
  padding: 24px 28px 36px;
  flex: 1 1 auto;
}

.section {
  margin-bottom: 22px;
  background: var(--panel-offset);
  border: none;
  padding: 18px 28px;
  width: calc(100% + 56px);
  margin-left: -28px;
  margin-right: -28px;
}

.section h2 {
  margin: 0 0 12px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), var(--card-width)));
  gap: var(--card-gap);
  justify-content: start;
  align-items: stretch;
  width: 100%;
  max-width: calc(var(--cards-max-columns) * var(--card-width) + (var(--cards-max-columns) - 1) * var(--card-gap));
}

.cards-grid-8 {
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), var(--card-width)));
  align-items: stretch;
  justify-content: start;
  width: 100%;
  max-width: calc(var(--cards-max-columns) * var(--card-width) + (var(--cards-max-columns) - 1) * var(--card-gap));
}

.cards > .card,
.cards-grid-8 > .card {
  width: var(--card-width);
  max-width: var(--card-width);
}

.cards-two-rows {
  max-height: none;
  overflow: visible;
}

@media (max-width: 1900px) {
  .cards-grid-8 {
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), var(--card-width)));
  }
}

@media (max-width: 1500px) {
  .cards-grid-8 {
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), var(--card-width)));
  }
}

@media (max-width: 1120px) {
  .cards,
  .cards-grid-8 {
    max-width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(200px, 200px));
  }

  .cards > .card,
  .cards-grid-8 > .card {
    width: 200px;
    max-width: 200px;
  }
}

.card {
  padding: 10px;
  background: var(--panel);
  border: none;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 160px;
  width: 100%;
  max-width: 100%;
}

.card::before {
  content: none;
}

.hero {
  padding: 12px 0 18px;
  background: var(--panel-offset);
  border: none;
  display: grid;
  gap: 18px;
  /* make the image area wider by giving the right column more space */
  grid-template-columns: 1fr 1.9fr;
  /* fixed pixel height so hero doesn't shrink when zooming out */
  height: 720px;
  min-height: 720px;
  max-height: 720px;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}

.home-hero .hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#view > .home-hero:first-child {
  margin-top: -24px;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.home-hero .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms ease;
}

.home-hero .hero-video.is-visible {
  opacity: 1;
}

.home-hero .hero-video.is-finished {
  opacity: 1;
}

.home-hero > * {
  position: relative;
  z-index: 3;
}

/* Compact title-style section used on pages that are not the big hero (home/club pages).
   This restores the original smaller heading appearance and prevents the tall hero sizing. */
.section.section-title {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 18px 28px;
  align-items: start;
  background-size: auto;
  background-position: left top;
  background-repeat: no-repeat;
}

/* Small inner title block for pages that previously used an inner .hero div (login panel, etc.) */
.title-hero {
  padding: 12px 0;
}

/* Left content: large title + status + CTAs -- vertically centered */
.hero .hero-left {
  padding: 20px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .hero-left h1 {
  margin: 4px 0 10px 0;
  font-size: 64px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 1;
}

.hero .hero-left .hero-status-row { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.hero .hero-left .hero-status-row .live-badge { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; background:var(--accent); color:#fff; border-radius:18px; font-weight:700; font-size:13px; }
.hero .hero-left .hero-status-row .duration { color:var(--muted); font-size:13px; }

.hero .hero-left .hero-ctas { display:flex; gap:14px; margin-top:18px; align-items:center; }
.hero .button.buy,
.hero .button.more,
.hero .button.open {
  padding: 16px 32px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 16px;
}
.hero .button.buy,
.hero .button.open {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 26px rgba(236,28,36,0.16);
}
.hero .button.more {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}

.hero-topline { display:flex; gap:12px; align-items:center; margin-bottom:6px; }
.hero-topline .hero-next { text-transform:uppercase; font-weight:700; color:var(--muted); letter-spacing:0.12em; font-size:12px; }
.hero-datetime { color:var(--muted); font-size:14px; margin-top:6px; }

/* Right: large thumbnail area */
.hero-thumb {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--panel);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.hero-thumb img.hero-thumb-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.hero-thumb .hero-thumb-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.hero-thumb .hero-thumb-link img {
  pointer-events: none; /* ensure the anchor handles clicks */
}

/* Homepage hero: keep right-side spacing but remove visible gray panel. */
.home-hero .hero-card {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.home-hero .hero-thumb {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.home-hero .hero-thumb img.hero-thumb-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.home-hero .hero-card:hover,
.home-hero .hero-card:focus,
.home-hero .hero-card:active,
.home-hero .hero-thumb:hover,
.home-hero .hero-thumb:focus,
.home-hero .hero-thumb:active {
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* Overlay cards centered on the hero image */
.hero-overlay-cards {
  display: none; /* overlay cards removed per request */
}
.hero-overlay-cards .card {
  width: 160px;
  min-height: 100px;
  background: rgba(12,12,12,0.56);
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 12px 34px rgba(0,0,0,0.6);
  padding: 6px;
}
.hero-overlay-cards .card h3 { font-size: 13px; margin: 6px 0 0 0; color: var(--text); opacity: 1; }
.hero-overlay-cards .card h3 { font-size: 14px; margin: 8px 0 0 0; }

/* Dark overlay to improve text contrast */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  /* even lighter overlay so the background image is less washed out */
  background: linear-gradient(180deg, rgba(12,12,12,0.08) 0%, rgba(12,12,12,0.08) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Ensure hero text (badge/duration) is fully opaque */
.hero .hero-left .duration,
.hero .hero-left .live-badge,
.hero .hero-left .badge-scheduled {
  color: var(--text);
  opacity: 1;
}

/* Small thumbnails strip under hero-left (preview rail) */
.hero-thumbs-strip { display: none; }

@media (max-width: 900px) {
  /* on small screens allow the hero to become fluid */
  .hero { grid-template-columns: 1fr; height: auto; min-height: 360px; }
  .home-hero .hero-video-layer { inset: 0; }
  .hero .hero-left { padding: 18px; }
  .hero .hero-left h1 { font-size: 26px; }
  .hero-thumb { width:100%; height:180px; transform:none; opacity:1; box-shadow:none; }
  .hero-thumb .club-logo { display:none; }
  .hero-thumb .vs-circle { display:none; }
}

@media (max-width: 840px) {
  #view > .home-hero:first-child {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Stream-specific hero (title + status) */
.stream-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
}
.stream-hero .badge {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.06);
  max-height: 36px;
}
.stream-hero .badge-live { background: var(--accent); color: #fff; }
.stream-hero .badge-ended { background: #6f6f6f; color: #fff; }
.stream-hero .badge-scheduled { background: var(--accent-3); color: #1a1a1a; }

.hero-thumb .hero-thumb-frame,
.stream-thumbnail-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

.stream-thumbnail {
  position: relative;
}

.stream-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.hero-thumb .stream-provider-badge,
.stream-thumbnail .stream-provider-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.stream-provider-inline {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.stream-provider-inline .stream-provider-badge {
  position: static;
}

.stream-provider-badge img {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

.stream-provider-badge--sportkanal img {
  filter: brightness(0) invert(1);
}

.stream-provider-badge--text {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(12, 14, 18, 0.55);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stream-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.stream-meta-row .stream-date {
  margin: 0;
}

.stream-provider-footer {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.provider-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.provider-choice input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.stream-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .stream-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .stream-hero h1 {
    white-space: normal;
    font-size: 18px;
  }
  .hero {
    min-height: 260px;
    padding: 18px;
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-thumb { width: 100%; min-width: auto; height: 180px; transform: none; opacity: 1; box-shadow: none; background-position: center center; }
}

/* Compact the big .hero container when used for stream pages (use stream-hero look) */
.hero.stream-hero {
  /* don't use the large hero sizing */
  grid-template-columns: 1fr;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 18px 28px !important;
  align-items: center;
  background-size: auto !important;
  background-position: left top !important;
}

.hero.stream-hero::after {
  /* reduce overlay so text stays readable but not heavy */
  background: linear-gradient(180deg, rgba(12,12,12,0.02) 0%, rgba(12,12,12,0.02) 100%);
}

.hero-card,
.comment,
.player-placeholder {
  background: var(--panel);
  border: none;
  padding: 14px;
}

.club-hero {
  align-items: start;
  min-height: 260px;
  display: grid;
  grid-template-columns: 2fr 1fr; /* left: club info (2/3), right: next stream (1/3) */
  gap: 20px;
  padding: 24px 28px;
}

/* Club detail page specific styles */
.club-hero h1 {
  margin: 0 0 12px 0;
  font-size: 36px;
  letter-spacing: 0.06em;
}
.club-hero {
  align-items: start;
  min-height: 260px;
  display: grid;
  grid-template-columns: 2fr 1fr; /* left: club info (2/3), right: next stream (1/3) */
  gap: 20px;
  padding: 24px 28px;
  position: relative; /* enable dim overlay */
}

/* dim background on club detail pages (approx 0.4 opacity) */
.club-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  pointer-events: none;
  z-index: 0;
}

/* make sure content sits above the overlay */
.club-hero > * {
  position: relative;
  z-index: 1;
}

.club-hero .club-hero-logo {
  /* larger square logo box on club page, centered, transparent background */
  width: 320px;
  height: 320px;
  min-width: 320px;
  max-width: 320px;
  overflow: hidden;
  margin: 0 0 12px 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.club-hero .club-hero-logo img,
.club-hero .club-hero-logo .stream-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* fit whole image without cropping */
  display: block;
  padding: 8%; /* slight inset so the whole logo breathes */
}
.club-hero .club-motto { margin: 6px 0 12px 0; font-size: 14px; }
.club-hero .club-desc { margin-bottom: 14px; }
.club-hero .hero-actions { display:flex; gap:12px; align-items:center; margin-bottom:6px; }

/* Club page: make action buttons transparent to blend with header */
.club-hero .button,
.club-hero .hero-actions .button,
.club-hero .hero-actions a.button,
.club-next-stream .button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: none;
}

.club-hero .button.accent {
  border-color: var(--accent);
  color: var(--accent);
}

.club-hero .button:hover,
.club-next-stream .button:hover {
  background: rgba(255,255,255,0.03);
}

.club-next-stream .next-stream-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.club-next-stream .next-stream-thumb {
  width: 100%;
  min-width: auto;
  aspect-ratio: 16 / 9; /* fixed 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}
.club-next-stream .next-stream-thumb img { width:100%; height:100%; object-fit:cover; }
.club-next-stream .next-stream-meta { display:flex; flex-direction:column; gap:8px; }
.club-next-stream .next-stream-title { margin: 0 0 8px 0; font-size: 18px; letter-spacing: 0.06em; color: var(--muted); }
.club-next-stream .stream-name { margin: 0; font-size: 20px; line-height:1.1; }
.club-next-stream .stream-time { margin: 0; font-size: 14px; color: var(--muted); }
.club-next-stream .button.open { margin-top:12px; padding: 14px 44px; font-size: 18px; border-radius: 6px; background: var(--accent); color: #fff; box-shadow: 0 16px 40px rgba(236,28,36,0.22); }

.club-next-stream {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02));
  padding: 28px;
  border-radius: 8px;
  align-self: start;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  min-height: 200px;
}

/* Ensure next-stream panel text is high-contrast (white) */
.club-next-stream,
.club-next-stream .next-stream-title,
.club-next-stream .next-stream-meta,
.club-next-stream .next-stream-meta .stream-name,
.club-next-stream .next-stream-meta .stream-time,
.club-next-stream .muted {
  color: var(--text) !important;
}

@media (max-width: 900px) {
  .club-hero { grid-template-columns: 1fr; padding: 18px; }
  .club-hero .club-hero-logo { height: 260px; width: 260px; min-width: 260px; max-width: 260px; }
  .club-next-stream { padding: 18px; }
  .club-next-stream .next-stream-inner { flex-direction: row; gap:12px; }
  .club-next-stream .next-stream-thumb { width: 120px; min-width: 120px; aspect-ratio: 16 / 9; height: auto; }
  .club-next-stream .button.open { padding: 10px 24px; font-size: 14px; }
}

.club-hero-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  text-align: center;
}

/* visual order: show logo above the club name */
.club-hero-head .club-hero-logo {
  order: 1;
}
.club-hero-head h1 {
  order: 2;
  margin: 0;
}

/* make sure motto, description and actions appear after logo + title */
.club-hero-head .club-motto,
.club-hero-head .club-desc,
.club-hero-head .hero-actions {
  order: 3;
}

/* Ensure description and actions inside the head are centered */
.club-hero-head .club-desc {
  margin: 6px 0 12px 0;
  max-width: 680px;
}
.club-hero-head .hero-actions {
  justify-content: center;
}

.club-hero-logo {
  width: 116px;
  min-width: 116px;
  height: 116px;
  border: none;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.club-hero-logo .stream-thumbnail-image {
  object-fit: contain;
  width: 100%;
  height: 100%;
}

.hero-actions,
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.browse-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.browse-filters .input {
  min-width: 170px;
}

.browse-filters #browse-search {
  min-width: 260px;
}

@media (max-width: 900px) {
  .browse-filters {
    width: 100%;
  }

  .browse-filters .input,
  .browse-filters #browse-search {
    min-width: 0;
    width: 100%;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.tabs {
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs .tab {
  white-space: nowrap;
}

.footer {
  padding: 18px 28px;
  border-top: 2px solid var(--accent-2);
  background: var(--bg-2);
  display: flex;
  justify-content: space-between;
  color: #efefef;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.form,
.comment-list {
  display: grid;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.comment-list {
  margin-bottom: 12px;
}

.input {
  background: #1a1d23;
  border: 2px solid #464b55;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  font-weight: 300;
}

.input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px var(--accent-2);
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid #1f1f1f;
}

.badge-live {
  background: var(--accent);
}

.badge-ended {
  background: #6f6f6f;
}

.badge-scheduled {
  background: var(--accent-3);
  color: #1a1a1a;
}

.stream-tag {
  display: inline-block;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid #464b55;
  background: var(--panel-offset);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted,
.comment-meta {
  color: var(--muted);
}

.comment-meta {
  font-size: 12px;
  margin-bottom: 6px;
}

.stream-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
}

.stream-chat-wrap {
  width: 100%;
  /* increase default chat height on desktop so embedded YouTube chat is more usable */
  min-height: 640px;
  border: 1px solid #6f7378;
  background: #0e0f11;
}

.stream-chat-frame {
  width: 100%;
  min-height: 360px;
  height: 100%;
  border: 0;
  display: block;
  background: #0e0f11;
  pointer-events: none;
}

.stream-chat-frame.is-interactive {
  pointer-events: auto;
}

.stream-chat-compose {
  margin-top: 8px;
}

.stream-chat-compose .input {
  min-height: 44px;
  resize: vertical;
  padding: 8px 10px;
  border: 1px solid rgba(70,75,85,0.9);
  background: #111315;
}


.player-frame {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  margin: 0;
  border: 1px solid #6f7378;
  background: #000;
}

.player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #111;
}

.player-placeholder {
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
}

.player-help {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
.player-help {
  display: none;
}

#stream-details-bottom p {
  margin: 6px 0;
}

#stream-details-bottom h3 {
  margin-bottom: 6px;
}

/* Stream info header (compact, YouTube-like) */
.stream-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stream-info-header .stream-channel {
  display: flex;
  align-items: center;
  gap: 14px;
}
.channel-avatar-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel);
  display: block;
}
.club-link { display: inline-block; line-height: 0; }

/* Top area of stream details: main info (left) and club info (right) */
.stream-details-top {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: start;
}
.stream-main-info { min-width: 0; }
.stream-club-info { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stream-club-info .club-name-right a { color: var(--text); font-weight: 700; font-size: 18px; display: inline-block; }

.stream-club-actions { margin-top: 6px; }
.stream-club-actions .button { padding: 8px 12px; font-size: 13px; }

@media (max-width: 900px) {
  .stream-details-top { grid-template-columns: 1fr; }
  .stream-club-info { flex-direction: row; gap: 12px; text-align: left; align-items: center; }
  .stream-club-info .club-name-right a { font-size: 16px; }
}
.stream-layout {
  display: grid;
  gap: 14px;
  /* Make the chat column narrower: fixed 300px for desktop, player takes remaining space */
  grid-template-columns: minmax(0, 1fr) 300px;
}
.stream-chat-wrap {
  max-width: 300px;
  /* keep chat column narrow but match increased desktop height */
  min-height: 640px;
  border: 1px solid #6f7378;
  background: #0e0f11;
}
.stream-chat-frame {
  width: 100%;
  min-height: 280px;
  height: 100%;
  border: 0;
  display: block;
  background: #0e0f11;
  pointer-events: none;
}
}

.stream-title {
  margin: 12px 0 8px 0;
  font-size: 22px;
  text-transform: none;
  font-weight: 700;
}

.stream-description {
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow: visible;
  display: block;
  max-height: none;
}
.stream-description.expanded {
  /* kept for compatibility but no-op since full description is always shown */
  max-height: none; /* Ensure full description is always shown */
}

.stream-info-meta .stream-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  margin-left: 8px;
}

.comment-form textarea.input {
  min-height: 80px;
  resize: vertical;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background:
    linear-gradient(125deg, rgba(0, 72, 255, 0.14) 0 42%, transparent 42% 100%),
    linear-gradient(-25deg, rgba(255, 77, 0, 0.16) 0 32%, transparent 32% 100%),
    var(--panel-offset);
  border: 2px solid #1f1f1f;
}

.stream-card,
.club-card,
.sponsor-card {
  min-height: 0;
  height: auto;
}

.stream-card,
.club-card,
.sponsor-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stream-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #2a2f37;
  border-bottom: none;
  flex-shrink: 0;
}

.stream-thumbnail img {
  display: block;
}

.stream-status {
  width: 100%;
}

.stream-status .badge {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 8px;
  border: none;
  border-radius: 0;
  font-size: 11px;
  line-height: 1;
  text-align: left;
}

.club-thumbnail {
  aspect-ratio: 1 / 1;
  background: #20242b;
}

/* Homepage clubs: transparent logo tiles with subtle polished state. */
#club-list .club-card,
#club-list > .card,
#club-list > a.card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#club-list .club-thumbnail {
  background: transparent !important;
  box-shadow: none;
  transition: box-shadow 180ms ease, background-color 180ms ease;
}

#club-list .club-card:hover .club-thumbnail,
#club-list > .card:hover .club-thumbnail,
#club-list > a.card:hover .club-thumbnail {
  background: rgba(255, 255, 255, 0.02) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* Make club thumbnails behave like sponsors: fit by width and avoid cropping */
.club-thumbnail .stream-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 14%;
}

.sponsor-thumbnail {
  aspect-ratio: 1 / 1;
  background: #20242b;
}

/* Homepage sponsors: transparent tiles on desktop and mobile with no hover visuals. */
#sponsor-list .sponsor-card,
#sponsor-list > .card,
#sponsor-list > a.card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: none !important;
}

#sponsor-list .sponsor-thumbnail {
  background: transparent !important;
  box-shadow: none !important;
  transition: none !important;
}

#sponsor-list .sponsor-card:hover,
#sponsor-list > .card:hover,
#sponsor-list > a.card:hover,
#sponsor-list .sponsor-card:hover .sponsor-thumbnail,
#sponsor-list > .card:hover .sponsor-thumbnail,
#sponsor-list > a.card:hover .sponsor-thumbnail {
  background: transparent !important;
  box-shadow: none !important;
}

.sponsor-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 14%;
}

.stream-thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stream-card-body {
  padding: 6px 8px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  flex: 1;
  background: transparent;
}

.stream-card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.stream-card-body .muted {
  margin: 0;
  padding: 0;
}

.stream-card .stream-date {
  margin-top: 2px;
  font-size: 14px;
}

.stream-card-body .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-card .button,
.club-card .button,
.sponsor-card .button {
  margin-top: auto;
}

@media (max-width: 840px) {
  .grid-2,
  .stream-layout {
    grid-template-columns: 1fr;
  }

  .cta,
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links,
  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Reset full-bleed sections on small screens */
  .section {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
    padding: 12px 14px;
  }

  .button {
    min-height: 40px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
  }

  .cards,
  .cards-grid-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
    gap: 10px;
  }

  .cards > .card,
  .cards-grid-8 > .card {
    width: 100%;
    max-width: 100%;
  }

  .cards-two-rows {
    max-height: none;
  }

  /* Home page clubs on mobile: show logo tiles only */
  #club-list > .card,
  #club-list > a.card {
    min-height: 0;
  }

  #club-list > .card .stream-card-body,
  #club-list > a.card .stream-card-body {
    display: none;
  }

  .stream-card,
  .club-card {
    height: auto;
    min-height: 0;
  }

  .stream-card-body {
    height: auto;

  /* Cleaner, borderless card style for stream/club listings */
  .stream-card,
  .club-card {
    border: none;
    background: transparent;
    box-shadow: none;
  }

  .cards .card {
    border: none;
    background: transparent;
    box-shadow: none;
  }
    min-height: 0;
  }

  main {
    padding: 16px 14px 24px;
  }

  .section {
    padding: 12px 14px;
    margin-bottom: 14px;
  }

  .hero {
    padding: 14px;
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .stream-card-body h3 {
    font-size: 16px;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile-first improvements: single stream per row and cleaner navbar */
@media (max-width: 700px) {
  /* One card per row */
  .cards,
  .cards-grid-8 {
    grid-template-columns: 1fr !important;
    max-width: 100%;
  }
  .cards > .card,
  .cards-grid-8 > .card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Compact navbar: two rows. Row 1: logo left, profile/actions right. Row 2: centered menu */
  .nav {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
  }
  .logo { grid-column: 1; grid-row: 1; justify-self: start; }
  .nav-actions { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav-links { grid-column: 1 / span 2; grid-row: 2; justify-self: center; display: flex; gap: 6px; }

  /* Smaller, cleaner buttons in navbar and site-wide */
  .button {
    padding: 8px 10px;
    font-size: 11px;
    border-width: 1px;
    letter-spacing: 0.04em;
  }

  /* Reduce hero and section padding on small screens */
  .hero,
  .section {
    padding: 12px 14px;
  }

  /* Make stream title wrap nicely instead of truncating heavily */
  .stream-hero h1 {
    white-space: normal;
    font-size: 18px;
    line-height: 1.15;
  }

  /* Make the chat column collapse under the player naturally */
  .stream-layout {
    grid-template-columns: 1fr;
  }
  .stream-chat-wrap,
  .stream-chat-frame {
    min-height: 200px;
  }
  /* Sponsor cards smaller on mobile: show 4 sponsors per row */
  #sponsor-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px;
    max-width: 100%;
  }
  #sponsor-list > .card {
    width: auto !important;
    max-width: none !important;
    padding: 8px;
    min-height: 80px;
  }
  /* Make sponsor cards transparent and hide their text body */
  #sponsor-list > .card.sponsor-card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 4px !important;
    min-height: 0 !important;
  }
  #sponsor-list > .card.sponsor-card .stream-card-body {
    display: none !important;
  }
  .sponsor-thumbnail-image {
    padding: 8%;
  }
  /* Club cards smaller on mobile: show 4 clubs per row (match sponsors) */
  #club-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px;
    max-width: 100%;
  }
  #club-list > .card,
  #club-list > a.card {
    width: auto !important;
    max-width: none !important;
    padding: 4px;
    min-height: 80px;
  }
  #club-list .club-thumbnail .stream-thumbnail-image {
    padding: 3%;
    object-fit: contain;
  }
}

@media (max-width: 560px) {
  .logo {
    font-size: 16px;
    letter-spacing: 0.1em;
  }

  .nav {
    padding: 12px 12px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    max-width: 100%;
  }

  .cards-grid-8 {
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stream-chat-wrap,
  .stream-chat-frame {
    min-height: 340px;
  }

  .player-placeholder {
    min-height: 220px;
  }

  .table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Admin table and tab tweaks to match site styling */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px; /* gap between row cards */
  color: var(--muted);
}
.table thead th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(0,0,0,0.12);
}
.table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: none;
}
.table tbody tr {
  background: var(--panel);
  border: none;
  box-shadow: 0 2px 0 rgba(0,0,0,0.06);
}
.table button,
.table .button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}
.table button:hover,
.table .button:hover {
  border-color: var(--accent);
}

/* Tabs used in admin */
.tabs { display:flex; gap:8px; }
.tab {
  padding: 8px 12px;
  border: 2px solid rgba(255,255,255,0.06);
  background: var(--bg-2);
  color: #efefef;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.tab:hover {
  border-color: var(--accent-2);
}
.tab:focus {
  outline: 2px solid rgba(0,72,255,0.12);
}
.tab.active {
  background: var(--panel);
  border-color: var(--accent-2);
  color: var(--text);
}

/* Calendar */
.calendar-shell {
  background: var(--panel-offset);
}

.calendar-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.calendar-month-picker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-weekdays div {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--muted);
  padding: 4px 6px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day-cell {
  min-height: 110px;
  border: 2px solid #8a8a8a;
  background: var(--panel);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.calendar-day-cell:hover {
  border-color: var(--accent-2);
  transform: translate(-2px, -2px);
}

.calendar-day-cell.is-other-month {
  opacity: 0.55;
}

.calendar-day-cell.is-today {
  border-color: var(--accent);
}

.calendar-day-cell.has-items {
  box-shadow: inset 0 0 0 1px rgba(0, 72, 255, 0.25);
}

.calendar-day-number {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.calendar-day-count {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.calendar-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 999;
}

.calendar-modal.open {
  display: flex;
}

.calendar-modal-content {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--panel-offset);
  border: 2px solid #1f1f1f;
  padding: 16px;
}

.calendar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.calendar-modal-body {
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.calendar-day-list {
  display: grid;
  gap: 8px;
}

.calendar-day-item {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: start;
  text-align: left;
  border: 2px solid #8a8a8a;
  background: var(--panel);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.calendar-day-item.active,
.calendar-day-item:hover {
  border-color: var(--accent-2);
}

.calendar-detail-card {
  background: var(--panel);
  border: 2px solid #8a8a8a;
  padding: 12px;
}

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.app-dialog.open {
  display: block;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.app-dialog-panel {
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: 12vh auto 0;
  background: var(--panel-offset);
  border: 2px solid #1f1f1f;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.app-dialog-panel h3 {
  margin: 0 0 10px;
}

.app-dialog-message {
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.45;
  white-space: normal;
}

.app-dialog-actions {
  justify-content: flex-end;
  margin-top: 0;
}

/* Increase padding for stream detail section so content isn't flush with edges */
#stream-details-bottom {
  padding: 24px 32px;
}

/* Profile/menu toggle and small dropdown for login selection (visible on desktop and mobile) */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
  transition: transform 160ms ease;
}

/* Profile icon styling for menu toggle */
.menu-toggle {
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
}
.menu-toggle .profile-icon {
  width: 20px;
  height: 20px;
  color: #fff;
  display: block;
}
.menu-toggle svg.profile-icon circle,
.menu-toggle svg.profile-icon path {
  stroke: #fff;
}

.mobile-login-popup {
  position: fixed;
  top: 60px;
  right: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  z-index: 1400;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.mobile-login-popup.show { display: flex; }

.mobile-login-popup .button { width: 100%; }

@media (max-width: 840px) {
  /* Hide full nav links on narrow screens; show toggles instead */
  .nav-links { display: none !important; }
  .menu-toggle { display: inline-flex; }
  .hamburger-toggle { display: inline-flex; }
  #login-google, #login-local { display: none !important; }

  /* When logged in on mobile, hide the desktop action buttons (they are shown in the mobile popup) */
  .nav-actions .desktop-actions { display: none !important; }
}

/* Ensure toggles inside nav-actions are visible and spaced correctly */
@media (max-width: 840px) {
  .nav-actions .menu-toggle,
  .nav-actions .hamburger-toggle {
    display: inline-flex !important;
    margin-left: 8px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 6px;
  }
}

/* When `.nav` has `nav-open` on mobile, show the nav links as a column under the logo */
@media (max-width: 840px) {
  .nav.nav-open .nav-links {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    justify-content: center;
    padding-top: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* adjust underline when links are in a row */
  .nav.nav-open .nav-links a::after { bottom: -4px; }
}

/* Hamburger toggle (three bars) */
.hamburger-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.hamburger-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  margin: 2px 0;
  transition: transform 180ms ease, opacity 180ms ease, width 180ms ease;
}

/* When hamburger has .open, hide top and bottom bars and emphasize middle bar */
.hamburger-toggle.open .bar:nth-child(1),
.hamburger-toggle.open .bar:nth-child(3) {
  opacity: 0;
  transform: scaleX(0.2);
}
.hamburger-toggle.open .bar:nth-child(2) {
  transform: scaleX(1.4);
}

/* Mobile nav popup that appears after hamburger pressed */
.mobile-nav-popup {
  position: fixed;
  top: 60px;
  right: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  z-index: 1400;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.mobile-nav-popup.show { display: flex; }
.mobile-nav-popup a { color: var(--text); padding: 8px 10px; display: block; }


/* Make logo and text smaller on narrow phones */
@media (max-width: 480px) {
  .logo-image { height: 22px; }
  .logo-text { height: 16px; }
  .logo { font-size: 14px; }
  /* slightly reduce nav item text and button size on very small screens */
  .nav-links a, .nav-actions .muted { font-size: 11px; letter-spacing: 0.06em; }
  .nav-actions .button { padding: 6px 8px; font-size: 11px; }
}

/* Mobile-sized navbar text (only applies on smaller screens) */
@media (max-width: 840px) {
  .nav-links a, .nav-actions .muted { font-size: 12px; letter-spacing: 0.08em; padding: 4px 6px; }
}

@media (max-width: 840px) {
  .stream-layout {
    grid-template-columns: 1fr;
  }

  .stream-chat-wrap,
  .stream-chat-frame {
    min-height: 420px;
  }

  .calendar-modal-body {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-day-cell {
    min-height: 92px;
    padding: 6px;
  }
}

@media (max-width: 900px) {
  /* Force homepage clubs to logo-only tiles on mobile/tablet widths. */
  #club-list .stream-card-body {
    display: none !important;
  }

  #club-list .club-card {
    min-height: 0 !important;
  }

  /* Mobile: no hover animation/effect for club tiles. */
  #club-list .club-thumbnail {
    transition: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #club-list .club-card:hover .club-thumbnail,
  #club-list > .card:hover .club-thumbnail,
  #club-list > a.card:hover .club-thumbnail {
    background: transparent !important;
    box-shadow: none !important;
  }

  /* Sponsors on mobile: hard-disable any box/border visuals in every state. */
  #sponsor-list .sponsor-card,
  #sponsor-list > .card,
  #sponsor-list > a.card,
  #sponsor-list .stream-thumbnail,
  #sponsor-list .sponsor-thumbnail {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    transition: none !important;
    -webkit-tap-highlight-color: transparent;
  }

  #sponsor-list .sponsor-card:hover,
  #sponsor-list > .card:hover,
  #sponsor-list > a.card:hover,
  #sponsor-list .sponsor-card:focus,
  #sponsor-list > .card:focus,
  #sponsor-list > a.card:focus,
  #sponsor-list .sponsor-card:active,
  #sponsor-list > .card:active,
  #sponsor-list > a.card:active,
  #sponsor-list .sponsor-card:hover .sponsor-thumbnail,
  #sponsor-list > .card:hover .sponsor-thumbnail,
  #sponsor-list > a.card:hover .sponsor-thumbnail,
  #sponsor-list .sponsor-card:focus .sponsor-thumbnail,
  #sponsor-list > .card:focus .sponsor-thumbnail,
  #sponsor-list > a.card:focus .sponsor-thumbnail,
  #sponsor-list .sponsor-card:active .sponsor-thumbnail,
  #sponsor-list > .card:active .sponsor-thumbnail,
  #sponsor-list > a.card:active .sponsor-thumbnail {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
}

