:root {
  --bg: #f8f3ff;
  --glass: rgba(255, 251, 255, 0.94);
  --glass-border: rgba(198, 178, 230, 0.55);
  --text: #3d3552;
  --muted: #7a7094;
  --accent: #b28de6;
  --twitch: #b494e8;
  --twitch-hover: #a480de;
  --shadow: 0 8px 24px rgba(84, 62, 126, 0.16);
  font-family: "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 8%, rgba(255, 200, 234, 0.45) 0%, rgba(248, 243, 255, 0) 34%),
    radial-gradient(circle at 86% 15%, rgba(198, 229, 255, 0.42) 0%, rgba(248, 243, 255, 0) 31%),
    linear-gradient(168deg, #fff7fc, #f8f3ff 52%, #f1f7ff);
}

a { color: inherit; }

.page {
  width: min(1150px, 94%);
  margin: 0 auto;
  padding-bottom: 28px;
}

.glass-nav {
  position: sticky;
  top: 12px;
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  z-index: 10;
}

.nav-brand-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.7px;
  font-size: 1.25rem;
  color: #7d61b4;
  text-shadow: 0 0 10px rgba(198, 178, 230, 0.55);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
}

nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}

nav a {
  text-decoration: none;
  color: #5f4e84;
  font-weight: 600;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(198, 178, 230, 0.55);
  background: rgba(255, 251, 255, 0.93);
}

nav a.active, nav a:hover {
  color: #ffffff;
  border-color: rgba(178, 141, 230, 0.95);
  background: linear-gradient(120deg, #b28de6, #f3a8cf);
}

.card {
  margin-top: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.card.portal-news-section {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--glass-border));
}

.home-hero {
  text-align: center;
  padding: 16px 12px;
}

.home-hero h1 {
  margin-bottom: 4px;
  font-size: 2rem;
  letter-spacing: 0.3px;
}

.home-screen {
  padding: 14px 12px;
}

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

.app-icon {
  text-decoration: none;
  color: #5b4b7f;
  background: rgba(255, 251, 255, 0.95);
  border: 1px solid rgba(198, 178, 230, 0.6);
  border-radius: 14px;
  min-height: 88px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 10px 6px;
  box-shadow: 0 8px 14px rgba(122, 104, 163, 0.15);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.app-icon i {
  font-size: 1.4rem;
}

.app-icon span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a7094;
}

.app-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 18px rgba(24, 31, 41, 0.12);
}

.app-news i { color: #a9c2f5; }
.app-clips i { color: #a994e6; }
.app-vods i { color: #8ebde8; }
.app-emotes i { color: #f0a6d1; }
.app-youtube i { color: #ffb4ba; }
.app-live i { color: #9edecf; }
.app-community i { color: #c5a7f0; }
.app-merch i { color: #f2c9a1; }

h1, h2, h3 { margin-top: 0; margin-bottom: 8px; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }
p, .hint { color: var(--muted); }

.media-card h3 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.item-title i {
  color: var(--accent);
  font-size: 0.9em;
  flex: 0 0 auto;
}

.item-subtitle {
  margin: 0;
}

.media-card .media-title {
  margin-bottom: 2px;
}

.media-card .media-meta {
  margin: 0;
  line-height: 1.25;
  font-size: 0.82rem;
}

.portal-card .media-title {
  margin-bottom: 2px;
}

.portal-card .media-meta {
  margin: 0;
  line-height: 1.25;
  font-size: 0.82rem;
}

.portal-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 6px;
}

.portal-section-heading h2 {
  margin: 0;
}

.card .portal-section-heading {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 0;
}

.card .portal-section-heading::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #243245;
}

.card .portal-section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 52px;
  height: 2px;
  background: var(--accent);
  z-index: 1;
}

.portal-section-more {
  font-size: 0.94rem;
  font-weight: 700;
  color: #7d61b4;
  text-decoration: none;
  white-space: nowrap;
}

.portal-section-more:hover {
  text-decoration: underline;
}

.portal-news-grid {
  align-items: stretch;
}

.portal-news-section .portal-news-card {
  position: relative;
  min-height: 152px;
  display: flex;
  flex-direction: column;
  padding: 9px;
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--accent) 14%, white) 0%,
    rgba(255, 251, 255, 0.98) 42%,
    rgba(255, 251, 255, 0.95) 100%
  );
}

.portal-news-section .portal-news-card .news-card-tagline {
  align-self: flex-start;
  margin: 0 0 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, white);
  color: color-mix(in srgb, var(--accent) 55%, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--glass-border));
}

.portal-news-section .portal-news-card .media-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.22;
}

.portal-news-section .portal-news-card .media-meta {
  font-weight: 650;
  color: color-mix(in srgb, var(--accent) 35%, var(--muted));
}

.portal-news-section .portal-news-card .news-card-teaser {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid color-mix(in srgb, var(--glass-border) 85%, transparent);
  color: var(--muted);
  -webkit-line-clamp: 3;
}

.news-index-grid {
  align-items: stretch;
}

