:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #0f1b2d;
  --panel-2: #132238;
  --text: #e7eefb;
  --muted: #93a4bc;
  --line: rgba(255, 255, 255, .1);
  --primary: #0ea5e9;
  --primary-2: #22c55e;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(30, 41, 59, .95) 0%, transparent 42%),
    radial-gradient(900px 460px at 30% 5%, rgba(6, 182, 212, .18), transparent 62%),
    radial-gradient(760px 420px at 88% 12%, rgba(145, 70, 255, .12), transparent 58%),
    linear-gradient(180deg, #0b1121, #09101d 56%, #05080f);
  color: var(--text);
  overflow-x: hidden;
  font-family: Outfit, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 0 max(18px, calc((100vw - 1120px) / 2));
  background: rgba(11, 17, 33, .82);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(14px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: .01em;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}

.brand-mark:before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(6, 182, 212, .7);
  filter: blur(14px);
  opacity: .55;
}

.brand-mark img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: #fff;
  line-height: 1;
}

.brand strong span {
  color: #22d3ee;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar a,
.topbar button {
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.topbar a:hover,
.topbar button:hover {
  color: #fff;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.home-hero {
  position: relative;
  display: grid;
  gap: 24px;
  min-height: 700px;
  padding: 58px 0 34px;
  text-align: left;
  overflow: hidden;
}

.live-hero {
  align-items: start;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
}

.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(105px);
}

.hero-glow-a {
  top: -90px;
  left: 50%;
  width: 820px;
  height: 520px;
  transform: translateX(-50%);
  background: rgba(6, 182, 212, .22);
}

.hero-glow-b {
  right: -260px;
  bottom: 10px;
  width: 680px;
  height: 440px;
  background: rgba(145, 70, 255, .12);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  padding: 8px 14px;
  color: #a5f3fc;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 6px rgba(34, 211, 238, .11), 0 0 18px rgba(34, 211, 238, .8);
}

.home-hero h1 {
  max-width: 780px;
  font-size: clamp(42px, 6.5vw, 76px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: .98;
}

.text-gradient {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.live-hero-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
}

.live-hero-head .lead {
  max-width: 760px;
}

.featured-live-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: stretch;
}

.featured-stream-card,
.active-streams-panel {
  min-height: 468px;
  background: rgba(20, 25, 38, .74);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(0,0,0,.35);
  overflow: hidden;
}

.featured-stream-card {
  position: relative;
}

.featured-stream-link,
.featured-empty {
  position: relative;
  display: flex;
  min-height: 468px;
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

.featured-stream-link {
  align-items: flex-end;
  padding: 34px;
}

.featured-stream-link:before,
.featured-empty:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.08) 35%, rgba(0,0,0,.88)),
    radial-gradient(480px 260px at 18% 92%, rgba(6,182,212,.24), transparent 66%);
}

.featured-thumb {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .76;
  transform: scale(1.01);
  transition: transform .7s ease, opacity .25s ease;
}

.featured-stream-link:hover .featured-thumb {
  opacity: .93;
  transform: scale(1.055);
}

.featured-overlay {
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.featured-kicker {
  width: max-content;
  padding: 7px 10px;
  color: #fff;
  background: rgba(6, 182, 212, .2);
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.featured-meta img {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, .25);
}

.featured-meta strong,
.featured-meta small {
  display: block;
}

.featured-meta strong {
  font-size: 18px;
}

.featured-meta small {
  color: #67e8f9;
  font-weight: 750;
}

.featured-overlay h2,
.featured-empty h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.featured-loading,
.featured-empty {
  min-height: 468px;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.featured-loading span {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(34, 211, 238, .18);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.featured-loading.error {
  color: #fecaca;
}

.featured-empty {
  align-content: center;
}

.featured-empty img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  opacity: .76;
}

.featured-empty p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

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

.active-streams-panel {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.panel-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title-row h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
}

.live-count {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 34px;
  padding-inline: 10px;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(239, 68, 68, .35);
}

.active-streamer-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.active-streamer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
}

.active-streamer-row:hover {
  background: rgba(255,255,255,.075);
  border-color: rgba(34,211,238,.22);
}

.active-streamer-row img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid #ef4444;
}

.active-streamer-row strong,
.active-streamer-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.active-streamer-row small {
  color: #94a3b8;
}

.active-streamer-row b {
  padding: 5px 8px;
  color: #bbf7d0;
  background: rgba(34,197,94,.12);
  border: 1px solid rgba(34,197,94,.24);
  border-radius: 999px;
  font-size: 12px;
}

.hero-bottom-row {
  position: relative;
  z-index: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin-top: 0;
  padding: 18px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
}

.stats-grid div {
  display: grid;
  gap: 6px;
}

.stats-grid strong {
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.stats-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.streamer-strip {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding: 18px 0;
  background: rgba(0, 0, 0, .24);
  border-block: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.marquee-mask {
  width: min(1920px, 100vw);
  margin: 0 auto;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 9%, black 91%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 28px;
  padding-inline: 18px;
  animation: marquee 56s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.streamer-chip {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  color: #cbd5e1;
  text-decoration: none;
  opacity: .62;
  transition: opacity .2s ease, transform .2s ease;
}

.streamer-chip:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.muted-chip {
  opacity: .8;
}

.avatar-chip {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12);
}

.streamer-chip:hover .avatar-chip {
  border-color: #22d3ee;
  box-shadow: 0 0 24px rgba(34, 211, 238, .28);
}

.avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(6,182,212,.25), rgba(88,101,242,.2));
  color: #fff;
  font-weight: 900;
}

.streamer-grid-section {
  padding: 72px 0 0;
}

