.content-header {
  position: relative;
  z-index: 3;
  display: flex;
  min-width: 0;
  min-height: var(--header-height);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.24);
  background: var(--bg-app);
  box-shadow: var(--shadow-low);
}

.content-header__leading,
.content-header__actions,
.header-leading,
.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.content-header__leading,
.header-leading {
  flex: 1 1 auto;
}

.content-header__actions,
.header-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.content-header__icon,
.channel-header-icon {
  display: grid;
  width: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: var(--text-muted);
  font-size: 18px;
}

.content-header__title,
.channel-header-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-header);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-header__divider,
.header-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0 3px;
  background: var(--border-strong);
}

.content-header__topic,
.channel-topic {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-header .mobile-only {
  display: none;
}

.main-view {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--bg-app);
}

.main-view:focus-visible {
  outline-offset: -3px;
}

.home-view,
.browse-view,
.welcome-view,
.utility-view {
  width: min(1180px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
}

.welcome-hero,
.home-hero,
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 230px;
  align-items: end;
  padding: clamp(26px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 30%, rgba(88, 101, 242, 0.42), transparent 32%),
    radial-gradient(circle at 8% 94%, rgba(0, 168, 252, 0.13), transparent 36%),
    linear-gradient(135deg, #25283e 0%, #2b2d31 52%, #232428 100%);
  box-shadow: var(--shadow-medium);
}

.welcome-hero::before,
.home-hero::before,
.hero::before {
  position: absolute;
  z-index: -1;
  top: -45%;
  right: -10%;
  width: 270px;
  height: 270px;
  border: 38px solid rgba(255, 255, 255, 0.035);
  border-radius: 50%;
  content: "";
}

.hero-copy {
  max-width: 650px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.16);
  color: #c9cdfc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title,
.welcome-hero h1,
.home-hero h1 {
  max-width: 720px;
  color: #fff;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.hero-description,
.welcome-hero p,
.home-hero p {
  max-width: 610px;
  margin-top: 12px;
  color: #b5bac1;
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.hero-actions .button {
  min-height: 40px;
  padding-right: 17px;
  padding-left: 17px;
}

.content-section,
.home-section,
.browse-section,
.section {
  margin-top: 36px;
}

.section-heading,
.content-section__heading,
.home-section__heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 13px;
}

.section-heading > div,
.content-section__heading > div,
.home-section__heading > div {
  min-width: 0;
  flex: 1 1 auto;
}

.section-heading h2,
.content-section__heading h2,
.home-section__heading h2,
.section-title {
  color: var(--text-header);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.012em;
}

.section-heading p,
.content-section__heading p,
.home-section__heading p,
.section-description {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 13px;
}

.section-link {
  color: var(--text-link);
  font-size: 13px;
  font-weight: 600;
}

.section-link:hover {
  text-decoration: underline;
}

.game-grid,
.tile-grid,
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.game-card,
.game-tile,
.browse-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-normal);
  text-align: left;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
  transition:
    border-color var(--duration-normal) var(--ease-standard),
    background-color var(--duration-normal) var(--ease-standard),
    box-shadow var(--duration-normal) var(--ease-standard),
    transform var(--duration-normal) var(--ease-emphasized);
}

.game-card:hover,
.game-tile:hover,
.browse-card:hover {
  z-index: 1;
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.game-card:active,
.game-tile:active,
.browse-card:active {
  transform: translateY(0);
}

.game-card__art,
.game-card__cover,
.game-thumb,
.tile-art {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 25%, rgba(88, 101, 242, 0.42), transparent 28%),
    linear-gradient(145deg, #232428, #1e1f22);
  color: rgba(255, 255, 255, 0.75);
  font-size: 34px;
}

.game-card__art img,
.game-card__cover img,
.game-thumb img,
.tile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms var(--ease-emphasized);
}