.news-index-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.news-card-byline {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.news-card-tagline {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 4px;
}

.news-card-teaser {
  margin: 6px 0 0;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-edit {
  width: 100%;
}

.news-article-page .news-article-back {
  margin: 0 0 14px;
}

.news-article-page .news-article-back a {
  text-decoration: none;
  font-weight: 650;
  color: var(--muted);
}

.news-article-page .news-article-back a:hover {
  color: var(--text);
}

.news-article-tag {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.news-article-title {
  margin: 0 0 10px;
  font-size: 1.55rem;
  line-height: 1.22;
}

.news-article-masthead {
  margin: 0 0 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(198, 178, 230, 0.45);
}

.news-article-byline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.news-article-byline {
  color: var(--text);
  font-weight: 500;
}

.news-article-meta-sep {
  color: rgba(120, 108, 140, 0.65);
  user-select: none;
}

.news-article-dateline {
  font-weight: 500;
  color: var(--muted);
}

.news-article-body {
  font-size: 1.02rem;
  line-height: 1.58;
  color: var(--text);
}

.news-article-prose {
  margin: 0;
  padding: 18px 0 6px;
}

.news-article-reactions {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(198, 178, 230, 0.38);
}

.news-article-subsection-title {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.news-article-vote-rail {
  margin-top: 0;
}

.news-byline-handle {
  font-weight: 600;
  opacity: 0.78;
}

.news-article-page .yt-main {
  gap: 20px;
}

.news-article-comments.yt-comments {
  margin-top: 0;
}

.news-article-body .inline-emote {
  vertical-align: -0.22em;
}

.news-article-layout-wrap .news-article-shell {
  align-items: start;
}

.news-article-panel {
  padding: 16px 18px;
}

.news-author-profile-link {
  font-weight: 650;
  text-decoration: none;
  color: #7d61b4;
}

.news-author-profile-link:hover {
  text-decoration: underline;
}

.news-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.news-sidebar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(198, 178, 230, 0.45);
  background: transparent;
  transition: border-color 0.12s ease;
}

.news-sidebar-item:hover {
  border-color: rgba(178, 141, 230, 0.85);
}

.news-sidebar-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.news-sidebar-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.28;
}

.news-sidebar-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.portal-merch-lead {
  margin: 0 0 10px;
}

.grid { display: grid; gap: 8px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.media-card, .news-item, .emote-card, .forum-card, .portal-card {
  background: rgba(255, 251, 255, 0.95);
  border: 1px solid rgba(198, 178, 230, 0.58);
  border-radius: 12px;
  padding: 9px;
}

.clip-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.clip-card-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(84, 62, 126, 0.1);
}

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

.stat {
  background: rgba(255, 251, 255, 0.95);
  border: 1px solid rgba(198, 178, 230, 0.58);
  border-radius: 12px;
  padding: 9px;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-pill.running {
  background: rgba(164, 224, 205, 0.45);
  color: #3f5f57;
}

.status-pill.paused {
  background: rgba(236, 205, 255, 0.56);
  color: #634a7b;
}

.media-card img:not(.fanart-thumb), .portal-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.live-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }

.live-frame, .chat-frame {
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 500px;
  background: #000;
}

.youtube-frame, .modal-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
  background: #000;
}

.merch-frame {
  width: 100%;
  min-height: 72vh;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
}

.action-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

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

.action-btn {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(191, 160, 232, 0.72);
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.action-btn.secondary {
  background: rgba(244, 236, 255, 0.95);
  color: #5f4e84;
}

.action-btn.secondary:hover { background: rgba(234, 220, 252, 0.95); }

.action-btn.twitch {
  background: var(--twitch);
  color: #fff;
}

.action-btn.twitch:hover { background: var(--twitch-hover); }

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

.social-btn {
  text-decoration: none;
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid rgba(198, 178, 230, 0.6);
  background: linear-gradient(120deg, rgba(255, 249, 255, 0.96), rgba(244, 239, 255, 0.96));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.social-btn.merch {
  background: linear-gradient(120deg, #ffe7ce, #ffd8e8);
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(30, 37, 49, 0.14);
  filter: saturate(1.03);
}

.social-icon {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(210, 192, 238, 0.34);
  font-size: 0.8rem;
  line-height: 1;
}

.platform-twitch {
  background: linear-gradient(120deg, #d5bef9, #bfa1f1);
  border-color: #a983e5;
  color: #ffffff;
}

.platform-twitter {
  background: linear-gradient(120deg, #bedfff, #9fc8f5);
  border-color: #7fb0eb;
  color: #ffffff;
}

.platform-youtube {
  background: linear-gradient(120deg, #ffc4cc, #ffadb7);
  border-color: #f2909f;
  color: #ffffff;
}

.platform-tiktok {
  background: linear-gradient(120deg, #d6f6ef, #bceadd);
  border-color: #8fd0bf;
  color: #ffffff;
}

.platform-discord {
  background: linear-gradient(120deg, #d2ccff, #bbb2ff);
  border-color: #9c92ef;
  color: #ffffff;
}

.platform-merch {
  background: linear-gradient(120deg, #ffe0bf, #ffd0dd);
  border-color: #e8b9cc;
  color: #ffffff;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.modal-content {
  position: relative;
  width: min(940px, 92vw);
  background: rgba(255, 251, 255, 0.98);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 11px;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
}

.forum-form { display: grid; gap: 8px; }

.forum-form input, .forum-form textarea {
  border: 1px solid rgba(198, 178, 230, 0.6);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 251, 255, 0.95);
  color: var(--text);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 120px;
  gap: 8px;
  margin: 10px 0;
}

.filter-input,
.filter-select {
  border: 1px solid rgba(198, 178, 230, 0.6);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 251, 255, 0.95);
  color: var(--text);
  font: inherit;
  width: 100%;
  min-width: 0;
}

.pagination-bar {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

.pagination-info-right {
  text-align: right;
}

.clip-detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
}

.clip-player-wrap {
  display: grid;
  gap: 8px;
}

.yt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr);
  gap: 12px;
  align-items: start;
}

.yt-main {
  display: grid;
  gap: 8px;
}

/* ===== Media detail pages (clip / broadcast / GIF) ===== */
.media-detail-page .yt-main {
  gap: 14px;
}

.media-player-shell {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(84, 62, 126, 0.22);
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.22);
}

.media-player-shell .media-player-frame {
  border-radius: 0;
}

.media-player-shell--gif {
  background: rgba(0, 0, 0, 0.5);
}

.media-player-shell--gif .gif-detail-player.media-player-frame {
  aspect-ratio: auto;
  min-height: min(60vh, 520px);
}

.media-broadcast-open {
  display: block;
  text-decoration: none;
  color: inherit;
}

.media-broadcast-preview {
  position: relative;
  overflow: hidden;
}

.media-broadcast-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-broadcast-preview-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.84) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.media-detail-panel {
  padding: 16px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.media-detail-title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text);
}

.media-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
}

.media-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.media-meta-item > i {
  color: var(--accent);
  opacity: 0.92;
  width: 1.15em;
  text-align: center;
}

.media-meta-text {
  color: var(--text);
}

.media-creator-attribution-root.media-meta-text {
  color: var(--muted);
}

.media-creator-attribution {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.media-creator-prefix {
  color: var(--muted);
  font-weight: 500;
}

.media-creator-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  min-width: 0;
}

.media-creator-profile-link:not(.media-creator-profile-link--static):hover .media-creator-name {
  text-decoration: underline;
}

.media-creator-profile-link--static {
  pointer-events: none;
  cursor: default;
  color: var(--text);
}

.media-creator-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(198, 178, 230, 0.45);
}

.media-creator-name {
  font-weight: 650;
  color: var(--text);
}

.news-byline-with-avatar {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.news-byline-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.news-byline-avatar {
  width: 32px;
  height: 32px;
}

.news-byline-text-inline {
  font-weight: 600;
  color: var(--text);
}

.news-byline-profile:hover .news-byline-name {
  text-decoration: underline;
}

.media-vote-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.media-vote-segment {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px;
  background: transparent;
  border: 1px solid var(--glass-border);
  gap: 4px;
  align-self: flex-start;
  max-width: 100%;
  flex-wrap: wrap;
}

.media-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-width: 0;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.media-vote-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.media-vote-btn:not(:disabled):hover {
  background: rgba(178, 141, 230, 0.1);
}

.media-vote-btn--like i {
  color: #28b463;
}

.media-vote-btn--dislike i {
  color: #e74c3c;
}

.media-vote-label {
  font-weight: 600;
}

.media-vote-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(61, 53, 82, 0.14);
  color: var(--muted);
  min-width: 2em;
  text-align: center;
}

.media-vote-btn.vote-active-like .media-vote-num {
  background: transparent;
  border-color: rgba(46, 204, 113, 0.45);
  color: #1e8449;
}

.media-vote-btn.vote-active-dislike .media-vote-num {
  background: transparent;
  border-color: rgba(255, 76, 96, 0.45);
  color: #c0392b;
}

.media-vote-hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 500;
}

.media-vote-hint.vote-state {
  font-weight: 600;
}

.media-section-heading {
  margin: 0 0 10px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-section-heading i {
  color: var(--accent);
}

.media-comments-card {
  margin-top: 4px;
}

.media-sidebar-heading {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 800;
}

.clip-header-block {
  display: grid;
  gap: 2px;
}

#clipTitle {
  margin-bottom: 0;
  line-height: 1.2;
}

#clipCreatorLine {
  margin-top: -2px;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

#vodTitle {
  margin-bottom: 0;
  line-height: 1.2;
}

#vodStreamerLine {
  margin-top: -2px;
  margin-bottom: 2px;
  font-size: 0.9rem;
}

.yt-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
  position: sticky;
  top: 96px;
}

.card-surface {
  background: rgba(255, 251, 255, 0.9);
  border: 1px solid rgba(198, 178, 230, 0.45);
  border-radius: 12px;
  padding: 10px;
}

.yt-comments {
  margin-top: 6px;
}

.clip-similar-list {
  display: grid;
  gap: 8px;
}