.portal-live-section {
  padding: 48px 0 36px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.portal-main,
.portal-rail {
  background: rgba(30, 41, 59, .34);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 24px;
  box-shadow: 0 22px 70px rgba(0,0,0,.2);
}

.portal-main {
  padding: 18px;
}

.portal-rail {
  padding: 18px;
}

.portal-rail h3 {
  margin-bottom: 14px;
  color: #fff;
  font-size: 18px;
}

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

.loading-card {
  grid-column: 1 / -1;
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.035);
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 18px;
}

.loading-card.error {
  color: #fecaca;
  border-color: rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .08);
}

.live-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #fff;
  text-decoration: none;
  background: #111827;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  isolation: isolate;
  transition: transform .2s ease, border-color .2s ease;
}

.live-card:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, .45);
}

.live-card:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.72) 70%, rgba(0,0,0,.9));
}

.live-thumb {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .78;
  transition: transform .65s ease, opacity .2s ease;
}

.live-card:hover .live-thumb {
  transform: scale(1.06);
  opacity: .92;
}

.status-pill,
.viewer-pill {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.status-pill {
  left: 12px;
  background: #ef4444;
  box-shadow: 0 0 24px rgba(239, 68, 68, .35);
}

.status-pill.offline {
  background: rgba(148, 163, 184, .22);
  color: #cbd5e1;
  box-shadow: none;
}

.viewer-pill {
  right: 12px;
  background: rgba(0,0,0,.62);
  color: #fff;
  backdrop-filter: blur(8px);
}

.live-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.live-meta img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ef4444;
}

.live-meta strong,
.live-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-meta small {
  color: #67e8f9;
  font-weight: 700;
}

.live-card p {
  margin: 12px 0 0;
  display: -webkit-box;
  overflow: hidden;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.live-card.offline {
  min-height: 190px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
}

.live-card.offline:before {
  background: linear-gradient(180deg, rgba(15, 23, 42, .2), rgba(15, 23, 42, .9));
}

.live-card.offline > img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}

.live-card.offline strong,
.live-card.offline small {
  display: block;
}

.live-card.offline small {
  color: var(--muted);
}

.team-rail-list {
  display: grid;
  gap: 9px;
}

.team-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
}

.team-row:hover {
  background: rgba(255,255,255,.07);
}

.team-row img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.team-row strong,
.team-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-row small {
  color: var(--muted);
}

.team-row i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
}

.team-row i.is-live {
  background: #ef4444;
  box-shadow: 0 0 14px rgba(239, 68, 68, .8);
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.streamer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 17px;
  color: #fff;
  text-decoration: none;
  background: rgba(30, 41, 59, .38);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.streamer-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, .58);
  border-color: rgba(6, 182, 212, .35);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}

.streamer-card strong,
.streamer-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 18px;
}

.hero-grid,
.panel-head,
.streamer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
}

.streamer-hero {
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: center;
  margin-bottom: 28px;
}

.streamer-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: .96;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.lead {
  max-width: 720px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.actions,
.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: transparent;
  background: var(--primary);
}

.button.ghost {
  background: rgba(255,255,255,.06);
}

.button.danger {
  min-height: 34px;
  padding: 7px 12px;
  background: rgba(239, 68, 68, .12);
  color: #fecaca;
  border-color: rgba(239, 68, 68, .35);
}

.button.small {
  min-height: 34px;
  margin-top: 12px;
  padding: 7px 12px;
  font-size: 13px;
}

.button.full {
  width: 100%;
}

.section-grid,
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  margin-top: 24px;
}

.panel-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
}

.panel-single {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.surface,
.auth-card {
  padding: 24px;
  background: rgba(15, 27, 45, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-card {
  width: min(480px, 100%);
  margin: 28px auto;
}

.auth-card h1 {
  margin-bottom: 22px;
  font-size: 34px;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1424;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(14, 165, 233, .35);
  border-color: rgba(14, 165, 233, .65);
}

.checkbox {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: 18px;
  min-height: 18px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.muted-link {
  display: inline-block;
  margin-bottom: 8px;
  text-decoration: none;
}

.flash {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flash.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, .12);
  border-color: rgba(34, 197, 94, .28);
}

.flash.error {
  color: #fecaca;
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .28);
}

.center {
  text-align: center;
}

.mt {
  margin-top: 28px;
}

.socials a {
  padding: 8px 12px;
  color: #dbeafe;
  text-decoration: none;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .profile-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .live-hero-head,
  .featured-live-layout {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 840px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .topbar nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .home-hero {
    min-height: auto;
    padding: 38px 0 36px;
  }

  .home-hero h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

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

  .featured-stream-card,
  .active-streams-panel,
  .featured-stream-link,
  .featured-empty,
  .featured-loading {
    min-height: 360px;
  }

  .active-streams-panel {
    min-height: auto;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .hero-grid,
  .panel-head,
  .streamer-hero,
  .section-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

  .live-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1120px);
    padding-top: 28px;
  }

  .brand small {
    display: none;
  }

  .profile-card-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .featured-stream-link {
    padding: 20px;
  }

  .featured-meta img {
    width: 44px;
    height: 44px;
  }

  .status-pill,
  .viewer-pill {
    top: 10px;
  }

}

/* --- Uzupelnienia nowoczesnego widoku --- */

/* Przycisk Rejestracja w topbarze jako pill */
.topbar a.button.primary {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
}

/* Dwukolumnowy uklad pol w formularzach auth i panelu */
.auth-card .two-col,
.surface .two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .auth-card .two-col,
  .surface .two-col {
    grid-template-columns: 1fr;
  }
}