/* Piwnica INC – styles.css (dark, desktop-first, responsive) */

:root {
  --bg: #0b1220;
  --bg-alt: #111c30;
  --surface: #132037;
  --surface-soft: #101a2c;
  --surface-muted: #0c1526;
  --line: #1f2f49;
  --fg: #e8eefb;
  --muted: #9fb3d1;
  --accent: #6bc1ff;
  --accent-2: #7b7cff;
  --accent-soft: rgba(107,193,255,.18);
  --danger: #ff4d5a;
  --danger-soft: #ff8585;
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(107,212,255,.06), 0 12px 34px rgba(0,0,0,.42);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Top nav */
.nav {
  position: sticky;
  top: 0;
  inset: auto 0;
  z-index: 40;
  background: rgba(11, 18, 32, 0.88);
  border-bottom: 1px solid rgba(31, 47, 73, 0.65);
  backdrop-filter: blur(12px);
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
body.is-nav-scrolled .nav,
body.is-nav-open .nav {
  background: rgba(11, 18, 32, 0.94);
  border-bottom-color: rgba(107, 193, 255, 0.18);
  box-shadow: 0 16px 40px rgba(3, 8, 20, 0.45);
}
.nav-shell {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  min-height: 64px;
}
.nav .brand {
  color: var(--fg);
  font-weight: 800;
  letter-spacing: .3px;
  text-decoration: none;
}
.brand--panel {
  font-size: 1rem;
  letter-spacing: .4px;
}
.nav-panel {
  flex: 1;
  position: relative;
  color: var(--fg);
}
.nav-panel__inner {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}
.nav-panel__header {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
}
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-search input {
  width: 220px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(107, 193, 255, 0.28);
  background: rgba(16, 26, 44, 0.85);
  color: var(--fg);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.nav-search input::placeholder {
  color: rgba(159, 179, 209, 0.7);
}
.nav-search input:focus-visible {
  outline: none;
  border-color: rgba(107, 193, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(107, 193, 255, 0.16);
}
.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
}
.nav-menu__optional.hidden {
  display: none;
}
.nav-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .2s ease;
}
.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--fg);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-menu a.is-active::after,
.nav-menu a[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-menu a:hover::after,
.nav-menu a:focus::after {
  transform: scaleX(1);
}
.nav-panel__inner .nav-search {
  flex: 0 0 auto;
}
.nav-panel__inner .socials {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}
.nav .ico {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 8px;
  outline: none;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.nav .ico:hover {
  box-shadow: 0 0 0 3px rgba(107, 212, 255, .15) inset;
  border-color: rgba(107, 212, 255, .4);
}
.nav .ico img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(107, 193, 255, 0.25);
  background: rgba(16, 26, 44, 0.85);
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  gap: 4px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.nav-toggle:hover {
  border-color: rgba(107, 193, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(107, 193, 255, 0.15);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
  transition: transform .24s ease, opacity .24s ease;
}
.nav.is-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav.is-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav.is-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.nav-close {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(107, 193, 255, 0.38);
  background: rgba(17, 27, 46, 0.85);
  color: var(--fg);
  font-size: 1.4rem;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.nav-close:hover {
  border-color: rgba(107, 193, 255, 0.6);
  transform: scale(1.05);
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(5, 10, 20, 0.6);
  backdrop-filter: blur(6px);
  border: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}
body.is-nav-open .nav-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Hero */
.hero { text-align: center; padding: 72px 16px 56px; background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero h1 { margin: 0 0 18px; font-size: clamp(32px, 4vw, 56px); letter-spacing: .6px; }
.hero-actions { display: inline-flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-actions .btn { min-width: 200px; }
.hero-actions .btn-primary { box-shadow: 0 16px 40px rgba(30,64,175,0.35); }

/* Buttons / chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  color: #60a5fa;
  background: transparent;
  text-decoration: none;
  font-weight: 500;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover {
  background: rgba(37,99,235,.12);
  color: #93c5fd;
}
.btn.primary { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); color: #03121c; font-weight: 700; border: none; }
.btn-primary { background: #1e3a8a; color: #fff; font-weight: 600; border-radius: 8px; padding: 10px 20px; transition: background .2s ease; }
.btn-primary:hover { background: #2563eb; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.chip.is-active { color: var(--fg); box-shadow: 0 0 0 2px rgba(107,212,255,.25) inset; }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; padding: 28px 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

h2 { margin: 0 0 14px; font-size: clamp(20px, 2.5vw, 28px); letter-spacing: .3px; }

.home-about,
.home-cta {
  padding: 40px 20px;
  text-align: center;
}
.home-about h2 { margin-bottom: 12px; }
.home-about p { margin: 0 auto; max-width: 720px; color: var(--muted); }
.home-cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.home-cta .btn { min-width: 200px; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }

/* EotM specific */
.eotm .card { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 16px; }
.badge-live { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius: 999px; background: var(--danger); color:#fff; font-size:.78rem; font-weight:700; letter-spacing:.3px; }

/* Events */
.events-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 0; padding: 0; list-style: none; }

/* Live now */
.live-now { margin-top: 32px; }
.live-status { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; }
.live-status.is-error { color: var(--danger-soft); }
.live-status.is-ok { color: var(--muted); }
.live-status.is-loading { color: var(--muted); }
.live-status.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(159,179,200,.5);
  border-top-color: var(--accent);
  animation: live-spin 1s linear infinite;
}
.live-now-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.live-now-grid.is-loading { opacity: .7; transition: opacity .2s ease-in-out; }
.live-card-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid rgba(30,60,90,.45); background: var(--surface-muted); }
.live-card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.live-now-grid .stream-card { cursor: pointer; }
.live-now-grid #live-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  color: var(--muted);
}

/* Mini multistream */
.multi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.iframe-wrap { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-muted); }
.iframe-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Pełny multistream */
.stream-card,
.live-card { display: grid; gap: 14px; padding: 16px; background: rgba(14,21,32,.95); border-radius: 18px; border: 1px solid rgba(30,60,90,.55); box-shadow: 0 10px 32px rgba(0,0,0,.35); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stream-card:hover,
.live-card:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(0,0,0,.5); border-color: rgba(107,212,255,.45); }
.stream-card.is-primary { border-color: rgba(107,212,255,.8); box-shadow: 0 18px 48px rgba(64,145,255,.35); }
.stream-card.is-secondary { border-color: rgba(123,124,255,.65); }
.stream-thumb { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 14px; overflow: hidden; background: var(--surface-muted); border: 1px solid rgba(30,60,90,.4); }
.stream-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-thumb .thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, rgba(29,44,65,.85), rgba(11,18,28,.85)); color: var(--muted); font-size: 1.5rem; font-weight: 600; }
.live-chip { position: absolute; top: 10px; right: 10px; left: auto; padding: 4px 10px; font-size: .75rem; font-weight: 700; letter-spacing: .4px; border-radius: 999px; background: var(--danger); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.4); text-transform: uppercase; }
.stream-body { display: grid; gap: 10px; }
.stream-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--fg); }
.stream-desc { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.stream-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.stream-meta span { padding: 4px 10px; border-radius: 999px; background: rgba(107,212,255,.08); color: var(--muted); font-size: .8rem; letter-spacing: .2px; }
.stream-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.mini { padding: 6px 12px; font-size: .85rem; }
.btn.ghost { background: transparent; border: 1px solid rgba(107,212,255,.3); color: var(--muted); box-shadow: none; }
.btn.ghost:hover { border-color: rgba(107,212,255,.7); color: var(--fg); box-shadow: 0 0 0 3px rgba(107,212,255,.12); }
.btn.ghost:disabled { opacity: .5; cursor: not-allowed; }
.stream-socials { margin-top: 10px; display: flex; justify-content: center; }
.stream-socials .member-socials { margin-top: 0; }
.stream-actions .ico { width: 36px; height: 36px; border-radius: 12px; border: 1px solid rgba(30,60,90,.45); display: inline-block; background: var(--surface-soft); box-shadow: none; cursor: pointer; }
.stream-actions .ico:hover { box-shadow: 0 0 0 3px rgba(107,212,255,.12); }
.multistream-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.multistream-grid .stream-card { cursor: pointer; }
.multistream-grid .stream-actions button,
.multistream-grid .stream-actions a { cursor: pointer; }
.stream-card.is-live .stream-thumb { border-color: rgba(255,77,77,.7); box-shadow: 0 10px 26px rgba(255,77,77,.22); }
.stream-card.is-live .stream-meta span:first-child { background: rgba(255,77,90,.18); color: var(--danger-soft); }
.stream-card:not(.is-live) { opacity: .92; }
.stream-card::after { pointer-events: none; }
.stream-card.is-primary::after,
.stream-card.is-secondary::after { content: attr(data-tag); position: absolute; top: 14px; right: 16px; background: rgba(107,212,255,.15); border: 1px solid rgba(107,212,255,.4); color: var(--fg); font-size: .7rem; padding: 4px 8px; border-radius: 999px; letter-spacing: .3px; }
.stream-card.is-secondary::after { background: rgba(123,124,255,.18); border-color: rgba(123,124,255,.55); }
.stream-card { position: relative; }
.stream-actions button,
.stream-actions a { flex: 0 0 auto; }

.streamer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.streamer-card { display: grid; gap: 12px; align-items: center; text-align: center; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.streamer-card:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(0,0,0,.45); border-color: rgba(107,212,255,.35); }
.streamer-card.is-live { border-color: rgba(255,77,90,.6); }
.streamer-avatar-wrap { position: relative; width: 112px; height: 112px; margin: 0 auto; border-radius: 999px; overflow: hidden; border: 3px solid rgba(107,212,255,.2); background: var(--surface-muted); display: grid; place-items: center; }
.streamer-card.is-live .streamer-avatar-wrap { border-color: rgba(255,77,90,.7); }
.streamer-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.streamer-card .live-chip { position: absolute; top: 6px; right: 6px; }
.streamer-body { display: grid; gap: 6px; }
.streamer-name { font-weight: 700; font-size: 1.05rem; color: var(--fg); }
.streamer-role { font-size: .82rem; color: var(--muted); letter-spacing: .25px; text-transform: uppercase; }
.streamer-desc { margin: 0; color: var(--muted); font-size: .9rem; }
.streamer-actions { margin-top: 8px; }
.streamer-actions .member-socials { justify-content: center; }

.multistream-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.multistream-controls .control { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.multistream-controls label { font-size: .9rem; color: var(--muted); }
.multistream-controls select { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--fg); padding: 8px 10px; min-height: 36px; }
.multistream-controls select:disabled { opacity: .5; }
.multistream-controls .refresh-btn { margin-left: auto; }
.multistream-controls .refresh-btn.is-loading { position: relative; pointer-events: none; opacity: .7; padding-right: 42px; }
.multistream-controls .refresh-btn.is-loading::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(107,212,255,.25);
  border-top-color: var(--accent);
  animation: live-spin 1s linear infinite;
}
.multistream-status { margin: 0 0 16px; font-size: .9rem; color: var(--muted); }
.multistream-status.is-error { color: var(--danger-soft); }
.multistream-status.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(159,179,200,.5);
  border-top-color: var(--accent);
  animation: live-spin 1s linear infinite;
}
.multistream-layout .players .hidden { display: none !important; }
.multistream-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.multistream-layout .players { display: grid; gap: 16px; }
.chat-panel { display: grid; gap: 16px; }
.chat-box { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(30,60,90,.55); border-radius: 14px; background: rgba(10,17,25,.92); transition: border-color .18s ease, box-shadow .18s ease; }
.chat-box.is-empty { display: none; }
.chat-box:not(.is-empty):hover { border-color: rgba(107,212,255,.45); box-shadow: 0 12px 32px rgba(0,0,0,.32); }
.chat-meta { font-size: .85rem; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-meta span { font-weight: 600; color: var(--fg); }
.chat-actions { display: flex; align-items: center; gap: 10px; }
.chat-actions strong { color: var(--fg); font-weight: 600; }
.chat-frame { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); overflow: hidden; min-height: 320px; }
.chat-frame iframe { width: 100%; height: 100%; border: 0; }