.clip-similar-item {
  background: rgba(255, 251, 255, 0.95);
  border: 1px solid rgba(198, 178, 230, 0.58);
  border-radius: 12px;
  padding: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.clip-similar-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(84, 62, 126, 0.1);
}

.clip-similar-main {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 8px;
  text-decoration: none;
  margin-bottom: 6px;
}

.clip-similar-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.clip-similar-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}

.clip-similar-text {
  min-width: 0;
}

.clip-similar-title {
  margin: 0 0 4px;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clip-similar-text p {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.gifs-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.gifs-filter-bar {
  grid-template-columns: minmax(0, 1fr) 180px 170px 130px;
}

.gif-card {
  display: grid;
  gap: 4px;
  align-content: start;
}

.gif-card .media-title {
  margin: 2px 0 0 !important;
  line-height: 1.15;
}

.gif-card .media-meta {
  margin: 0 !important;
  line-height: 1.1;
  font-size: 0.78rem;
}

.gif-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.gif-card .gif-thumb {
  width: 100%;
  height: 100% !important;
  object-fit: cover !important;
  image-rendering: pixelated;
  display: block;
}

.fanarts-index .fanart-filter-bar {
  margin: 6px 0 8px;
}

.fanarts-index .pagination-bar {
  margin-top: 8px;
}

.fanarts-lead {
  margin-bottom: 6px;
}

.fanart-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.fanart-filter-bar {
  grid-template-columns: minmax(0, 1fr) 180px 170px 130px;
}

.fanart-card {
  display: grid;
  gap: 4px;
  align-content: start;
}

.fanart-card .media-title {
  margin: 2px 0 0 !important;
  line-height: 1.15;
}

.fanart-card .media-meta {
  margin: 0 !important;
  line-height: 1.1;
  font-size: 0.78rem;
}

.fanart-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 251, 255, 0.75);
  border: 1px solid rgba(198, 178, 230, 0.5);
  line-height: 0;
}

.fanart-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-detail-page--fanart .yt-main {
  gap: 6px;
}

.media-detail-page--fanart .media-detail-panel {
  padding: 10px 14px;
}

.media-detail-page--fanart .media-detail-title {
  margin-bottom: 4px;
}

.media-meta-grid--fanart {
  margin-bottom: 10px;
  gap: 6px 12px;
}

.media-player-shell--fanart-detail {
  background: rgba(0, 0, 0, 0.18);
}

.media-player-shell--fanart-detail .fanart-detail-player {
  line-height: 0;
}

.fanart-detail-player {
  display: block;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  aspect-ratio: auto !important;
  height: auto !important;
}

.fanart-detail-image {
  width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.clip-similar-main.fanart-similar-main {
  grid-template-columns: 100px minmax(0, 1fr);
}

.fanart-similar-thumb {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gif-detail-player {
  display: block;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  aspect-ratio: auto !important;
  height: auto !important;
}

.gif-detail-image {
  width: 100%;
  height: auto;
  object-fit: contain !important;
  image-rendering: pixelated !important;
  display: block;
}

@media (min-width: 1800px) {
  :root { font-size: 15px; }
  .page { width: min(1700px, 92%); }
  .grid.three { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .yt-layout { grid-template-columns: minmax(0, 2.15fr) minmax(360px, 1fr); }
}

@media (min-width: 2560px) {
  :root { font-size: 16px; }
  .page { width: min(2200px, 90%); }
  .yt-layout { grid-template-columns: minmax(0, 2.3fr) minmax(420px, 1fr); }
  .clip-similar-main { grid-template-columns: 180px minmax(0, 1fr); }
}

.merch-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}

.merch-select,
.merch-variant-select,
.merch-qty-input {
  border: 1px solid rgba(198, 178, 230, 0.6);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 251, 255, 0.95);
  color: var(--text);
  font: inherit;
}

.merch-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid rgba(198, 178, 230, 0.6);
  border-radius: 10px;
  background: rgba(255, 251, 255, 0.92);
}

.merch-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.merch-price {
  font-weight: 700;
}

.merch-variant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 6px;
  align-items: center;
}

.merch-variant-select {
  width: 100%;
  min-width: 0;
}

.merch-qty-input {
  width: 100%;
  max-width: 74px;
  min-width: 0;
  text-align: center;
  justify-self: end;
}

/* Merch product detail (merch-item.php) */
.merch-detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}

.merch-bc-sep {
  opacity: 0.55;
}

.merch-detail-cart {
  margin-bottom: 14px;
}

.merch-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 6px;
}

.merch-detail-gallery {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 14px;
}

.merch-detail-main-wrap {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 251, 255, 0.65);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

.merch-detail-main {
  width: 100%;
  display: block;
  max-height: min(70vh, 600px);
  object-fit: contain;
  background: #fff;
}

.merch-detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merch-detail-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 251, 255, 0.95);
  line-height: 0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.merch-detail-thumb img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  display: block;
}

.merch-detail-thumb.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(178, 141, 230, 0.55);
}

.merch-detail-price {
  font-size: 1.12rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.merch-detail-badge {
  margin: 0 0 10px;
  font-weight: 700;
}

.merch-detail-variant-row {
  margin-bottom: 10px;
  max-width: 420px;
}

.merch-detail-actions {
  margin-bottom: 6px;
  max-width: 420px;
}

.merch-detail-actions.action-row {
  grid-template-columns: 1fr;
}

.merch-official-link {
  margin: 4px 0 14px;
}

.merch-store-link-wrap {
  margin-top: 6px;
  margin-bottom: 0;
}

.merch-detail-body,
.merch-detail-prose {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text);
}

.merch-detail-body p,
.merch-detail-prose p {
  margin: 0 0 10px;
}