.game-card:hover .game-card__art img,
.game-card:hover .game-card__cover img,
.game-tile:hover .game-thumb img,
.browse-card:hover .tile-art img {
  transform: scale(1.035);
}

.game-card__overlay,
.game-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(17, 18, 20, 0.28);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-standard);
}

.game-card__overlay > span,
.game-card__play > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: scale(0.9);
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.32);
  transition: transform var(--duration-normal) var(--ease-emphasized);
}

.game-card:hover .game-card__overlay,
.game-card:hover .game-card__play,
.game-tile:hover .game-card__overlay,
.browse-card:hover .game-card__overlay {
  opacity: 1;
}

.game-card:hover .game-card__overlay > span,
.game-card:hover .game-card__play > span {
  transform: scale(1);
}

.game-card__body,
.game-card__meta,
.tile-copy {
  min-width: 0;
  padding: 12px 13px 13px;
}

.game-card__title,
.game-title,
.tile-title {
  overflow: hidden;
  color: var(--text-normal);
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__subtitle,
.game-category,
.tile-subtitle {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-card__favorite,
.card-favorite {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 18, 20, 0.75);
  color: #dbdee1;
  font-size: 12px;
  opacity: 0;
  backdrop-filter: blur(3px);
  transition:
    color var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.game-card:hover .game-card__favorite,
.game-card:focus-within .game-card__favorite,
.game-card__favorite.is-favorite,
.game-card__favorite[aria-pressed="true"],
.card-favorite.is-favorite {
  opacity: 1;
}

.game-card__favorite:hover,
.game-card__favorite.is-favorite,
.game-card__favorite[aria-pressed="true"],
.card-favorite.is-favorite {
  color: var(--yellow);
}

.jump-grid,
.server-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.jump-card,
.server-jump {
  display: flex;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-normal);
  text-align: left;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard);
}

.jump-card:hover,
.server-jump:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.jump-card__icon,
.server-jump__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: #aeb4ff;
  font-size: 17px;
}

.jump-card__copy,
.server-jump__copy {
  min-width: 0;
  flex: 1;
}

.jump-card__copy strong,
.server-jump__copy strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jump-card__copy span,
.server-jump__copy span {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.empty-state,
.content-empty,
.no-results {
  display: grid;
  min-height: min(480px, 65vh);
  place-items: center;
  padding: 36px 20px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state__inner,
.empty-state > div,
.content-empty > div,
.no-results > div {
  max-width: 420px;
}

.empty-state__icon,
.empty-state .empty-icon,
.content-empty .empty-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 24px;
  background: var(--bg-sidebar);
  color: var(--text-faint);
  font-size: 28px;
}

.empty-state h2,
.content-empty h2,
.no-results h2 {
  color: var(--text-header);
  font-size: 19px;
  font-weight: 750;
}

.empty-state p,
.content-empty p,
.no-results p {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.5;
}

.empty-state .button,
.content-empty .button,
.no-results .button {
  margin-top: 17px;
}

.utility-content,
.announcement-content,
.tips-content {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 66px);
}

.utility-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 24px;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  box-shadow: 0 12px 30px rgba(18, 22, 58, 0.28);
}

.utility-content h1 {
  color: var(--text-header);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.utility-content > p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.message-list,
.announcement-list,
.tips-list {
  display: grid;
  gap: 2px;
  margin-top: 32px;
}

.message-row,
.announcement-row,
.tip-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
}

.message-row:hover,
.announcement-row:hover,
.tip-row:hover {
  background: rgba(4, 4, 5, 0.08);
}

.message-avatar {
  width: 40px;
  height: 40px;
  font-size: 15px;
}

.message-head {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.message-author {
  color: var(--text-normal);
  font-size: 14px;
  font-weight: 700;
}

.message-time {
  color: var(--text-faint);
  font-size: 10px;
}

.message-body {
  margin-top: 2px;
  color: #dbdee1;
  font-size: 14px;
  line-height: 1.5;
}

.game-stage,
.game-view,
.stage-view {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #17181a;
}

.game-frame-shell,
.game-stage__frame,
.stage-frame,
.iframe-shell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #111214;
}