.member-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
.member-socials a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(37,99,235,.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.member-socials a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37,99,235,.25);
  border-color: rgba(147,197,253,.7);
}
.member-socials img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

/* Partnerzy */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.partner-card { display: grid; gap: 16px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.partner-card:hover { transform: translateY(-4px); box-shadow: 0 16px 46px rgba(0,0,0,.45); border-color: rgba(107,212,255,.35); }
.partner-media { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid rgba(30,60,90,.45); background: var(--surface-muted); display: grid; place-items: center; }
.partner-media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.partner-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.4rem; font-weight: 700; color: var(--muted); background: linear-gradient(135deg, var(--surface-soft), var(--surface-muted)); }
.partner-body { display: grid; gap: 12px; }
.partner-body h2 { margin: 0; font-size: 1.15rem; color: var(--fg); }
.partner-body p { margin: 0; color: var(--muted); line-height: 1.5; }
.partner-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }


/* Informacje / o nas */
.info-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 24px; }
.info-card { display: grid; gap: 12px; }
.info-card ul { margin: 0; padding-left: 20px; color: var(--muted); }
.info-card li { margin-bottom: 6px; }

.team-container { display: grid; gap: 32px; padding-bottom: 48px; }
.team-hero { text-align: center; max-width: 720px; margin: 32px auto 0 auto; display: grid; gap: 12px; }
.team-hero h1 { font-size: 2.4rem; margin: 0; letter-spacing: 2px; }
.team-hero p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.about-details { display: grid; gap: 24px; padding: 24px; background: rgba(15,23,42,0.8); border: 1px solid rgba(37,99,235,0.2); border-radius: 18px; box-shadow: 0 18px 42px rgba(2,6,23,0.45); }
.about-details h2 { margin: 0; text-align: center; font-size: 2rem; letter-spacing: 1px; text-transform: uppercase; color: #bfdbfe; }
.about-details__grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.about-details__card { background: rgba(13,20,32,0.92); border: 1px solid rgba(37,99,235,0.25); border-radius: 16px; padding: 20px; display: grid; gap: 12px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.about-details__card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(2,6,23,0.4); border-color: rgba(96,165,250,0.45); }
.about-details__card h3 { margin: 0; font-size: 1.15rem; color: #93c5fd; letter-spacing: .6px; text-transform: uppercase; }
.about-details__card p { margin: 0; color: var(--muted); line-height: 1.6; }
.about-details__card ul { margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.6; }
.about-details__card li { margin-bottom: 6px; }
.about-details__card li::marker { color: #60a5fa; }
.team-section { margin-top: 32px; display: grid; gap: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.member-card { background: rgba(15,23,42,0.9); border: 1px solid rgba(37,99,235,0.18); border-radius: 16px; padding: 20px; display: grid; gap: 16px; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.member-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 22px 60px rgba(2,6,23,0.45); border-color: rgba(107,212,255,0.35); }
.member-card__media { width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid rgba(37,99,235,0.25); background: rgba(15,23,42,0.7); display: grid; place-items: center; }
.member-card__media img { width: 100%; height: 100%; object-fit: cover; }
.member-card__body { display: grid; gap: 10px; text-align: center; }
.member-card__name { margin: 0; font-size: 1.2rem; letter-spacing: 1px; text-transform: uppercase; color: var(--fg); }
.member-card__position { margin: 0; font-size: 0.95rem; color: #60a5fa; font-weight: 600; }
.member-card__desc { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* Events section */
.events { margin-top: 48px; padding: 24px 16px; background-color: #0f172a; border-radius: 16px; }
.event-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; transition: opacity .3s ease, transform .3s ease, box-shadow 0.2s; opacity: 0; transform: translateY(10px); }
.events-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.events-search { flex: 1 1 220px; min-width: 200px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(159,179,209,.3); background: var(--surface-soft); color: var(--fg); }
.events-search::placeholder { color: rgba(159,179,209,.6); }
.events-sort { padding: 8px 36px 8px 12px; border-radius: 10px; border: 1px solid rgba(159,179,209,.3); background: var(--surface-soft); color: var(--fg); appearance: none; }
.events-sort { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.events-sort:focus-visible,
.events-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.event-card.is-visible { opacity: 1; transform: translateY(0); }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(0,0,0,0.4); }
.event-card .event-thumb { border-radius: 8px; max-height: 160px; object-fit: cover; margin-bottom: 12px; width: 100%; display: block; }
.event-thumb.placeholder { display: grid; place-items: center; border-radius: 8px; height: 160px; background: rgba(255,255,255,0.06); color: var(--muted); font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.event-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-date { color: #9ca3af; font-size: 0.85rem; }
.event-title { font-weight: 700; font-size: 1.1rem; margin: 4px 0; }
.event-desc { font-size: 0.95rem; color: #d1d5db; flex-grow: 1; }
.event-card[data-expandable="true"] .event-desc-full { display: none; }
.event-card[data-expandable="true"][data-expanded="true"] .event-desc-short { display: none; }
.event-card[data-expandable="true"][data-expanded="true"] .event-desc-full { display: block; margin-top: 4px; }
.event-readmore { align-self: flex-start; margin-top: 8px; background: #1e3a8a; color: #fff; border: none; border-radius: 6px; padding: 6px 10px; cursor: pointer; text-decoration: none; transition: background 0.2s; display: inline-block; }
.event-readmore:hover { background: #2563eb; }

body.is-modal-open,
body.is-nav-open { overflow: hidden; }
.event-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.72);
  backdrop-filter: blur(6px);
  z-index: 80;
}
.event-modal {
  position: fixed;
  inset: 0;
  padding: 24px;
  display: grid;
  place-items: center;
  z-index: 81;
}
.event-modal.hidden,
.event-modal-backdrop.hidden { display: none !important; }
.event-modal__card {
  width: min(680px, 100%);
  max-height: 90vh;
  background: rgba(13, 20, 32, 0.98);
  border-radius: 20px;
  border: 1px solid rgba(96,165,250,0.3);
  box-shadow: 0 32px 80px rgba(3, 8, 20, 0.6);
  position: relative;
  display: grid;
  padding: 26px 24px 24px;
}
.event-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,0.45);
  background: rgba(15, 23, 42, 0.85);
  color: #bfdbfe;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}
.event-modal__close:hover { transform: scale(1.05); border-color: rgba(147,197,253,0.8); }
.event-modal__body {
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 4px;
  display: grid;
  gap: 14px;
}
.event-modal__title { margin: 0; font-size: 1.6rem; color: #dbecff; letter-spacing: .6px; }
.event-modal__date { margin: 0; font-size: .9rem; color: rgba(191,219,254,0.75); text-transform: uppercase; letter-spacing: 1.4px; }
.event-modal__image { width: 100%; border-radius: 14px; border: 1px solid rgba(37,99,235,0.25); object-fit: cover; }
.event-modal__content { display: grid; gap: 12px; color: #e2e8f0; line-height: 1.6; }
.event-modal__content p { margin: 0; }
.event-modal__actions { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.event-modal__actions a { color: #bfdbfe; text-decoration: none; font-weight: 600; }
.event-modal__actions a:hover { text-decoration: underline; }

/* Footer */
.footer { margin-top: 20px; padding: 20px 16px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }

/* Utilities */
.more { margin-top: 10px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }

/* Responsive */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .eotm .card { grid-template-columns: 72px 1fr auto; }
  .multi-grid { grid-template-columns: 1fr; }
  .multistream-layout { grid-template-columns: 1fr; }
  .chat-panel { grid-template-rows: auto auto; }
  .multistream-controls { flex-direction: column; align-items: stretch; }
  .multistream-controls .refresh-btn { margin-left: 0; }
  .chat-frame { min-height: 260px; }
  .events-controls { flex-direction: column; align-items: stretch; width: 100%; }
  .events-sort, .events-search { width: 100%; }
}
@media (min-width: 769px) {
  .nav-panel {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    background: transparent;
    box-shadow: none;
  }
  .nav-panel__inner {
    padding: 0;
  }
  .nav-panel__header,
  .brand--panel,
  .nav-close {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .nav-shell {
    padding: 12px 16px;
  }
  .nav.is-open {
    position: fixed;
    inset: 0;
    height: 100vh;
    height: 100dvh;
    border-bottom-color: transparent;
  }
  .nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: none;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    background: rgba(12, 19, 33, 0.97);
    box-shadow: 0 18px 46px rgba(3, 8, 20, 0.55);
    transition: transform .26s ease, opacity .26s ease;
    z-index: 41;
  }
  .nav.is-open .nav-panel {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-panel__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 24px 20px 32px;
    height: 100%;
    overflow-y: auto;
  }
  .nav-panel__header {
    display: flex;
  }
  .nav-panel .brand--panel {
    display: inline-flex;
    font-weight: 800;
    letter-spacing: .4px;
  }
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .nav-search {
    display: none;
  }
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .nav-menu a {
    font-size: 1.05rem;
    padding: 10px 0;
  }
  .nav-menu a::after {
    bottom: 0;
  }
  .nav-panel__inner .socials {
    margin-left: 0;
    margin-top: auto;
    justify-content: flex-start;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .grid { grid-template-columns: 1fr; }
  .team-hero h1 { font-size: 1.9rem; }
  .team-hero p { font-size: 0.95rem; }
  .about-details { padding: 20px 16px; }
  .about-details__grid { grid-template-columns: 1fr; }
  .member-socials a { width: 32px; height: 32px; }
  .member-socials img { width: 18px; height: 18px; }
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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