.merch-detail-body img,
.merch-detail-prose img,
.merch-size-preview {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.merch-detail-body.merch-detail-html iframe,
.merch-detail-prose iframe {
  max-width: 100%;
}

.merch-detail-body.merch-detail-html ul,
.merch-detail-body.merch-detail-html ol,
.merch-detail-prose ul,
.merch-detail-prose ol {
  margin: 0 0 12px;
  padding-left: 1.35em;
}

.merch-detail-body.merch-detail-html li,
.merch-detail-prose li {
  margin-bottom: 4px;
}

.merch-detail-body.merch-detail-html a,
.merch-detail-prose a {
  color: #7d61b4;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.merch-detail-body.merch-detail-html h2,
.merch-detail-body.merch-detail-html h3,
.merch-detail-body.merch-detail-html h4,
.merch-detail-prose h2,
.merch-detail-prose h3,
.merch-detail-prose h4 {
  margin: 16px 0 8px;
  font-size: 1.06rem;
  line-height: 1.25;
}

.merch-detail-body.merch-detail-html h2:first-child,
.merch-detail-body.merch-detail-html h3:first-child,
.merch-detail-prose h2:first-child {
  margin-top: 0;
}

.merch-detail-body.merch-detail-html blockquote,
.merch-detail-prose blockquote {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-left: 3px solid rgba(178, 141, 230, 0.65);
  background: rgba(255, 251, 255, 0.65);
  border-radius: 0 8px 8px 0;
}

.merch-detail-body.merch-detail-html table,
.merch-detail-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.merch-detail-body.merch-detail-html th,
.merch-detail-body.merch-detail-html td,
.merch-detail-prose th,
.merch-detail-prose td {
  border: 1px solid rgba(198, 178, 230, 0.55);
  padding: 6px 8px;
  text-align: left;
}

.merch-detail-body.merch-detail-html hr,
.merch-detail-prose hr {
  border: 0;
  border-top: 1px solid rgba(198, 178, 230, 0.5);
  margin: 14px 0;
}

.merch-detail-extra {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.merch-detail-extra-block {
  padding-top: 12px;
  border-top: 1px solid rgba(198, 178, 230, 0.45);
}

.merch-detail-extra-title {
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.merch-detail-sizeguide {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(198, 178, 230, 0.45);
}

.merch-sizeguide-desc {
  margin-top: 10px;
}

.merch-size-preview {
  display: block;
  margin-top: 8px;
  border: 1px solid var(--glass-border);
}

@media (max-width: 900px) {
  .merch-detail-layout {
    grid-template-columns: 1fr;
  }

  .merch-detail-gallery {
    position: static;
  }
}

.forum-posts { margin-top: 8px; display: grid; gap: 8px; }

.emote-card { text-align: center; }
.emote-card img { width: 64px; height: 64px; }

@media (max-width: 980px) {
  .grid.three, .grid.four, .social-grid, .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav-brand-row {
    justify-content: center;
    padding-right: 44px;
  }
  .nav-toggle {
    display: inline-block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  nav { display: none; width: 100%; }
  nav.open { display: flex; }
  .grid.two, .grid.three, .grid.four, .social-grid, .action-row, .stat-grid { grid-template-columns: 1fr; }
  .live-frame, .chat-frame { min-height: 360px; }
  .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 1fr; }
  .pagination-bar { justify-items: stretch; }
  .pagination-buttons { width: 100%; }
  .pagination-buttons .action-btn { flex: 1 1 0; }
  .pagination-info-right { text-align: left; }
  .clip-detail-grid { grid-template-columns: 1fr; }
  .yt-layout { grid-template-columns: 1fr; }
  .yt-sidebar { position: static; }
  .clip-similar-main { grid-template-columns: 1fr; }
  .merch-controls { grid-template-columns: 1fr; }
  .merch-cart { flex-direction: column; align-items: stretch; }
}

/* ===== Multimedia News Theme Override ===== */
:root {
  --bg: #f3f5f8;
  --glass: #ffffff;
  --glass-border: #d7dee8;
  --text: #121822;
  --muted: #556274;
  --accent: #c61f2b;
  --twitch: #1d5bbf;
  --twitch-hover: #174c9f;
  --shadow: 0 10px 24px rgba(17, 23, 32, 0.08);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
}

body {
  background:
    linear-gradient(180deg, #f3f5f8 0%, #eef2f6 55%, #edf1f5 100%);
}

.page {
  width: min(1360px, 94%);
}

.glass-nav {
  top: 0;
  margin-top: 0;
  border-radius: 0;
  border: 0;
  border-bottom: 3px solid #0f1620;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(12, 18, 28, 0.1);
  padding: 10px 0 12px;
}

.nav-brand-row {
  border-bottom: 1px solid #e1e7ef;
  margin: 0 12px 8px;
  padding: 0 0 8px;
}

.brand {
  color: #0f1620;
  text-shadow: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 900;
}

nav {
  gap: 6px;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 0 12px;
}

nav a {
  background: #f5f7fa;
  border: 1px solid #d8e0ea;
  color: #293648;
  border-radius: 999px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

nav a.active,
nav a:hover {
  background: #0f1620;
  color: #ffffff;
  border-color: #0f1620;
}

.card {
  border-radius: 12px;
  border: 1px solid #d7dee8;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card.portal-news-section {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--glass-border));
}

.home-hero {
  background: linear-gradient(120deg, #0f1620, #253347);
  border-color: #0f1620;
}

.home-hero h1,
.home-hero p {
  color: #ffffff;
}

.home-screen {
  background: #f8fafc;
}

.app-icon {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  color: #1f2a3a;
  box-shadow: 0 4px 12px rgba(14, 21, 32, 0.06);
}

.app-icon span {
  color: #4f5f75;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.media-card,
.news-item,
.emote-card,
.forum-card,
.portal-card,
.clip-similar-item,
.stat {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(20, 30, 44, 0.05);
}

h1, h2, h3 {
  color: #121822;
}

h1 {
  font-size: 1.55rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
}

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

.action-btn {
  border: 1px solid #cad5e3;
  border-radius: 8px;
  font-weight: 700;
}

.action-btn.secondary {
  background: #f4f7fb;
  color: #1f2c40;
}

.action-btn.secondary:hover {
  background: #e9eef5;
}

.action-btn.twitch {
  background: #0f1620;
  border-color: #0f1620;
  color: #ffffff;
}

.action-btn.twitch:hover {
  background: #1d2a3a;
}

.social-btn {
  border: 1px solid #d7dee8;
  background: #f8fafc;
  color: #1f2b3d;
}

.social-btn:hover {
  box-shadow: 0 8px 16px rgba(15, 22, 32, 0.12);
}

.platform-twitch,
.platform-twitter,
.platform-youtube,
.platform-tiktok,
.platform-discord,
.platform-merch {
  color: #ffffff;
}

.platform-twitch { background: linear-gradient(120deg, #6f42c1, #58359b); border-color: #5a379f; }
.platform-twitter { background: linear-gradient(120deg, #111111, #2a2a2a); border-color: #1d1d1d; }
.platform-youtube { background: linear-gradient(120deg, #d91523, #b10f1b); border-color: #a30d18; }
.platform-tiktok { background: linear-gradient(120deg, #00a8a8, #067e7e); border-color: #066d6d; }
.platform-discord { background: linear-gradient(120deg, #5865f2, #4853cb); border-color: #444ebc; }
.platform-merch { background: linear-gradient(120deg, #2a6f3a, #20572d); border-color: #1d4f29; }

.filter-input,
.filter-select,
.forum-form input,
.forum-form textarea,
.merch-select,
.merch-variant-select,
.merch-qty-input {
  background: #ffffff;
  border: 1px solid #ccd6e5;
  color: #1b2638;
}

.filter-bar {
  background: #f7f9fc;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  padding: 8px;
}

.pagination-bar {
  justify-content: flex-end;
}

.yt-layout {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  gap: 14px;
}

.yt-sidebar {
  top: 74px;
}

.card-surface {
  background: #f9fbfd;
  border: 1px solid #d7dee8;
}

#clipTitle,
#vodTitle {
  font-size: 1.35rem;
}

#clipCreatorLine,
#vodStreamerLine {
  color: #42536a;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.clip-similar-item:hover,
.clip-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(14, 22, 34, 0.13);
}

.clip-similar-title {
  font-size: 0.9rem;
}

@media (min-width: 1800px) {
  :root { font-size: 16px; }
  .page { width: min(1820px, 92%); }
  .grid.three { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .yt-layout { grid-template-columns: minmax(0, 2.35fr) minmax(360px, 1fr); }
}

@media (min-width: 2560px) {
  :root { font-size: 17px; }
  .page { width: min(2320px, 90%); }
  .grid.three { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .yt-layout { grid-template-columns: minmax(0, 2.55fr) minmax(430px, 1fr); }
  .clip-similar-main { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  .page { width: min(1200px, 95%); }
  .glass-nav { border-radius: 0; }
}

@media (max-width: 760px) {
  .glass-nav {
    padding: 10px 0;
  }
  .nav-brand-row {
    margin: 0 10px 8px;
  }
  nav {
    padding: 0 10px;
  }
  .grid.two,
  .grid.three,
  .grid.four,
  .social-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .yt-layout { grid-template-columns: 1fr; }
  .yt-sidebar { position: static; }
}

/* ===== Dark Multimedia Theme Override ===== */
:root {
  --bg: #0b1118;
  --glass: #111a24;
  --glass-border: #263244;
  --text: #e7edf5;
  --muted: #a9b5c7;
  --accent: #ff495d;
  --twitch: #2b6ad6;
  --twitch-hover: #245bbb;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 73, 93, 0.14) 0%, rgba(11, 17, 24, 0) 32%),
    radial-gradient(circle at 88% 14%, rgba(43, 106, 214, 0.14) 0%, rgba(11, 17, 24, 0) 30%),
    linear-gradient(180deg, #0a1017 0%, #0d141d 55%, #0b1118 100%);
}

.glass-nav {
  background: #0f1722;
  border-bottom-color: #2a3749;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

.nav-brand-row {
  border-bottom-color: #202b3a;
}

.brand {
  color: #f3f6fb;
}

nav a {
  background: #162131;
  border-color: #2a394e;
  color: #c8d4e5;
}

nav a.active,
nav a:hover {
  background: #e84a5e;
  border-color: #e84a5e;
  color: #ffffff;
}

.card,
.media-card,
.news-item,
.emote-card,
.forum-card,
.portal-card,
.clip-similar-item,
.stat,
.card-surface {
  background: #111b27;
  border-color: #27374b;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.home-screen {
  background: #0f1824;
}

.app-icon {
  background: #131e2c;
  border-color: #2a3b50;
  color: #d8e2ef;
}

.app-icon span {
  color: #aebcd0;
}

h1, h2, h3 {
  color: #f2f6fb;
}

p, .hint,
#clipCreatorLine,
#vodStreamerLine,
.clip-similar-text p {
  color: #aab8cb;
}

.filter-bar {
  background: #0f1722;
  border-color: #253245;
}

.filter-input,
.filter-select,
.forum-form input,
.forum-form textarea,
.merch-select,
.merch-variant-select,
.merch-qty-input {
  background: #0f1824;
  border-color: #2b3a4f;
  color: #e4ebf4;
}

.action-btn {
  border-color: #30435d;
}

.action-btn.secondary {
  background: #182333;
  color: #d3ddeb;
}

.action-btn.secondary:hover {
  background: #1d2a3d;
}

.action-btn.twitch {
  background: #2a6ad8;
  border-color: #2a6ad8;
}

.action-btn.twitch:hover {
  background: #255dbe;
}

.home-hero {
  background: linear-gradient(120deg, #121a25, #1f3045);
  border-color: #304157;
}

.clip-card-link:hover,
.clip-similar-item:hover {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.34);
}

/* ===== CMS Frontend Navigation + Editorial polish ===== */
.glass-nav {
  border-radius: 12px;
  border: 1px solid #243246;
  margin-top: 12px;
  top: 10px;
  padding: 10px;
}

.nav-brand-row {
  margin: 0;
  padding: 0 4px 8px;
}

nav {
  justify-content: flex-start;
  gap: 8px;
  padding: 0 4px;
}

nav a {
  padding: 0;
  background: transparent;
  border: 1px solid #2a3a50;
  border-radius: 10px;
}

.nav-link-inner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  min-height: 36px;
  white-space: nowrap;
}

.nav-icon {
  font-size: 0.9rem;
  width: 14px;
  text-align: center;
  opacity: 0.9;
}

.nav-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

nav a:hover,
nav a.active {
  background: #1a2433;
  border-color: #3a4f6f;
}

nav a.active .nav-icon,
nav a.active .nav-label {
  color: #ffffff;
}

.card {
  border-radius: 10px;
}

.card > h1,
.card > h2 {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #243245;
}

.card > h1::before,
.card > h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 52px;
  height: 2px;
  background: var(--accent);
}

.media-card,
.news-item,
.portal-card,
.forum-card,
.emote-card,
.stat {
  border-radius: 8px;
}

@media (max-width: 760px) {
  .nav-link-inner {
    width: 100%;
    justify-content: flex-start;
  }
}

.site-footer {
  margin-top: 18px;
  border: 1px solid #243246;
  border-radius: 12px;
  background: #0f1823;
  padding: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  gap: 14px;
}

.site-footer h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f2f6fb;
}

.site-footer .hint {
  margin: 0;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 10px;
}

.footer-links a {
  text-decoration: none;
  color: #b8c4d4;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-socials a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #31435a;
  border-radius: 8px;
  background: #172233;
  color: #d9e3f0;
  text-decoration: none;
}

.footer-socials a:hover {
  background: #1e2d42;
  color: #ffffff;
}

.footer-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid #223042;
  color: #8ea0b8;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Left Sidebar Navigation (Facebook-like) ===== */
.site-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.content-area {
  min-width: 0;
}

.site-layout .glass-nav {
  position: sticky;
  top: 12px;
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px;
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.site-layout .nav-brand-row {
  justify-content: flex-start;
  padding: 2px 4px 10px;
}

.site-layout nav {
  width: 100%;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  overflow: visible;
  padding: 0 2px;
}

.site-layout nav a {
  width: 100%;
}

.site-layout .nav-link-inner {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 980px) {
  .site-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-layout .glass-nav {
    position: sticky;
    top: 0;
    margin-top: 0;
    max-height: none;
    overflow: visible;
  }

  .site-layout .nav-brand-row {
    justify-content: center;
    padding: 0 4px 8px;
  }

  .site-layout nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    padding: 0 4px;
  }

  .site-layout nav a {
    width: auto;
  }
}

@media (max-width: 760px) {
  .site-layout .nav-brand-row {
    justify-content: center;
    padding-right: 44px;
  }
  .site-layout nav {
    display: none;
    width: 100%;
    flex-direction: column;
    overflow: visible;
  }
  .site-layout nav.open {
    display: flex;
  }
}

/* ===== No Backgrounds / No Borders Override ===== */
/* Note: do not target bare `div` here — it nukes modal panels (.modal-content, .cases-modal, etc.). */
nav,
.glass-nav,
.card,
.media-card,
.news-item,
.emote-card,
.forum-card,
.portal-card,
.clip-similar-item,
.stat,
.card-surface,
.home-screen,
.home-hero,
.site-footer,
.filter-bar,
.merch-cart,
.app-icon,
.social-btn,
.site-layout .glass-nav,
.site-layout nav a,
nav a {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.nav-account-row {
  display: grid;
  gap: 6px;
  margin: 8px 4px 2px;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #d2dced;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.account-pill:hover {
  background: rgba(255, 255, 255, 0.08);
}

.generator-preview {
  min-height: 210px;
  border-radius: 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.generator-preview-square {
  aspect-ratio: 1 / 1;
  min-height: 0;
  width: min(240px, 100%);
}

.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
}

.community-member-link {
  text-decoration: none;
  color: inherit;
}

.community-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.9fr) minmax(180px, 0.9fr);
  gap: 8px;
  margin-bottom: 12px;
}

.community-profile-card {
  display: grid;
  gap: 8px;
  padding: 8px !important;
}

#adminGrid.grid,
#partnerGrid.grid,
#affiliateGrid.grid,
#memberGrid.grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.community-profile-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
}

.community-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-overlay {
  position: absolute;
  bottom: 8px;
  width: clamp(38px, 22%, 56px);
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.community-overlay-left {
  left: 8px;
}

.community-overlay-right {
  right: 8px;
}

.community-user-name {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-user-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.community-user-handle {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.community-user-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.community-pagination {
  margin-top: 12px;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.entry-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.entry-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.entry-body {
  min-width: 0;
}

.entry-time {
  margin: 2px 0 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.entry-author-link {
  color: inherit;
  text-decoration: none;
}

.entry-author-link:hover {
  text-decoration: underline;
}

.entry-body p {
  margin: 4px 0 0;
}

.member-avatar-fallback {
  background: rgba(255, 255, 255, 0.1);
}

.comment-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
}

.profile-comment-delete {
  justify-self: end;
  align-self: start;
}

.profile-comment-delete-icon {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-comment-delete-icon i {
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .community-controls {
    grid-template-columns: 1fr;
  }

  #adminGrid.grid,
  #partnerGrid.grid,
  #affiliateGrid.grid,
  #memberGrid.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .entry-row {
    gap: 8px;
  }

  .entry-main {
    gap: 8px;
  }
}

@media (max-width: 900px) {
  #adminGrid.grid,
  #partnerGrid.grid,
  #affiliateGrid.grid,
  #memberGrid.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  #adminGrid.grid,
  #partnerGrid.grid,
  #affiliateGrid.grid,
  #memberGrid.grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #adminGrid.grid,
  #partnerGrid.grid,
  #affiliateGrid.grid,
  #memberGrid.grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1600px) {
  #adminGrid.grid,
  #partnerGrid.grid,
  #affiliateGrid.grid,
  #memberGrid.grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.interaction-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.action-btn.small {
  font-size: 0.78rem;
  padding: 5px 10px;
  min-height: 30px;
}

.comment-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.forum-form.compact textarea {
  min-height: 56px;
}

.inline-emote {
  width: 1.5em;
  height: 1.5em;
  vertical-align: -0.28em;
  object-fit: contain;
}

.textarea-emote-helper {
  margin-top: 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
}

.textarea-emote-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-top: 2px;
}

.textarea-emote-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(5, 8, 14, 0.45);
}

.textarea-emote-popup[hidden] {
  display: none;
}

.textarea-emote-popup-card {
  position: fixed;
  left: var(--popup-left, 16px);
  top: var(--popup-top, 16px);
  width: min(430px, calc(100vw - 24px));
  max-height: min(70vh, 540px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 22, 34, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.textarea-emote-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.textarea-emote-popup-close {
  border: 0;
  background: transparent;
  color: #f4f8ff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.textarea-emote-grid-popup {
  margin-top: 2px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  max-height: min(46vh, 360px);
}

.textarea-emote-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #f4f8ff;
  cursor: pointer;
}

.textarea-emote-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.textarea-emote-item span {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.reply-item {
  margin-left: 10px;
}

.legacy-app-frame {
  width: 100%;
  min-height: 980px;
  height: 75vh;
  border: 0;
  border-radius: 10px;
  background: #0f1116;
}

.legacy-app-frame-tall {
  min-height: 1200px;
  height: 85vh;
}

.coinflip-frame {
  min-height: 620px;
  height: 68vh;
  background: transparent !important;
}

.smusic-host .app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: transparent !important;
  padding-bottom: 0 !important;
  overflow: visible !important;
}

.smusic-host .sidebar {
  display: none !important;
}

.smusic-host .main-content {
  margin-left: 0;
  min-height: 0;
  background: transparent !important;
  overflow: visible !important;
}

.smusic-host .main-inner {
  padding: 0 20px 20px !important;
  overflow: visible !important;
}

.smusic-host .sidebar-hamburger,
.smusic-host #menu-backdrop {
  display: none !important;
}

.smusic-host .page-header,
.smusic-host .track,
.smusic-host .song-page-content,
.smusic-host .song-page-header,
.smusic-host .sidebar-nav,
.smusic-host .sidebar-playlists {
  background: transparent !important;
}

.smusic-host .sidebar-logo,
.smusic-host .note {
  display: none !important;
}

.smusic-host .page-title {
  display: none !important;
}

.smusic-host .page-header {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.smusic-host .content-section {
  margin-top: 8px !important;
}

.smusic-host .track-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

.smusic-host .track {
  padding: 10px !important;
  border-radius: 8px !important;
}

.smusic-host .track-artwork-wrap {
  margin-bottom: 10px !important;
  border-radius: 6px !important;
}

.smusic-host .meta strong {
  font-size: 0.92rem;
  line-height: 1.2;
}

.smusic-host .meta .small {
  font-size: 0.78rem;
  line-height: 1.2;
}

.smusic-host .playlists-label {
  font-size: 0.74rem;
  opacity: 0.82;
}

.smusic-host .categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smusic-host .categories button {
  width: auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04) !important;
}

.smusic-host .categories button.active {
  background: rgba(122, 93, 255, 0.35) !important;
  border-color: rgba(170, 147, 255, 0.9);
}

.smusic-toolbar .smusic-view-links {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.smusic-toolbar .action-btn.active {
  background: rgba(122, 93, 255, 0.45) !important;
}

.smusic-filter-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.smusic-filter-row .filter-input {
  width: 100%;
}

.smusic-host .player-bar {
  background: rgba(18, 22, 34, 0.52) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}

/* Hide any remaining SMusic-only scrollbar chrome */
.smusic-host,
.smusic-host * {
  scrollbar-width: none;
}

.smusic-host *::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ===== Sidebar nav visual refresh (Facebook-like) ===== */
.site-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

.site-layout .glass-nav {
  background: transparent !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 12px 10px !important;
}

.site-layout .nav-brand-row {
  padding: 4px 8px 12px !important;
  margin: 0 0 6px !important;
  border-bottom: 0 !important;
}

.site-layout .brand {
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #e8eef7;
}

.site-layout nav {
  padding: 0 4px !important;
  gap: 2px;
}

.site-layout nav a {
  width: 100%;
  border-radius: 10px !important;
}

.site-layout .nav-link-inner {
  padding: 10px 10px;
  gap: 12px;
}

.site-layout nav a .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.08rem;
  min-width: 1.35em;
  color: #c8d8f0;
  background: transparent !important;
  border: none;
  box-shadow: none;
  border-radius: 0;
  text-shadow: none;
}

.site-layout nav a:hover .nav-icon {
  color: #e8f0ff;
}

.site-layout nav a.active .nav-icon {
  color: #ffffff;
}

.site-layout .nav-label {
  font-size: 1.03rem;
  letter-spacing: 0;
  text-transform: none;
  color: #d7dfeb;
  font-weight: 650;
}

.home-section-title {
  font-size: 1.03rem !important;
  font-weight: 650;
}

.site-layout nav a:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.site-layout nav a.active {
  background: rgba(255, 255, 255, 0.08) !important;
}

.site-layout nav a.active .nav-label {
  color: #ffffff;
}

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

  .site-layout .glass-nav {
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 10px 0 !important;
  }

  .site-layout nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 10px !important;
  }

  .site-layout nav a {
    width: auto;
  }

  .site-layout .nav-link-inner {
    padding: 8px 10px;
  }

  .site-layout nav a .nav-icon {
    font-size: 0.92rem;
    min-width: 1.3em;
  }

  .site-layout .nav-label {
    font-size: 0.9rem;
  }

  .home-section-title {
    font-size: 0.9rem !important;
  }
}

/* ===== Alignment + interaction row fixes ===== */
.interaction-row {
  flex-wrap: nowrap;
}

.interaction-row .action-btn {
  width: auto !important;
  min-width: 110px;
  flex: 0 0 auto;
}

.site-layout .glass-nav {
  margin-top: 0 !important;
  top: 0 !important;
  padding-top: 8px !important;
}

.site-layout .nav-brand-row {
  padding-top: 0 !important;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(220px, 100%);
}

.content-area > .card:first-child {
  margin-top: 0;
}

.yt-layout {
  align-items: start !important;
}

.yt-sidebar {
  margin-top: 0 !important;
  top: 0 !important;
  align-self: start;
}

/* Keep footer pinned on short pages */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-repeat: no-repeat;
}

.page {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.site-layout {
  flex: 1 0 auto;
}

.site-layout.no-nav {
  grid-template-columns: minmax(0, 1fr);
}

/* ===== Profile refresh + sensitive fields ===== */
.profile-hero {
  display: grid;
  gap: 10px;
}

.profile-hero-cover {
  border-radius: 12px;
  overflow: hidden;
}

.profile-hero-cover img {
  width: 100%;
  aspect-ratio: 21 / 6;
  object-fit: cover;
}

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

.profile-hero-avatar {
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.sensitive-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sensitive-field .sensitive-value {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.02em;
}

.profile-art-preview {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 12px;
}

/* ===== Vote state clarity (clip + broadcast) ===== */
.vote-state {
  margin-top: 0;
  margin-bottom: 2px;
  font-weight: 700;
}

.interaction-row .action-btn.vote-active-like {
  background: linear-gradient(145deg, rgba(46, 204, 113, 0.45), rgba(46, 204, 113, 0.2)) !important;
  border-color: rgba(46, 204, 113, 0.9) !important;
  color: #f2fff7 !important;
}

.interaction-row .action-btn.vote-active-dislike {
  background: linear-gradient(145deg, rgba(255, 76, 96, 0.45), rgba(255, 76, 96, 0.2)) !important;
  border-color: rgba(255, 76, 96, 0.9) !important;
  color: #fff3f6 !important;
}

.media-vote-btn.vote-active-like {
  background: linear-gradient(145deg, rgba(46, 204, 113, 0.32), rgba(46, 204, 113, 0.1)) !important;
  color: #186a3b !important;
  box-shadow: inset 0 0 0 1px rgba(46, 204, 113, 0.45);
}

.media-vote-btn.vote-active-dislike {
  background: linear-gradient(145deg, rgba(255, 76, 96, 0.32), rgba(255, 76, 96, 0.1)) !important;
  color: #922b2b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 76, 96, 0.4);
}

/* ===== Legacy inline render host ===== */
.legacy-inline-host .game-header,
.legacy-inline-host .game-footer,
.legacy-inline-host .theme-toggle {
  display: none !important;
}

.legacy-inline-host .container,
.legacy-inline-host .game-container,
.legacy-inline-host .theme-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

.legacy-inline-host .game-main,
.legacy-inline-host .theme-main {
  padding: 0 !important;
}

.legacy-inline-host .news-container {
  padding: 0 !important;
}

/* ===== Native generators (scoped, no global legacy bleed) ===== */
.dgg-generator-host .game-main.dressup-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dgg-generator-host.card {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.dgg-generator-host .preview-area {
  position: relative;
  padding: 12px;
  border-radius: 12px;
  background: transparent !important;
  overflow: hidden;
}

.dgg-generator-host .preview-window {
  width: min(820px, 100%);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.dgg-generator-host .preview-window > canvas,
.dgg-generator-host .preview-window > img,
.dgg-generator-host .preview-window .preview-layer {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  box-sizing: border-box !important;
}

.dgg-generator-host .fab-container {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.dgg-generator-host .fab-button {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 20, 26, 0.72);
  color: #fff;
}

.dgg-generator-host .bottom-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent !important;
}

.dgg-generator-host .category-tabs-wrapper {
  overflow-x: auto;
}

.dgg-generator-host .category-tabs {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.dgg-generator-host .category-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent !important;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

.dgg-generator-host .category-tab.active {
  background: rgba(129, 183, 255, 0.3);
  border-color: rgba(129, 183, 255, 0.7);
}

.dgg-generator-host .items-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.dgg-generator-host .dressup-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent !important;
  position: relative;
  cursor: pointer;
}

.dgg-generator-host .dressup-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.dgg-generator-host .item-name {
  padding: 6px;
  font-size: 12px;
  line-height: 1.2;
}

.dgg-generator-host .dressup-item.selected {
  border-color: rgba(109, 255, 198, 0.9);
  box-shadow: 0 0 0 2px rgba(109, 255, 198, 0.22) inset;
}

.dgg-generator-host .color-selectors {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.dgg-generator-host .color-selector-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dgg-generator-host .color-selector-group label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.dgg-generator-host .color-selector-group input[type="color"] {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  padding: 0;
}

/* Remove any remaining pastel/white page tint on native generators */
.dgg-generator-host,
.dgg-generator-host .game-main,
.dgg-generator-host .preview-area,
.dgg-generator-host .bottom-sheet,
.dgg-generator-host .items-container,
.dgg-generator-host .items-grid,
.dgg-generator-host .category-tabs-wrapper {
  background: transparent !important;
}

/* Embedded clicker: force legacy wrapper backgrounds transparent */
.dgg-clicker-host.card {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

.dgg-clicker-host .legacy-inline-host,
.dgg-clicker-host .legacy-inline-host .game-main,
.dgg-clicker-host .legacy-inline-host .clicker-main,
.dgg-clicker-host .legacy-inline-host .clicker-container {
  background: transparent !important;
  background-color: transparent !important;
}

/* Kill legacy theme tints inside clicker embed */
.dgg-clicker-host .legacy-inline-host {
  --background: #0f1824 !important;
  --surface: #121f30 !important;
  --card-bg: #101b2a !important;
  --navbar-bg: transparent !important;
  --footer-bg: transparent !important;
  --border-color: rgba(255, 255, 255, 0.14) !important;
  color: inherit !important;
  background-image: none !important;
}

.dgg-clicker-host .legacy-inline-host .clicker-header,
.dgg-clicker-host .legacy-inline-host .clicker-section,
.dgg-clicker-host .legacy-inline-host .upgrades-section,
.dgg-clicker-host .legacy-inline-host .chat-section,
.dgg-clicker-host .legacy-inline-host .auto-clickers-section,
.dgg-clicker-host .legacy-inline-host .tab-content,
.dgg-clicker-host .legacy-inline-host .leaderboard-list {
  background: transparent !important;
  background-color: transparent !important;
}

/* Clicker modal panels: force solid background */
.dgg-clicker-host .legacy-inline-host .modal-content,
.dgg-clicker-host .legacy-inline-host .scratch-modal-content,
.dgg-clicker-host .legacy-inline-host .compact-modal-content,
.dgg-clicker-host .legacy-inline-host .rules-modal-content,
.dgg-clicker-host .legacy-inline-host .plinko-modal-content {
  background: #0f1b2a !important;
  background-color: #0f1b2a !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.dgg-clicker-host .legacy-inline-host .modal {
  background: rgba(0, 0, 0, 0.72) !important;
}

/* Clicker chat readability */
.dgg-clicker-host .legacy-inline-host .chat-wrapper {
  min-height: 680px !important;
  height: calc(100vh - 210px) !important;
}

.dgg-clicker-host .legacy-inline-host .chat-message {
  padding: 8px 10px !important;
}

.dgg-clicker-host .legacy-inline-host,
.dgg-clicker-host .legacy-inline-host .clicker-main,
.dgg-clicker-host .legacy-inline-host .clicker-container,
.dgg-clicker-host .legacy-inline-host .clicker-header,
.dgg-clicker-host .legacy-inline-host .clicker-section,
.dgg-clicker-host .legacy-inline-host .upgrades-section,
.dgg-clicker-host .legacy-inline-host .chat-section,
.dgg-clicker-host .legacy-inline-host .tab-content,
.dgg-clicker-host .legacy-inline-host .rules-content,
.dgg-clicker-host .legacy-inline-host p,
.dgg-clicker-host .legacy-inline-host span,
.dgg-clicker-host .legacy-inline-host li,
.dgg-clicker-host .legacy-inline-host h1,
.dgg-clicker-host .legacy-inline-host h2,
.dgg-clicker-host .legacy-inline-host h3,
.dgg-clicker-host .legacy-inline-host h4,
.dgg-clicker-host .legacy-inline-host h5 {
  color: #ffffff !important;
}

.dgg-clicker-host .legacy-inline-host .hint,
.dgg-clicker-host .legacy-inline-host .section-description,
.dgg-clicker-host .legacy-inline-host .message-time,
.dgg-clicker-host .legacy-inline-host .message-time-icon {
  color: rgba(255, 255, 255, 0.86) !important;
}

.dgg-clicker-host .legacy-inline-host .message-username {
  font-size: 0.98rem !important;
}

.dgg-clicker-host .legacy-inline-host .message-text,
.dgg-clicker-host .legacy-inline-host #messageInput,
.dgg-clicker-host .legacy-inline-host .chat-form button[type="submit"] {
  font-size: 0.96rem !important;
  line-height: 1.42 !important;
}

/* Clicker without chat column */
.dgg-clicker-host .legacy-inline-host .chat-section {
  display: none !important;
}

.dgg-clicker-host .legacy-inline-host .game-area {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

@media (max-width: 1024px) {
  .dgg-clicker-host .legacy-inline-host .game-area {
    grid-template-columns: 1fr !important;
  }
}

/* Live chat full-height app layout */
.live-chat-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 170px);
  min-height: calc(100dvh - 170px);
  max-height: calc(100dvh - 170px);
  overflow: hidden;
}

.live-chat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  flex: 1 1 auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.live-chat-pane {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: rgba(9, 13, 20, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
}

.live-chat-messages-scroll {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

.live-chat-shell #liveChatForm {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px;
  background: rgba(12, 18, 28, 0.86);
}

.live-chat-shell #liveChatForm textarea {
  min-height: 72px;
}

.live-chat-users-pane {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(9, 13, 20, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px;
}

.live-chat-message-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.live-chat-message {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028)) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  padding: 10px !important;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}

.live-chat-message:hover {
  border-color: rgba(133, 168, 255, 0.62) !important;
  background: linear-gradient(180deg, rgba(133, 168, 255, 0.12), rgba(133, 168, 255, 0.06)) !important;
  transform: translateY(-1px);
}

.live-chat-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.live-chat-message-body {
  min-width: 0;
  width: 100%;
}

.live-chat-message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.live-chat-message-author {
  font-size: 0.96rem;
  font-weight: 700;
  color: #e9f2ff;
}

.live-chat-message-time {
  font-size: 0.75rem;
  color: #b9c8df;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 1px 7px;
}

.live-chat-message-text {
  margin: 0;
  color: #dbe8fb;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 980px) {
  .live-chat-shell {
    height: auto;
    min-height: calc(100dvh - 170px);
    max-height: none;
  }
  .live-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .live-chat-users-pane {
    height: auto;
    max-height: 240px;
  }
}

/* Embedded legacy PFP: constrain preview to host container width */
.legacy-inline-host .pfp-main .preview-area {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

.legacy-inline-host .pfp-main .preview-window {
  width: min(800px, 80%) !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.legacy-inline-host .pfp-main .preview-window > canvas,
.legacy-inline-host .pfp-main .preview-window > img,
.legacy-inline-host .pfp-main .preview-window .preview-layer {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  display: block !important;
}

/* ===== Mobile overflow + image bleed guard ===== */
html,
body {
  overflow-x: clip;
}

.page,
.site-layout,
.content-area,
.card,
.yt-layout,
.yt-main,
.yt-sidebar,
.grid,
.clip-similar-main,
.community-profile-card,
.legacy-inline-host {
  max-width: 100%;
  min-width: 0;
}

img,
video,
iframe,
canvas,
svg {
  max-width: 100%;
}

.media-card img:not(.fanart-thumb),
.portal-card img,
.clip-similar-thumb,
.community-profile-photo,
.community-overlay,
.profile-hero-cover img,
.profile-art-preview,
.legacy-inline-host img,
.legacy-inline-host video,
.legacy-inline-host canvas {
  max-width: 100% !important;
  height: auto;
}

@media (max-width: 760px) {
  .clip-similar-main {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  .content-area {
    overflow-x: clip;
  }

  .content-area img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
  }

  .content-area .gif-detail-image {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }

  .content-area .fanart-thumb {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .content-area .member-avatar,
  .content-area .comment-avatar,
  .content-area .profile-hero-avatar {
    width: auto !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .content-area .community-overlay {
    width: clamp(38px, 22%, 56px) !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: cover !important;
  }

  .content-area iframe,
  .content-area video,
  .content-area canvas,
  .content-area svg {
    max-width: 100% !important;
  }

  .legacy-inline-host img,
  .legacy-inline-host video,
  .legacy-inline-host canvas,
  .legacy-inline-host svg,
  .legacy-inline-host iframe {
    max-width: 100% !important;
  }

  .content-area p,
  .content-area a,
  .content-area span,
  .content-area strong,
  .content-area em,
  .content-area li,
  .content-area td,
  .content-area th,
  .content-area h1,
  .content-area h2,
  .content-area h3,
  .content-area h4,
  .content-area h5,
  .content-area h6 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .media-title,
  .portal-title,
  .clip-similar-title,
  .community-user-name {
    white-space: normal !important;
  }
}

/* Admin subscribers readability */
.admin-subscribers-host .legacy-inline-host,
.admin-subscribers-host .legacy-inline-host .subscribers-container,
.admin-subscribers-host .legacy-inline-host .subscribers-container * {
  color: #f4f8ff !important;
}

.admin-subscribers-host .legacy-inline-host .page-header p,
.admin-subscribers-host .legacy-inline-host .filter-group label,
.admin-subscribers-host .legacy-inline-host .date-cell,
.admin-subscribers-host .legacy-inline-host .empty-state,
.admin-subscribers-host .legacy-inline-host .pagination-info,
.admin-subscribers-host .legacy-inline-host .stat-label,
.admin-subscribers-host .legacy-inline-host [style*="color: #666"],
.admin-subscribers-host .legacy-inline-host [style*="color: #999"] {
  color: #cdd8e9 !important;
}

.admin-subscribers-host .legacy-inline-host .table-wrapper {
  background: rgba(12, 18, 28, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.admin-subscribers-host .legacy-inline-host .subscribers-table tbody tr {
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.admin-subscribers-host .legacy-inline-host .subscribers-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.08) !important;
}

.admin-subscribers-host .legacy-inline-host .subscribers-table tbody tr:hover,
.admin-subscribers-host .legacy-inline-host .subscribers-table tbody tr:nth-child(even):hover {
  background: rgba(145, 71, 255, 0.18) !important;
}

.admin-subscribers-host .legacy-inline-host input,
.admin-subscribers-host .legacy-inline-host select,
.admin-subscribers-host .legacy-inline-host textarea,
.admin-subscribers-host .legacy-inline-host button,
.admin-subscribers-host .legacy-inline-host .col-toggle {
  background: transparent !important;
  background-color: transparent !important;
  color: #f4f8ff !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
}

.admin-subscribers-host .legacy-inline-host input::placeholder,
.admin-subscribers-host .legacy-inline-host textarea::placeholder {
  color: rgba(205, 216, 233, 0.78) !important;
}

.admin-subscribers-host .legacy-inline-host select option,
.admin-subscribers-host .legacy-inline-host select optgroup {
  background: #000 !important;
  background-color: #000 !important;
  color: #f4f8ff !important;
}