.game-frame,
.game-iframe,
.game-stage iframe,
.stage-frame iframe,
.iframe-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.game-stage.is-fullscreen,
.game-stage:fullscreen,
.game-stage:-webkit-full-screen,
.game-frame-shell:fullscreen,
.game-frame-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.stage-loading,
.game-loader,
.game-stage__loading,
.stage-error,
.game-error,
.game-stage__error {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at center, rgba(88, 101, 242, 0.09), transparent 38%),
    #17181a;
  color: var(--text-muted);
  text-align: center;
}

.stage-loading[hidden],
.game-loader[hidden],
.game-stage__loading[hidden],
.stage-error[hidden],
.game-error[hidden],
.game-stage__error[hidden] {
  display: none;
}

.stage-loading__inner,
.game-loader__inner,
.stage-error__inner,
.game-error__inner {
  max-width: 440px;
}

.stage-loading h2,
.game-loader h2,
.stage-error h2,
.game-error h2 {
  margin-top: 15px;
  color: var(--text-header);
  font-size: 18px;
  font-weight: 750;
}

.stage-loading p,
.game-loader p,
.stage-error p,
.game-error p {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
}

.stage-error .error-icon,
.game-error .error-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  margin: auto;
  border-radius: 22px;
  background: rgba(242, 63, 67, 0.13);
  color: var(--red);
  font-size: 25px;
}

.stage-error__actions,
.game-error__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.loading-spinner,
.spinner {
  width: 38px;
  height: 38px;
  margin: auto;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(79, 84, 92, 0.24);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.06),
    transparent
  );
  content: "";
  animation: skeleton-sweep 1.35s infinite;
}

.catalog-loading {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
}

.catalog-loading .blink-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: auto;
  border-radius: 19px;
  background: var(--brand);
  color: #fff;
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(24, 27, 64, 0.35);
}

.catalog-loading p {
  margin-top: 14px;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .game-grid,
  .tile-grid,
  .browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  }

  .content-header .members-toggle,
  .content-header [data-action="toggle-members"] {
    display: inline-grid;
  }
}

@media (max-width: 900px) {
  .content-header .mobile-only,
  .content-header .channels-toggle,
  .content-header [data-action="toggle-channels"] {
    display: inline-grid;
  }

  .content-header__topic,
  .channel-topic,
  .content-header__divider,
  .header-divider {
    display: none;
  }

  .home-view,
  .browse-view,
  .welcome-view,
  .utility-view {
    padding: 24px;
  }

  .welcome-hero,
  .home-hero,
  .hero {
    min-height: 210px;
    padding: 28px;
  }
}

@media (max-width: 620px) {
  .content-header {
    gap: 6px;
    padding: 0 9px;
  }

  .content-header .icon-button {
    width: 30px;
  }

  .content-header__actions .hide-small,
  .header-actions .hide-small {
    display: none;
  }

  .home-view,
  .browse-view,
  .welcome-view,
  .utility-view {
    padding: 16px;
  }

  .welcome-hero,
  .home-hero,
  .hero {
    min-height: 230px;
    padding: 23px;
    border-radius: var(--radius-lg);
  }

  .hero-title,
  .welcome-hero h1,
  .home-hero h1 {
    font-size: 29px;
  }

  .game-grid,
  .tile-grid,
  .browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .game-card__body,
  .game-card__meta,
  .tile-copy {
    padding: 9px 10px 11px;
  }

  .game-card__favorite,
  .card-favorite {
    opacity: 1;
  }

  .jump-grid,
  .server-jump-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .content-section__heading,
  .home-section__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 400px) {
  .game-grid,
  .tile-grid,
  .browse-grid {
    grid-template-columns: 1fr;
  }
}
