/* Global page loading bar */
#global-page-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--highlight, #00eaff));
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: none;
}

#global-page-loading-bar.active {
  opacity: 1;
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
}

#global-page-loading-bar.done {
  transition: width 0.2s cubic-bezier(.4,0,.2,1), opacity 0.4s 0.15s, height 0.3s 0.15s;
  width: 100% !important;
  opacity: 0;
  height: 0px;
}

img.gobbo-image-fade {
  opacity: 0;
  transform: translateY(4px) scale(0.992);
  filter: blur(6px);
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

img.gobbo-image-fade.gobbo-image-loaded {
  opacity: 1;
  transform: none;
  filter: none;
}

html.a11y-reduce-motion img.gobbo-image-fade,
html.perf-lite img.gobbo-image-fade {
  transition-duration: 1ms;
  filter: none;
}

/* ━━━━━━ ENFORCEMENT ACTION FULL PAGE SCREEN ━━━━━━ */
#enforcement-action-screen {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 20000;
  padding: 20px;
  overflow-y: auto;
}

#enforcement-action-screen[data-enforcement="visible"] {
  display: flex;
}

#enforcement-action-screen[data-enforcement="hidden"] {
  display: none;
}

.enforcement-action-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
}

.enforcement-action-card {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--user-accent, #a2ff00) 25%, rgba(0,0,0,0.8)),
    color-mix(in srgb, var(--user-accent, #a2ff00) 12%, rgba(0,0,0,0.8)));
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 40%, transparent);
  border-radius: 16px;
  padding: 48px;
  max-width: 750px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9);
  text-align: center;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.enforcement-action-icon {
  font-size: 64px;
  margin: 0 0 24px;
  display: block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}

@keyframes errorPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.enforcement-action-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--user-accent, #a2ff00);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.enforcement-action-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin: 0 0 32px 0;
  line-height: 1.4;
}

.enforcement-action-details {
  background: rgba(0,0,0,0.3);
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 25%, transparent);
  border-radius: 12px;
  padding: 28px;
  margin: 0 0 28px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.enforcement-detail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
}

.enforcement-detail-row:last-child {
  border-bottom: none;
}

.enforcement-label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--user-accent, #a2ff00);
  opacity: 0.95;
}

.enforcement-value {
  color: rgba(255,255,255,0.9);
  text-align: left;
  font-size: 1rem;
  line-height: 1.5;
  word-break: break-word;
}

.enforcement-restrictions-section {
  background: rgba(214, 48, 49, 0.15);
  border: 1px solid rgba(214, 48, 49, 0.4);
  border-radius: 10px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.enforcement-restrictions-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #ff6b6b;
  margin: 0 0 12px 0;
}

.enforcement-restrictions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enforcement-restrictions-list li {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  line-height: 1.4;
  padding-left: 20px;
  position: relative;
}

.enforcement-restrictions-list li:before {
  content: '✕';
  position: absolute;
  left: 0;
  color: #ff6b6b;
  font-weight: 700;
}

.enforcement-action-help {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  margin: 0 0 28px 0;
}

.enforcement-action-btn {
  background: linear-gradient(135deg, var(--user-accent, #a2ff00), color-mix(in srgb, var(--user-accent, #a2ff00) 80%, #fff));
  border: none;
  border-radius: 8px;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0a;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(162, 255, 0, 0.3);
}

.enforcement-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(162, 255, 0, 0.5);
}

.enforcement-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(162, 255, 0, 0.3);
}

@media (max-width: 768px) {
  #enforcement-action-screen {
    padding: 16px;
  }

  .enforcement-action-card {
    padding: 28px 20px;
  }

  .enforcement-action-icon {
    font-size: 48px;
    margin: 0 0 16px;
  }

  .enforcement-action-title {
    font-size: 1.5rem;
  }

  .enforcement-action-subtitle {
    font-size: 1rem;
    margin: 0 0 24px 0;
  }

  .enforcement-action-details {
    padding: 20px;
    gap: 20px;
  }

  .enforcement-action-btn {
    width: 100%;
    padding: 12px 24px;
  }
}

/* Verified symbol styling */
 :root {
   /* Master accent — JS sets this per logged-in user; fallback is the default Gobbo green */
   --user-accent: #aed580;
   --accent: var(--user-accent);
   --accent-light: color-mix(in srgb, var(--user-accent) 55%, #fff);
   --highlight: #00eaff;
   --highlight-bg: #232323;
   --highlight-hover: var(--accent-light);
   --popup-bg: linear-gradient(180deg, #181818 80%, #232323 100%);
   --popup-border: #333;
   --popup-shadow: 0 10px 28px rgba(0,0,0,0.28);
   --service-alert-h: 0px;
 }
/* ── Verified creator badge (gold star) ─────────────────────────── */
.user-badge-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25em;
  height: 1.25em;
  margin-left: 5px;
  vertical-align: middle;
  flex-shrink: 0;
  position: relative;
  top: -0.06em;
  cursor: default;
  filter: drop-shadow(0 0 4px #ffd70099);
  transition: filter 0.2s, transform 0.2s;
}
.user-badge-verified:hover {
  filter: drop-shadow(0 0 9px #ffd700cc);
  transform: scale(1.18) rotate(10deg);
}
.user-badge-verified svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ── Beta tester badge ───────────────────────────────────────────── */
.user-badge-beta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -0.05em;
  padding: 2px 7px 2px 5px;
  border-radius: 20px;
  background: linear-gradient(115deg, #4c1d95 0%, #7c3aed 50%, #a855f7 100%);
  border: 1px solid #a855f755;
  box-shadow: 0 0 8px #7c3aed66, inset 0 1px 0 rgba(255,255,255,0.12);
  cursor: default;
  font-size: 0.65em;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f0e6ff;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.user-badge-beta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, rgba(255,255,255,0.13) 0%, transparent 55%);
  pointer-events: none;
}
.user-badge-beta:hover {
  box-shadow: 0 0 14px #a855f799, inset 0 1px 0 rgba(255,255,255,0.18);
}
.user-badge-beta svg {
  flex-shrink: 0;
  opacity: 0.9;
}

/* Legacy — keep for any old references */
.verified-symbol {
  display: inline-block;
  font-size: 1em;
  color: var(--highlight) !important;
  vertical-align: middle;
  margin-left: 4px;
  filter: drop-shadow(0 0 2px #00eaff);
}
.beta-badge {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  background: linear-gradient(135deg, #7b2ff7, #e040fb);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.03em;
  box-shadow: 0 0 6px #a855f788;
  cursor: default;
}

/* Mobile optimizations: centered, minimal spacing and stacked layout */
@media (max-width: 768px) {
  .spa-container {
    padding: 12px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }

  header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 0px;
  }

  .header-left { display:flex; align-items:center; gap:0px; }
  .logo-tagline img { height:36px; width:auto; }

  nav.desktop-menu { display: none; }
  nav.mobile-menu { display:flex; position:fixed; bottom:0; left:0; right:0; height:auto; align-items:stretch; justify-content:space-around; background:rgba(10,10,10,0.92); padding:0; z-index:12000; }
  nav.mobile-menu a, nav.mobile-menu button.nav-btn { flex:1; text-align:center; padding:0; display:flex; align-items:center; justify-content:center; }

  /* #main-content side padding set in the mobile layout block below */
  h1, h2, h3 { font-size: 1.05rem; margin: 8px 0; }
  p, a, li { font-size: 0.95rem; }

  /* Watch page stacked layout */
  .watch-layout { display:block; padding:0; }
  .watch-main { width:100%; }
  .watch-related { width:100%; margin-top:14px; }
  /* video-wrapper bleed is handled by watch.css using --page-gutter */
  #video-player { display:block; width:100%; height:auto; max-height:56vh; object-fit:contain; margin:0; }

  /* Ensure controls do not wrap; allow horizontal scroll on tight screens */
  .controls-row { flex-wrap:nowrap; gap:8px; overflow-x:auto; -webkit-overflow-scrolling:touch; }

  /* Smaller inline spinners (keep video loader at default size) */
  #comments-list > .spinner, #related-list > .spinner { margin: 10px auto; width: 40px; height: 40px; }

  /* Controls and header spacing */
  .controls-row { gap:6px; display:flex; align-items:center; }
  .controls-row button, .controls-row select, .controls-row input { padding:6px; }

  /* Profile image sizing */
  nav .profile-link img { width:28px; height:28px; }

  /* Make cards full-width */
  .related-card { width:100%; display:flex; gap:8px; padding:8px 0; }

  /* General mobile content constraints */
  img, video { max-width:100%; height:auto; display:block; }
  .container-inner { padding-left:12px; padding-right:12px; box-sizing:border-box; }

  /* Improve readability on small screens */
  body { -webkit-font-smoothing:antialiased; }
}
/* Nav profile popup menu */
#nav-profile-popup {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--user-accent) 30%, #0e0e0e) 0%,
    color-mix(in srgb, var(--user-accent) 16%, #141414) 100%);
  color: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--user-accent) 55%, transparent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5),
    0 0 0 1px color-mix(in srgb, var(--user-accent) 18%, transparent) inset;
  border-radius: 12px;
  min-width: 170px;
  font-size: 15px;
  padding: 8px 0;
  z-index: 12000;
  backdrop-filter: blur(16px) saturate(200%);
  -webkit-backdrop-filter: blur(16px) saturate(200%);
}
#nav-profile-popup .nppm-item {
  display: block;
  width: 100%;
  padding: 12px 18px;
  cursor: pointer;
  color: var(--accent-light, #eaff7a);
  background: none;
  border: none;
  font-weight: 600;
  text-align: left;
  transition: background 0.18s, color 0.18s;
}
#nav-profile-popup .nppm-item:hover {
  background: rgba(0,0,0,0.35);
  color: var(--user-accent, #a2ff00);
}
#nav-profile-popup .nppm-admin {
  border-top: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 35%, transparent);
  margin-top: 4px;
}
#nav-profile-popup .nppm-admin:hover {
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
}
nav.desktop-menu .profile-link,
nav.mobile-menu .profile-link {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0px;
  border-radius: 10px;
  transition: background 0.18s;
}
nav.desktop-menu .profile-link:hover,
nav.mobile-menu .profile-link:hover {
  background: rgba(0,0,0,0.35);
}
/* gobboapp.css */

/* Import Medodica font */
@font-face {
  font-family: 'Medodica';
  src: url('https://gobbovideo.com/public/fonts/MedodicaRegular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* ===== Body & Base (from index.html) ===== */
body {
  margin: 0;
  font-family: 'Medodica', Arial, sans-serif;
  color: #fff;
  background-color: transparent;
}

/* Increase global readable sizes */
html {
  font-size: 20px;
}
html, body { height: 100%; }
body {
  font-size: 1rem;
  line-height: 1.6;
}

/* Headings scale responsively but are larger by default */
h1 { font-size: clamp(1.8rem, 4.8vw, 2.6rem); margin: 0 0 18px 0; }
h2 { font-size: clamp(1.4rem, 3.6vw, 2.0rem); margin: 0 0 14px 0; }
h3 { font-size: clamp(1.2rem, 3.0vw, 1.4rem); margin: 0 0 10px 0; }
h4 { font-size: clamp(1.05rem, 2.4vw, 1.15rem); margin: 0 0 8px 0; }

/* Slightly larger paragraph/body copy where explicit selectors exist */
p, .info-message, .not-found-message, .video-meta, .video-info { font-size: 1rem; }

/* default for SPA container: always fit between header and bottom nav */
#main-content {
  box-sizing: border-box;
  flex-grow: 1;
  position: relative;
  z-index: 1;
  isolation: isolate;
  overflow-y: auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Always pad away from fixed header and fixed nav — JS keeps vars accurate */
}
#main-content::-webkit-scrollbar { display: none; }


header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  position: flex;
  top: var(--service-alert-h, 0px);
  left: 0;
  right: 0;
  z-index: 1200;
  min-height: 72px;
  gap: 0;
  border-bottom: none;
  width: 100%;
  border-radius: 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

/* Header scroll behavior: smooth hide/show on scroll */
header.header-scroll-enabled {
  will-change: transform, opacity;
}

@keyframes headerHideSlideFade {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-110%);
    opacity: 0;
  }
}

@keyframes headerShowSlideFade {
  from {
    transform: translateY(-110%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

header[data-header-visible="false"] {
  transform: translateY(-110%);
  opacity: 0;
  animation: headerHideSlideFade 0.34s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
  box-shadow: none;
}

header[data-header-visible="true"] {
  transform: translateY(0);
  opacity: 1;
  animation: headerShowSlideFade 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  header[data-header-visible="false"],
  header[data-header-visible="true"] {
    animation: none !important;
  }
}

:root {
  --header-h: 180px;
  --nav-h: 0px;
}

.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0px 20px;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--user-accent) 30%, rgba(0,0,0,0.82)),
    color-mix(in srgb, var(--user-accent) 18%, rgba(0,0,0,0.78)));
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5),
    0 1px 0 color-mix(in srgb, var(--user-accent) 45%, transparent);
  border-radius: 8px;
}

.header-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  line-height: 1.1;
  min-width: 0;
  gap: 0px;
}

@keyframes gobboRiseFadeIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes gobboSoftFloat {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

header .header-nav-row > * {
  opacity: 0;
  animation: gobboRiseFadeIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

header .header-nav-row > *:nth-child(1) { animation-delay: 0.02s; }
header .header-nav-row > *:nth-child(2) { animation-delay: 0.1s; }
header .header-nav-row > *:nth-child(3) { animation-delay: 0.16s; }
header .header-nav-row > *:nth-child(4) { animation-delay: 0.22s; }

nav.desktop-menu > * {
  opacity: 0;
  animation: gobboRiseFadeIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

nav.desktop-menu > *:nth-child(1) { animation-delay: 0.2s; }
nav.desktop-menu > *:nth-child(2) { animation-delay: 0.25s; }
nav.desktop-menu > *:nth-child(3) { animation-delay: 0.3s; }
nav.desktop-menu > *:nth-child(4) { animation-delay: 0.35s; }

.iicmo-footer{
  width: 165px;      /* or max-width */
  height: auto;      /* keeps aspect ratio */
  max-width: 20vw;   /* prevents overflow on small screens */
}


.desktop-site-footer {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 26px;
  padding: 22px 20px 14px;
  border-top: 1px solid color-mix(in srgb, var(--user-accent) 45%, transparent);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--user-accent) 14%, rgba(0,0,0,0.5)) 0%,
    rgba(0,0,0,0.68) 100%);
}

.desktop-site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.desktop-site-footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.desktop-site-footer-logo {
  width: 54px;
  height: 54px;
  object-fit: cover;
  background: rgba(0,0,0,0.32);
  border: 1px solid color-mix(in srgb, var(--user-accent) 42%, transparent);
  padding: 0px;
}

.desktop-site-footer-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: color-mix(in srgb, var(--user-accent) 66%, #fff);
  letter-spacing: 0.01em;
}

.desktop-site-footer-copy {
  margin: 0;
  max-width: 36ch;
  line-height: 1.42;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
}

.desktop-site-footer-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-site-footer-group h4 {
  margin: 2px 0 4px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.56);
}

.desktop-site-footer-group a,
.desktop-site-footer-meta {
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.3;
}

.desktop-site-footer-group a {
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.desktop-site-footer-group a:hover {
  color: var(--user-accent, #a2ff00);
  border-bottom-color: color-mix(in srgb, var(--user-accent) 60%, transparent);
}

.desktop-site-footer-meta {
  opacity: 0.72;
}

.desktop-site-footer-legal {
  max-width: 1200px;
  margin: 16px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.09);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  position: relative;
  z-index: 2;
}

.desktop-site-footer-legal span,
.desktop-site-footer-legal a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.64);
  text-decoration: none;
}

.desktop-site-footer-legal a:hover {
  color: var(--user-accent, #a2ff00);
}

.desktop-site-footer-glow {
  position: absolute;
  right: -140px;
  bottom: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--user-accent) 34%, transparent) 0%,
    transparent 68%);
  opacity: 0.28;
  display: none !important;
}

@media (max-width: 1060px) {
  .desktop-site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

/* Full-screen overrides for video shell */
#video-shell:fullscreen,
#video-shell:-webkit-full-screen,
#video-shell:-moz-full-screen,
#video-shell:-ms-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  z-index: 9999 !important;
}

#video-shell:fullscreen #video-player,
#video-shell:-webkit-full-screen #video-player,
#video-shell:-moz-full-screen #video-player,
#video-shell:-ms-fullscreen #video-player {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

#page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--user-accent, #a2ff00);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-tagline { display:flex; align-items:center; gap:12px; }
.logo-tagline #logo { height:48px; transition:transform 0.18s ease; }
.logo-tagline img:hover { transform: scale(1.04); }
.page-info { display:flex; flex-direction:column; }
.page-info #page-title { font-size:1.05rem; color:var(--accent-light, #eaff7a); font-weight:800; }

.mobile-back {
  display: none;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  opacity: 1;
  z-index: 2;
}
.mobile-back:hover {
  background: rgba(255,255,255,0.2);
}
.mobile-back:active {
  transform: scale(0.96);
}



#logo {
  height: 42px;
  width: auto;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), filter 0.24s ease;
  display: block;
  filter: drop-shadow(0 0 8px rgba(162,255,0,0.15));
}

#logo:hover {
  transform: scale(1.08) rotate(1deg);
  filter: drop-shadow(0 0 16px rgba(162,255,0,0.25));
}

nav.desktop-menu a:hover {
  color: #fff;
  transform: translateY(-2px);
}

nav.desktop-menu {
  display:flex;
  gap:20px;
  align-items:center;
  margin-left:auto;
  position:relative;
}

nav.desktop-menu a {
  color: rgba(255,255,255,0.85);
  text-transform:capitalize;
  padding:0px 0px;
  border-radius:8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0);
  border: 1px solid transparent;
}

nav.desktop-menu a:hover {
  background: rgba(0,0,0,0.3);
  color: var(--user-accent, #a2ff00);
  transform: translateY(-1px);
  border-color: rgba(162,255,0,0.2);
}

nav.desktop-menu a.active {
  background: rgba(0,0,0,0.4);
  color: var(--user-accent, #a2ff00);
  border-bottom: 2px solid var(--accent-light, #eaff7a);
}

nav.desktop-menu a .icon {
  font-size: 1.1em;
  display: inline-flex;
  align-items: center;
}

nav.desktop-menu .profile-link,
nav.mobile-menu .profile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 0 !important;
  flex-shrink: 0;
  gap: 6px;
}

nav.desktop-menu .profile-link {
  margin-left: 20px;
}

nav.desktop-menu .profile-link span {
  display: block;
  flex-shrink: 0;
  text-align: center;
  font-size: 0.95rem;
}

nav.desktop-menu .profile-link:hover img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

nav.desktop-menu .profile-link img,
nav.mobile-menu .profile-link img {
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.24s ease, filter 0.24s ease, border-color 0.24s ease;
  flex-shrink: 0;
}

nav.desktop-menu .profile-link img {
  width: 36px;
  height: 36px;
  border: 2px solid var(--user-accent, #a2ff00);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

nav.mobile-menu .profile-link img {
  width: 36px;
  height: 36px;
  border: 2px solid var(--user-accent, #a2ff00);
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

nav.desktop-menu .profile-link i,
nav.mobile-menu .profile-link i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: transform 0.24s ease, color 0.24s ease;
  color: var(--user-accent, #a2ff00);
  font-size: 1.3em;
}

nav.desktop-menu .profile-link:hover img,
nav.mobile-menu .profile-link:hover img {
  transform: scale(1.12);
  filter: brightness(1.15);
}

@media (max-width: 768px) {
  .desktop-site-footer { display: none; }

  /* Back button hidden globally on mobile — logo is always centered */
  .mobile-back { display: none !important; }
  .page-info { display: none !important; }

  nav.desktop-menu { display: none; }
  nav.mobile-menu { display: flex; }
  #logo { height: 36px; }

  header {
    position: flex;
    top: var(--service-alert-h, 0px);
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1200;
    min-height: 56px;
    justify-content: center;
    background: color-mix(in srgb, var(--user-accent) 28%, rgba(6,6,6,0.88));
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid color-mix(in srgb, var(--user-accent) 50%, transparent);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.55),
      0 1px 0 color-mix(in srgb, var(--user-accent) 35%, transparent);
  }

  /* always center the logo in the header on mobile */
  .header-left {
    flex: 1;
    justify-content: center;
    width: 100%;
  }

  /* Update CSS variables — JS will override with real measurements */
  :root {
    --header-h: 160px;
    --nav-h: 60px;
    /* gutter = .spa-container padding; watch.css uses this to bleed the player */
    --page-gutter: 14px;
  }

  /* Small side padding so no page content touches the screen edge on mobile. */
  #main-content {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Mobile floating header styling */
  header {
    padding: 0 !important;
    left: 8px !important;
    right: 8px !important;
    top: calc(var(--service-alert-h, 0px) + 8px) !important;
    width: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    overflow: hidden;
    background: color-mix(in srgb, var(--user-accent) 28%, rgba(6,6,6,0.88)) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--user-accent) 50%, transparent) !important;
  }

  .header-nav-row {
    width: 100% !important;
    margin: 0 !important;
    padding: 0px 0px !important;
    border-radius: 0px !important;
  }

  .enforcement-bar {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
  }

  /* Mobile floating nav styling */
  nav.mobile-menu {
    bottom: 8px !important;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    border-radius: 0px !important;
    padding: 6px !important;
    background: linear-gradient(180deg,
      color-mix(in srgb, var(--user-accent) 30%, rgba(0,0,0,0.82)),
      color-mix(in srgb, var(--user-accent) 18%, rgba(0,0,0,0.78))) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    height: auto !important;
    z-index: 12000 !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  nav.mobile-menu a, nav.mobile-menu button.nav-btn {
    padding: 8px !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  nav.mobile-menu > * {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    animation: gobboRiseFadeIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  nav.mobile-menu > *:nth-child(1) { animation-delay: 0.08s; }
  nav.mobile-menu > *:nth-child(2) { animation-delay: 0.14s; }
  nav.mobile-menu > *:nth-child(3) { animation-delay: 0.2s; }

  nav.mobile-menu a i,
  nav.mobile-menu button.nav-btn i,
  nav.mobile-menu .mnav-label {
    animation: gobboSoftFloat 2.2s ease-in-out infinite;
    animation-delay: 0.3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  header .header-nav-row > *,
  nav.desktop-menu > *,
  nav.mobile-menu > *,
  nav.mobile-menu a i,
  nav.mobile-menu button.nav-btn i,
  nav.mobile-menu .mnav-label,
  nav.desktop-menu a:hover,
  nav.desktop-menu .profile-link:hover,
  #notif-bell-btn:hover,
  #notif-bell-mobile:hover {
    animation: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
  }
}

body[data-can-back="false"] .header-left {
  justify-content: center;
  width: 100%;
}

body[data-can-back="false"] .page-info {
  display: none;
}

body[data-can-back="false"] header {
  grid-template-columns: 1fr;
}

body[data-can-back="false"] .mobile-back {
  display: none;
}

@media (min-width: 769px) {
  nav.desktop-menu {
    display: flex;
  }
  nav.mobile-menu {
    display: none;
  }

  header {
    grid-template-columns: auto 1fr auto;
    padding: 0px 0px;
    min-height: 100px;
    gap: 0px;
  }
  
  .header-left {
    gap: 18px;
  }
  
  .logo-tagline {
    gap: 14px;
  }
  
  #logo {
    height: 48px;
  }

  .header-center {
    justify-content: flex-start;
    width: auto;
    margin-right: auto;
  }
  
  nav.desktop-menu a {
    padding: 0px 0px;
    font-size: 1rem;
  }
}


@media (min-width: 769px) {
  body[data-can-back="false"] header {
    grid-template-columns: auto 1fr auto;
  }
  body[data-can-back="false"] .header-left {
    justify-content: flex-start;
    width: auto;
    margin-right: auto;
  }
  body[data-can-back="false"] .page-info {
    display: flex;
  }
}

/* ===== System Message ===== */
#system-message {
  display: none;
  cursor: pointer;
  background: #a28200;
  color: #000;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  font-size: 17px;
  transition: background 0.2s;
}

#system-message:hover {
  background: rgb(186,149,0);
}

#system-message-popup {
  display: none;
  position: fixed;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  
  
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  z-index: 1000;
  transition: all 0.3s;
}

#system-message-popup button {
  margin-top: 10px;
  padding: 6px 12px;
  background: var(--user-accent, #a2ff00);
  border: none;
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.2s;
}

#system-message-popup button:hover {
  background: #88cc00;
}

/* ===== Spinner ===== */
.spinner {
  margin: 3rem auto;
  width: 120px;
  height: 120px;
  background-image: url('/public/images/loading.gif');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: none;
}

/* Smaller inline spinners for watch page sections to avoid large layout shifts */
#comments-list > .spinner, #related-list > .spinner {
  margin: 12px auto;
  width: 48px;
  height: 48px;
  background-size: contain;
}

/* Tint spinners on user-tied pages (channel/watch) using channel accent via blend mode.
   Only applies after --channel-accent is set; transparent fallback = no visible tint. */
#channel-page .spinner,
#watch-page .spinner {
  position: relative;
  isolation: isolate;
}
#channel-page .spinner::after,
#watch-page .spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--channel-accent, transparent);
  mix-blend-mode: color;
  opacity: 0.55;
  pointer-events: none;
}

/* ===== SPA Container & Cards ===== */
.spa-container {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  opacity: 1;
  transition: opacity 0.35s ease-in;
}

@media (prefers-reduced-motion: reduce) {
  .spa-container {
    transition: none !important;
  }
}

@media (min-width: 1200px) {
  .spa-container {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Force white text everywhere */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: 'Medodica', Arial, sans-serif !important;
  color: white !important;
}

/* Form controls and placeholders */
input,
textarea,
select {
  color: white !important;
  background-color: transparent;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 600;
  min-height: 44px;
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* SVG text white */
svg text {
  fill: white !important;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Ensure in-page scrolls place content above the header and mobile nav */
html { scroll-padding-top: calc(var(--header-h, 76px) + 12px); scroll-padding-bottom: calc(var(--nav-h, 60px) + env(safe-area-inset-bottom)); }

/* Slightly larger paragraph text for improved readability */
p {
  font-size: 1.25rem; /* modest increase over default */
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
}

a {
  color: white !important;
  text-decoration: none;
}

/* Top nav */
header {
  align-items: center;
  height: auto;
}

#logo {
  height: 48px;
  margin-right: 0;
  cursor: pointer;
}

nav.desktop-menu {
  display: flex;
  gap: 1rem;
  margin-left: auto;
  align-items: center;
}

nav.desktop-menu a {
  padding: 1rem;
  font-weight: bold;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

nav.desktop-menu a.active {
  border-bottom: 2px solid var(--accent-light);
}

/* ======= System Message Banner ======= */
.system-message {
  width: 100%;
  background: rgb(0, 0, 0);
  color: white;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 12px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  display: none; /* toggled by JS */
}

.system-message span {
  display: inline-block;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0.8;
  white-space: normal;
  word-wrap: break-word;
}


/* Shift content down when banner visible */
body.has-system-message #main-content {
  margin-top: 50px; /* adjust to banner height */
}

/* Main content — base rule is earlier; this block merged into it */

/* Hide mobile nav by default (desktop) */
nav.mobile-menu {
  display: none;
}

/* ── Mobile bottom tab bar ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav.desktop-menu { display: none; }

  nav.mobile-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, var(--user-accent) 28%, rgba(6,6,6,0.88));
    border-top: 1px solid color-mix(in srgb, var(--user-accent) 50%, transparent);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.55),
      0 -1px 0 color-mix(in srgb, var(--user-accent) 30%, transparent);
    z-index: 12000;
  }

  /* Each nav item: icon stacked above label */
  nav.mobile-menu a,
  nav.mobile-menu button.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    background: none;
    border: none;
    border-top: 2px solid transparent;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 0;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    transition: color 0.18s ease, border-color 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    min-width: 0;
    margin-left: 0;
  }

  nav.mobile-menu a i,
  nav.mobile-menu button.nav-btn i {
    font-size: 22px;
    line-height: 1;
    display: block;
    transition: transform 0.18s ease;
    color: inherit !important;
  }

  nav.mobile-menu a img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--user-accent, #a2ff00) 70%, transparent);
    display: block;
    transition: transform 0.18s ease, border-color 0.18s ease;
  }

  nav.mobile-menu .mnav-label {
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    display: block !important;
    color: inherit !important;
  }

  /* Active state */
  nav.mobile-menu a.active,
  nav.mobile-menu button.nav-btn.active {
    color: var(--user-accent, #a2ff00) !important;
    border-top-color: var(--user-accent, #a2ff00);
  }

  nav.mobile-menu a.active i,
  nav.mobile-menu button.nav-btn.active i {
    transform: translateY(-1px);
    color: var(--user-accent, #a2ff00) !important;
  }

  nav.mobile-menu a.active img {
    border-color: var(--user-accent, #a2ff00);
    transform: translateY(-1px);
  }

  /* Hover / press feedback */
  nav.mobile-menu a:active i,
  nav.mobile-menu button.nav-btn:active i {
    transform: scale(0.9);
  }

  /* Profile link: flush with others */
  nav.mobile-menu .profile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px 6px;
    background: none !important;
    border: none !important;
    border-top: 2px solid transparent !important;
    box-shadow: none !important;
    outline: none !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 12px !important;
    transition: color 0.18s ease, border-color 0.18s ease;
    margin-left: 0 !important;
    flex: 1;
  }

  nav.mobile-menu .profile-link img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--user-accent, #a2ff00) 70%, transparent);
  }

  /* Slightly increase paragraph size on small screens for readability */
  p { font-size: 1.02rem; }
}

/* ===== Iconoir base styles ===== */
i[class^="iconoir-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.0em;
  line-height: 1;
  vertical-align: middle;
  color: currentColor;
}
.icon { margin-right: 12px; }

/* Active nav links color icons automatically */
nav.desktop-menu a.active { color: #000; }
nav.mobile-menu a.active { color: var(--user-accent, #a2ff00) !important; }

/* Desktop nav icon alignment */
nav.desktop-menu a i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Profile link icons: match image size and border for consistent layout */
nav.desktop-menu .profile-link i,
nav.mobile-menu .profile-link i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--user-accent, #a2ff00);
  box-sizing: border-box;
  transition: transform 0.2s, border-color 0.2s;
}

nav.desktop-menu .profile-link:hover i,
nav.mobile-menu .profile-link:hover i {
  transform: scale(1.08);
  border-color: #fff;
}

/* Mobile icon sizing */
@media (max-width: 768px) {
  .mobile-menu i { font-size: 22px; }
}

/* ===== Settings Styles ===== */
/* Settings card icon styles */
.settings-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 18px 24px;
  min-height: auto;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--user-accent, #a2ff00) 28%, rgba(0,0,0,0.62)) 0%,
    color-mix(in srgb, var(--user-accent, #a2ff00) 14%, rgba(0,0,0,0.52)) 100%);
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 42%, transparent);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35),
    0 0 0 1px color-mix(in srgb, var(--user-accent, #a2ff00) 12%, transparent) inset;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100%;
}

a.settings-card {
  text-decoration: none;
  color: inherit;
}

.settings-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--user-accent, #a2ff00) 22%, transparent) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.settings-card:hover {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--user-accent, #a2ff00) 40%, rgba(0,0,0,0.58)) 0%,
    color-mix(in srgb, var(--user-accent, #a2ff00) 22%, rgba(0,0,0,0.48)) 100%);
  border-color: color-mix(in srgb, var(--user-accent, #a2ff00) 60%, transparent);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--user-accent, #a2ff00) 28%, transparent);
  transform: translateY(-2px);
}

.settings-card:hover::before {
  opacity: 1;
}

/* Main icon (left) */
.settings-card i:first-of-type {
  font-size: 24px;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--user-accent, #a2ff00);
  position: relative;
  z-index: 1;
}

/* Arrow icon (right) */
.settings-card i:last-of-type {
  font-size: 16px;
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  color: color-mix(in srgb, var(--user-accent, #a2ff00) 50%, transparent);
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
  z-index: 1;
}

.settings-card:hover i:last-of-type {
  color: var(--user-accent, #a2ff00);
  transform: translateX(4px);
}

/* Remove SVG inline gaps and make icon internals block-level to avoid baseline issues */
i[class^="iconoir-"] svg { display: block; width: 1em; height: 1em; }
.settings-card i, i[class^="iconoir-"] { line-height: 0; }

/* Text body */
.settings-card .settings-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  position: relative;
  z-index: 1;
}

.settings-title {
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
}

.settings-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.8rem;
  margin-top: 4px;
  margin: 0;
}

/* Grid layout */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0;
}

@media (min-width: 600px) {
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (min-width: 1000px) {
  .settings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1400px) {
  .settings-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

.settings-header {
  text-align: center;
  margin-bottom: 32px;
  margin-top: 20px;
}

.settings-header h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--user-accent, #a2ff00) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.settings-intro {
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .settings-card {
    padding: 14px 16px;
  }

  .settings-card i:first-of-type {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .settings-title {
    font-size: 1rem;
  }

  .settings-desc {
    font-size: 0.75rem;
  }

  .settings-header h1 {
    font-size: 1.5rem;
  }
}

/* ===== Settings Page Content Styles ===== */
.settings-page-content {
  max-width: 900px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 14%, rgba(0,0,0,0.62));
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 36%, transparent);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5),
    0 0 0 1px color-mix(in srgb, var(--user-accent, #a2ff00) 14%, transparent) inset;
}

@media (min-width: 769px) {
  .settings-page-content {
    padding: 32px;
  }
}

.settings-page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid color-mix(in srgb, var(--user-accent, #a2ff00) 45%, transparent);
}

.settings-page-header h2 {
  margin: 0 0 8px 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--user-accent, #a2ff00);
}

.settings-page-header p {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.settings-section {
  margin-bottom: 32px;
}

.settings-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 38%, transparent);
}

.settings-form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.settings-form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
}

.settings-form-group input,
.settings-form-group textarea,
.settings-form-group select {
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.settings-form-group input:focus,
.settings-form-group textarea:focus,
.settings-form-group select:focus {
  outline: none;
  border-color: var(--user-accent, #a2ff00);
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--user-accent, #a2ff00) 10%, transparent);
}

.settings-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ===== Profile page responsive fixes ===== */
#profile-page .settings-form-group > div {
  /* these rows are written inline in the HTML as flex; ensure they wrap on small screens */
  gap: 16px;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Override inline width/height on banner and pagebkg preview images so they scale on mobile */
#profile-page img#profile-banner-preview,
#profile-page img#profile-pagebkg-preview {
  width: 100% !important;
  max-width: 260px !important;
  height: auto !important;
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

#profile-page img#profile-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

/* Profile save-button row: always wraps content sensibly */
#profile-page #profile-form > div:not(.settings-form-group) {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

@media (max-width: 600px) {
  /* Profile page: make the banner/pagebkg preview fill width on narrow screens */
  #profile-page img#profile-banner-preview,
  #profile-page img#profile-pagebkg-preview {
    max-width: 100% !important;
  }

  /* Stack save-button row vertically on mobile */
  #profile-page #profile-form > div:not(.settings-form-group) {
    flex-direction: column;
    align-items: flex-start;
  }
  #profile-page #profile-form > div:not(.settings-form-group) button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  #profile-page img#profile-avatar-preview {
    width: 72px;
    height: 72px;
  }
  #profile-page .settings-form-group > div { gap: 12px; }
  .settings-page-content { padding: 18px; }
}

/* Make 2FA controls wrap on narrow viewports so buttons don't overflow */
.settings-section #twofa-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Small spacing improvements for the 2FA setup area */
#twofa-setup input#twofa-code { min-width: 160px; }
#twofa-setup .btn { margin-top: 6px; }

/* 2FA code input + confirm button row: wrap on mobile */
#twofa-setup > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  #twofa-setup > div {
    flex-direction: column;
    align-items: stretch;
  }
  #twofa-setup input#twofa-code {
    width: 100%;
    min-width: 0;
  }
}

.settings-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--user-accent, #a2ff00) 0%, #8edb00 100%);
  border: none;
  color: #000;
  font-weight: 700;
  font-size: 1.08rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 0 12px 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  text-decoration: none;
  align-self: stretch;
}
@media (max-width: 600px) {
  .settings-btn {
    font-size: 1rem;
    padding: 12px 12px;
  }
}

.settings-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px color-mix(in srgb, var(--user-accent, #a2ff00) 30%, transparent);
}

.settings-btn:active {
  transform: translateY(0);
}

.settings-btn.secondary {
  background: rgba(107,142,35,0.6);
  color: #fff;
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 30%, transparent);
}

.settings-btn.secondary:hover {
  background: rgba(107,142,35,0.8);
  border-color: var(--user-accent, #a2ff00);
}

.settings-btn.danger {
  background: rgba(255,107,107,0.6);
  color: #fff;
  border: 1px solid rgba(255,107,107,0.4);
}

.settings-btn.danger:hover {
  background: rgba(255,107,107,0.8);
  border-color: #ff6b6b;
}

.settings-message {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 12px;
  font-weight: 600;
}

.settings-message.success {
  background: rgba(127,255,127,0.15);
  border: 1px solid rgba(127,255,127,0.4);
  color: #7fff7f;
}

.settings-message.error {
  background: rgba(255,107,107,0.15);
  border: 1px solid rgba(255,107,107,0.4);
  color: #ff6b6b;
}

.settings-message.info {
  background: rgba(100,200,255,0.15);
  border: 1px solid rgba(100,200,255,0.4);
  color: #64c8ff;
}

.settings-message.warning {
  background: rgba(255,200,100,0.15);
  border: 1px solid rgba(255,200,100,0.4);
  color: #ffc864;
}

@media (max-width: 768px) {
  .settings-page-content {
    padding: 20px;
  }

  .settings-page-header h2 {
    font-size: 1.4rem;
  }

  .settings-section h3 {
    font-size: 1.05rem;
  }

  .settings-header { text-align: center; margin-bottom: 10px; }
  .settings-header h1 { margin: 0; font-size: 1.2rem; }
  .settings-intro { font-size: 0.9rem; }
}

/* Video thumbnail placeholder and sizing (16:9)
   Uses <img class="video-thumb"> or <div class="video-thumb placeholder"> */
.video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  object-fit: cover;
  display: block;
}
.video-thumb.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  font-size: 2.2rem;
}

/* Inline SVG placeholder icon */
.video-thumb.placeholder .placeholder-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  color: rgba(255,255,255,0.45);
}

.video-thumb.placeholder::after {
  content: 'No thumbnail';
  font-size: 0.72rem;
  font-family: 'Medodica', Arial, sans-serif;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.22);
  text-transform: uppercase;
}

/* Modal overlay (centered on all viewports) */

#require-account-modal {
  position: fixed;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  padding: 24px; /* ensure there's gutter */
  box-sizing: border-box;
  min-height: 100vh;
}

.require-account-dialog {
  background: #111;
  padding: 18px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  text-align: center;
  box-sizing: border-box;
}

/* Ensure modal dialog stays centered on large screens too */
@media (min-width: 900px) {
  .require-account-dialog { padding: 22px; }
  .require-account-dialog { width: auto; }
  .require-account-dialog h2 { font-size: 1.45rem; }
  .require-account-dialog p { font-size: 1rem; }
}

/* Stronger centering and size rules to avoid left-aligned fallback */
#require-account-modal {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#require-account-modal .require-account-dialog {
  width: min(520px, calc(100% - 48px)) !important;
  max-width: 520px !important;
  margin: 0 auto !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* Ensure content inside dialog wraps and is readable */
#require-account-modal .require-account-dialog * { box-sizing: border-box; }

/* Extra safety: make sure the overlay covers entire viewport and stays on top */
#require-account-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 200000 !important;
  padding: 24px !important;
}

/* Desktop tweaks for dialog */
@media (min-width: 900px) {
  #require-account-modal .require-account-dialog { max-width: 640px !important; padding: 28px !important; }
  #require-account-modal .require-account-dialog h2 { font-size: 1.6rem !important; }
  #require-account-modal .require-account-dialog p { font-size: 1.05rem !important; line-height: 1.4 !important; }
  #require-account-modal .require-account-dialog .require-account-actions { justify-content: center !important; }
}
.require-account-dialog h2 { margin: 0 0 8px 0; font-size: 1.25rem; }
.require-account-dialog p { color: rgba(255,255,255,0.85); margin-bottom: 16px; }
.require-account-actions { display:flex; gap:10px; justify-content:center; }
.require-account-actions .btn { padding: 8px 12px; border-radius:6px; cursor:pointer; }
.require-account-actions .btn.primary { background:#aed581; color:#000; border:none; }
.require-account-actions .btn:not(.primary) { background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.08); }

/* Global button styles for consistent UI */
.btn {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: inherit;
  font-weight: 600;
}
.btn.primary { background: #aed581; color: #000; border: none; }
.btn.danger { background: #a33; color: #fff; border: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn + .btn { margin-left: 8px; }

/* Reaction buttons (like/dislike) */
.reaction-btn { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; font-size:14px; border-radius:8px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: inherit; backdrop-filter: blur(10px); transition: all 0.2s ease; cursor: pointer; height: auto; }
.reaction-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
.reaction-btn .reaction-emoji { font-size: 1.2rem !important; line-height: 0.8 !important; display:inline-block; vertical-align: middle !important; transition: transform 220ms cubic-bezier(.2,.9,.2,1); }
.reaction-btn .reaction-count { font-weight:800; font-size:1rem; min-width: 35px; text-align:left; display:inline-block; color: rgba(255,255,255,0.95); vertical-align: middle; }
.reaction-btn .loading-spinner { width: 100px; height: 100px; background-image: url('/public/images/loading.gif'); background-repeat: no-repeat; background-position: center; background-size: contain; display: none; }
.reaction-btn.loading .reaction-emoji, .reaction-btn.loading .reaction-count { display: none; }
.reaction-btn.loading .loading-spinner { display: inline-block; }
.reaction-btn.active { background: #ffd90081; border-color: #ffd700; color: #000 !important; }
.reaction-btn .reaction-count[title] { cursor:help; }

/* Make emojis slightly larger on mobile */
@media (max-width: 768px) {
  /* Slightly smaller mobile emoji for balance */
  .reaction-btn .reaction-emoji { font-size: 0.6rem !important; }
}

/* Channel banner subscribe button placement and colors */
#channel-banner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Subscribe wrap: centred below channel info */
.channel-subscribe-banner {
  position: static;
  width: 100%;
  max-width: 320px;
  margin: 10px auto 0;
  display: flex;
  justify-content: center;
  z-index: 3;
}
.channel-subscribe-banner .btn { width: 100%; min-width: 120px; padding: 12px 20px; border-radius: 10px; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; text-align: center; }

/* Subscribe = accent color */
#channel-subscribe-wrap .btn.primary {
  background: var(--channel-accent, var(--user-accent, #a2ff00));
  color: #000;
  border: none;
}
#channel-subscribe-wrap .btn.primary:hover {
  filter: brightness(1.12);
}

/* Subscribed / This is you = subtle dark with accent border */
#channel-subscribe-wrap .btn.outline,
#channel-subscribe-wrap .btn[disabled] {
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 1.5px solid var(--channel-accent, var(--user-accent, #a2ff00));
  opacity: 1;
}

/* Mobile: name and subscribe each on their own line, subscribe full-width */
@media (max-width: 768px) {
  .channel-name-row {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .channel-name-row h1 {
    width: 100%;
    text-align: center;
  }
  .channel-subscribe-banner { width: 100%; max-width: 320px; padding: 0; }
  .channel-subscribe-banner .btn { width: 100%; padding: 12px 16px; font-size: 16px; border-radius: 10px; }
  .channel-banner-inner { flex-direction: column; align-items: center; text-align: center; padding: 18px 14px; gap: 10px; }
  #channel-banner { padding: 12px; flex-direction: column; align-items: center; }
  #channel-banner .channel-links { margin-top: 6px; }

  /* Make all touch targets larger on mobile for accessibility */
  .btn { min-height: 48px; padding: 12px 14px; font-size: 15px; }
}

/* Focus outlines for keyboard and screen reader users */
.btn:focus { outline: 3px solid color-mix(in srgb, var(--user-accent, #a2ff00) 15%, transparent); outline-offset: 2px; }
.btn:focus:not(:focus-visible) { outline: none; }

/* Click animation: quick pop and subtle glow */
@keyframes reaction-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.32); }
  70% { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.reaction-btn.react-animate .reaction-emoji { animation: reaction-pop 360ms cubic-bezier(.2,.9,.2,1); }
.reaction-btn.react-animate { box-shadow: 0 8px 18px color-mix(in srgb, var(--user-accent, #a2ff00) 6%, transparent); }

/* Ensure emotion buttons have enough clickable area and emojis aren't clipped */
.emotions button {
  min-width: 64px !important;
  min-height: 56px !important;
  padding: 8px 14px !important;
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Force larger desktop emoji to override any page-local overrides */

/* Duplicate #main-content removed — merged into primary rule above */

/* Final mobile override removed — base #main-content rule now handles all breakpoints via CSS vars */

/* Hide all scrollbars on widths less than desktop (992px) */
@media (max-width: 991px) {
  * {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }
  *::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
}

/* Spinner (GIF loader) */
.spinner {
  margin: 3rem auto;
  width: 120px;
  height: 120px;

  background-image: url('/public/images/loading.gif');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  border: none;
  animation: none;
}


@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ======= Video Cards ======= */
.videos-container {
  display: grid;
  gap: 1.5rem;
  width: calc(100% - 48px);
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
  grid-template-columns: 1fr; /* Mobile default: 1 column */
  justify-items: center; /* center cards horizontally */
}

/* Tablet: 2 columns */
@media (min-width: 800px) {
  .videos-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 4 columns */
@media (min-width: 1400px) {
  .videos-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* ensure direct children fill their grid cell and respect box-sizing */
  .videos-container > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}


@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-card {
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid transparent;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.18s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  isolation: isolate;
}

.video-card.float-up {
  animation: floatUp 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Make thumbnail image more prominent in video card */
.video-card img, .video-card .thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px 18px 0 0;
  margin-bottom: 0;
  display: block;
  background: #181818;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent, var(--user-accent, #a2ff00));
  box-shadow: 0 8px 28px 2px rgba(from var(--card-accent, var(--user-accent, #a2ff00)) r g b / 0.42);
}
/* Fallback for browsers without relative color syntax */
@supports not (color: rgba(from red r g b / 1)) {
  .video-card:hover {
    box-shadow: 0 8px 28px 2px color-mix(in srgb, var(--card-accent, var(--user-accent, #a2ff00)) 42%, transparent);
  }
}

.video-card {
  will-change: auto;
}

.skel-video-card,
.wgo-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.video-info {
  padding: 14px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--card-accent, var(--user-accent, #a2ff00));
}

/* Blurred creator page-bkg shown behind card info */
.video-info::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--card-bkg, none);
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.28);
  transform: scale(1.12); /* prevents blur edge artefacts */
  z-index: 0;
}

.video-info > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .video-info {
    padding: 16px;
  }
}

.video-title {
  font-weight: 700;
  color: var(--card-accent, var(--user-accent, #a2ff00));
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
  min-height: calc(1.3em * 2);
  line-height: 1.3;
}

@media (max-width: 600px) {
  #explore-grid .video-title {
    font-size: max(1rem, 1.25rem);
  }
  #explore-grid .video-meta {
    font-size: max(0.75rem, 0.82rem);
  }
}

@media (min-width: 769px) {
  .video-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

.video-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  min-width: 0;
}

.video-meta span {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.vc-username {
  font-weight: 600;
  flex-shrink: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc-meta-right {
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  text-align: right;
  flex-shrink: 1;
}

/* ── Like ratio bar ────────────────────────────────────────────── */
.video-like-pcts {
  margin-top: 8px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 600;
}

.video-like-pct-like {
  color: #7dffad;
}

.video-like-pct-dislike {
  color: rgba(255,120,120,0.9);
}

.video-like-bar {
  height: 3px;
  border-radius: 3px;
  background: rgba(255,60,60,0.45);
  margin-top: 8px;
  overflow: hidden;
}

.video-like-bar-fill {
  height: 100%;
  background: #6bff92;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.not-found-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

.info-message {
  text-align: center;
  padding: 28px 18px;
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  margin: 12px auto;
  max-width: 820px;
}

/* Hero styles consolidated below in main section */

/* ======= Blog/News Page ======= */
#blog-page {
  color: #fff;
  font-family: 'Medodica', Arial, sans-serif;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.news-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
}

.news-header h1 {
  margin: 0 0 8px 0;
  font-size: 2.5rem;
  color: var(--user-accent, #a2ff00);
  font-weight: 900;
}

.news-tagline {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

#blog-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#blog-content h2 {
  margin: 0 0 12px 0;
  font-size: 1.6rem;
  color: var(--user-accent, #a2ff00);
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.2s ease;
}

#blog-content > div:not(.spinner):hover h2 {
  color: #c8ff66;
}

.post-content {
  margin: 16px 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.post-content p {
  margin: 12px 0;
  font-size: 1rem;
  line-height: 1.6;
}

.post-content img,
.post-content figure {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.post-thumb {
  width: 100%;
  max-height: 220px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 12px;
}

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

.post-content br {
  content: " ";
}

#blog-content > div:not(.spinner) {
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 15%, transparent);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

#blog-content > div:not(.spinner):hover {
  border-color: color-mix(in srgb, var(--user-accent, #a2ff00) 30%, transparent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--user-accent, #a2ff00) 10%, transparent);
}

#blog-content > div:not(.spinner):last-child hr {
  display: none;
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 1.1rem;
  color: #ff6b6b;
}

/* Modal Styling */
.post-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow-y: auto;
  padding-top: 20px;
  animation: fadeIn 0.2s ease;
}

.post-modal.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.post-modal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.modal-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 24px;
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 40%, transparent);
  border-radius: 8px;
  color: #aed581;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Medodica', Arial, sans-serif;
  outline: none;
}

.modal-back-btn:hover {
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 30%, transparent);
  border-color: color-mix(in srgb, var(--user-accent, #a2ff00) 60%, transparent);
  transform: translateX(-4px);
}

.modal-back-btn:active {
  transform: translateX(-2px);
}

#modal-post-content h2 {
  font-size: 2rem;
  color: var(--user-accent, #a2ff00);
  margin: 0 0 16px 0;
  line-height: 1.4;
}

#modal-post-content .date {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
}

#modal-post-content .post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

#modal-post-content .post-content p {
  margin: 16px 0;
}

@media (max-width: 768px) {
  #blog-page {
    padding: 16px;
  }

  .news-header h1 {
    font-size: 1.8rem;
  }

  .news-tagline {
    font-size: 0.95rem;
  }

  #blog-content h2 {
    font-size: 1.3rem;
  }

  #blog-content > div:not(.spinner) {
    padding: 16px;
  }

  .post-modal {
    padding-top: 0;
  }

  .post-modal-content {
    padding: 16px;
  }

  .modal-back-btn {
    margin-bottom: 16px;
    margin-top: 10px;
  }

  #modal-post-content h2 {
    font-size: 1.5rem;
  }

  #modal-post-content .post-content {
    font-size: 1rem;
  }
}

/* ======= Watch Page ======= */
#watch-page {
  color: #fff;
  font-family: sans-serif;
}

#video-container {
  text-align: center;
  margin-bottom: 32px;
}

/* ── Watch page: info sections ─────────────────────────── */
.watch-info {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 1. Title + stats */
.watch-title-section {
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

#video-title {
  font-size: 1.6rem;
  margin: 0 0 6px;
  color: var(--user-accent, #a2ff00);
  font-weight: 700;
  line-height: 1.3;
}

#video-stats {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

/* 2. Creator row */
#video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.9rem;
}

#channel-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

#channel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--user-accent, #a2ff00);
  object-fit: cover;
  flex-shrink: 0;
}

#channel-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
}
#channel-name:hover { text-decoration: underline; }

/* Report button sits on the right inside #video-meta */
#video-report-btn {
  margin-left: auto;
  font-size: 0.8rem;
  padding: 6px 14px;
  opacity: 0.55;
  border-radius: 999px;
}
#video-report-btn:hover { opacity: 1; }

/* 3. Description */
.watch-desc-section {
  padding: 16px 0 4px;
}

/* Emotions */
#emotion-bar {
  text-align: center;
  margin: 28px auto;
}

.emotions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Comments */
#comment-section {
  max-width: 960px;
  margin: 0 auto;
  margin-top: 40px;
}

#comment-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

#comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(18, 24, 16, 0.55);
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 18%, transparent);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

#comment-text {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(8,8,8,0.55);
  color: #fff;
  resize: vertical;
  min-height: 80px;
  font-family: 'Medodica', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

#comment-text:focus {
  outline: none;
  border-color: var(--channel-accent, var(--user-accent, #a2ff00));
  background: rgba(0,0,0,0.7);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 12%, transparent);
}

#post-comment {
  align-self: flex-end;
  background: var(--channel-accent, var(--user-accent, #a2ff00));
  border: none;
  color: #000;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
  font-size: 0.95rem;
}

#post-comment:hover:not(:disabled) {
  background: color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 80%, #000);
  transform: translateY(-2px);
}

#post-comment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.comment {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  margin-top: 12px;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 4px solid color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 22%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  backdrop-filter: blur(2px);
  animation: commentFadeIn 0.18s ease-out both;
}

@keyframes commentFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Skeleton comment placeholder */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}
.comment-skeleton {
  margin-top: 12px;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.04);
  border-left: 4px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
}
.comment-skeleton .skel-line {
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.comment-skeleton .skel-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  flex-shrink: 0;
}
.comment-skeleton .skel-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}

/* ── Shared skeleton shimmer utility ─────────────────────────────────────────
   Any element with .skel-shimmer gets the animated sweep effect.
   Shape-specific sizing is set per component below.
   ─────────────────────────────────────────────────────────────────────────── */
.skel-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.05) 25%,
    rgba(255,255,255,0.11) 50%,
    rgba(255,255,255,0.05) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}

/* Generic re-usable line */
.skel-line { display: block; border-radius: 4px; }

/* 16:9 thumbnail placeholder */
.skel-thumb-16x9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  display: block;
}

/* ── Video card skeleton — mirrors .video-card ──────────────────────────── */
.skel-video-card {
  background: rgba(0,0,0,0.45);
  border: 2px solid rgba(255,255,255,0.04);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}
.skel-video-card .skel-video-thumb {
  border-radius: 18px 18px 0 0;
}
.skel-video-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Search item skeleton — mirrors .search-item ────────────────────────── */
.skel-search-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: flex-start;
}
.skel-search-thumb {
  width: 260px;
  height: calc(260px * 9/16);
  flex: 0 0 260px;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}
.skel-search-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 4px;
}
@media (max-width: 800px) {
  .skel-search-item { flex-direction: column; }
  .skel-search-thumb { width: 100%; height: auto; flex: 0 0 auto; }
}

/* ── Channel page skeleton ───────────────────────────────────────────────── */
.skel-channel-page { width: 100%; }
.skel-channel-banner {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  margin-bottom: 0;
}
.skel-channel-info-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0 24px;
}
.skel-channel-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skel-channel-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }

/* ── My Videos page skeleton ─────────────────────────────────────────────── */
.skel-myvideos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.skel-grid { margin-top: 8px; }

/* Dim report link */
.comment-report-btn {
  background: none;
  border: none;
  padding: 0;
  color: rgba(255,255,255,0.3);
  font-size: 0.82rem;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s;
}
.comment-report-btn:hover { color: rgba(255,100,100,0.75); }

.comment .comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment-author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.comment-author-link:hover .comment-author {
  color: var(--channel-accent, var(--user-accent, #a2ff00));
}

.comment-author-link:hover .avatar {
  border-color: color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 50%, transparent);
}

.comment .avatar {
  width:36px;height:36px;border-radius:50%;object-fit:cover;border:1px solid rgba(255,255,255,0.12);
}

.comment-author {
  font-weight:700;
  color: #ecffd9;
  font-size: 1rem;
  letter-spacing: 0.2px;
}

.comment-op-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--channel-accent, var(--user-accent, #a2ff00)) 38%, transparent);
  color: var(--channel-accent, var(--user-accent, #a2ff00));
  vertical-align: middle;
}

.comment-meta {
  margin-left: auto;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.comment-text {
  margin-top: 4px;
  color: rgba(255,255,255,0.96);
  line-height: 1.65;
  font-size: 1rem;
  white-space: pre-wrap;
}

.comment .comment-actions { margin-top: 10px; display:flex; gap:8px; flex-wrap: wrap; align-items: center; }
.comment .reply-to { font-size:0.85rem; color: rgba(255,255,255,0.5); margin-bottom:6px; font-style: italic; }

/* Comment mentions with glow */
.comment-mention {
  font-weight: bold;
  cursor: pointer;
  transition: text-shadow 0.2s ease;
  padding: 0 3px;
}
.comment-mention:hover {
  opacity: 0.9;
}

/* User popup modal */
.comment-user-popup {
  position: fixed;
  background-color: #1a1a1a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid #a2ff00;
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(162, 255, 0, 0.2);
  z-index: 10000;
  animation: popupFadeIn 0.2s ease;
  backdrop-filter: blur(8px);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.comment-popup-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-popup-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(162, 255, 0, 0.1);
  object-fit: cover;
  flex-shrink: 0;
}

.comment-popup-name-section {
  flex: 1;
}

.comment-popup-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #a2ff00;
  margin: 0 0 4px 0;
}

.comment-popup-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
  line-height: 1.4;
  max-height: 80px;
  overflow-y: auto;
}

.comment-popup-followers {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
}

.comment-popup-link {
  display: block;
  text-align: center;
  padding: 10px 12px !important;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.comment-popup-link:hover {
  box-shadow: 0 0 12px rgba(162, 255, 0, 0.3) !important;
}

/* Replies visual grouping */
.comment .replies { margin-top: 8px; }
.comment .replies > .comment { margin-left: 12px; border-left-width: 3px; }

@media (max-width: 768px) {
  .comment { padding: 12px; border-radius: 10px; }
  .comment .avatar { width:32px;height:32px; }
  .comment .replies > .comment { margin-left: 0; }
  .comment .comment-header { gap:8px; }
  .comment-text { font-size: 0.98rem; }
  .comment .comment-actions button { padding:10px 12px; }
}

/* Collapsible threads */
.replies {
  position: relative;
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.22s ease, opacity 0.2s ease;
  opacity: 1;
}
.replies > .replies-inner { min-height: 0; overflow: hidden; }
.replies.collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.reply-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 3px 10px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.2px;
}
.reply-toggle:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.reply-toggle.small { font-size: 0.8rem; }

/* Comment like / dislike buttons */
.comment-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1;
}
.comment-react-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.2);
}
.comment-react-btn.active {
  background: rgba(162,255,0,0.1);
  border-color: rgba(162,255,0,0.35);
  color: #a2ff00;
}
.comment-react-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cr-emoji { font-size: 0.9rem; line-height: 1; }
.cr-count { min-width: 10px; text-align: center; }

/* Comment-row reaction buttons — smaller variant of .reaction-btn */
.comment-actions .reaction-btn {
  padding: 3px 9px;
  font-size: 0.82rem;
  border-radius: 20px;
  gap: 4px;
}
.comment-actions .reaction-btn .reaction-emoji { font-size: 0.85rem !important; }
.comment-actions .reaction-btn .reaction-count { font-size: 0.82rem; min-width: 10px; font-weight: 600; }

@media (min-width: 769px) {
  /* intentionally empty — guide line removed */
}

/* Collapsed state — handled by grid-template-rows transition above */
/* Keep this as a hard override for the scrollToAndOpenReply deep-link logic
   which re-adds .collapsed; the opacity + pointer-events handle visual hiding */
.replies.collapsed { display: grid !important; }

/* Inline reply box */
.inline-reply-box {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 10%, transparent);
}
.inline-reply-box textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 15px;
  resize: vertical;
  box-sizing: border-box;
}
.inline-reply-box .inline-reply-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}

#report-page .form-row { margin-bottom: 14px; }
#report-page label { display:block; font-weight:700; color: #e7ffd1; margin-bottom: 6px; }
#report-page input,
#report-page select,
#report-page textarea { width:100%; padding:10px; border-radius:6px; border:1px solid rgba(255,255,255,0.06); background: rgba(0,0,0,0.45); color:#fff; }
#report-page textarea { min-height: 120px; }
#report-page .info { color: rgba(255,255,255,0.6); font-size:0.9rem; margin-top: 6px; }
#report-page .checkbox { color: rgba(255,255,255,0.9); }

#report-page .report-wizard {
  margin: 10px 0 16px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 8%, rgba(0,0,0,0.45));
}
#report-page .report-wizard-header h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--user-accent, #a2ff00);
}
#report-page .report-wizard-header p {
  margin: 0 0 12px;
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
}
#report-page .report-wizard-row label {
  font-size: 0.9rem;
}
#report-page .report-line-marker-note {
  margin-top: 10px;
  border-top: 1px dashed color-mix(in srgb, var(--user-accent, #a2ff00) 25%, transparent);
  padding-top: 8px;
}

#report-page .form-actions { display:flex; justify-content:flex-end; }
#report-page .btn.primary { background: linear-gradient(90deg,var(--user-accent, #a2ff00),#88cc00); color:#000; min-height:44px; padding:10px 16px; border-radius:8px; font-weight:800; border:none; cursor:pointer; }
#report-feedback { margin-top: 14px; }

#report-page .signin-notice { padding:12px; border-radius:8px; background: color-mix(in srgb, var(--user-accent, #a2ff00) 3%, transparent); color: #e7ffd1; border:1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 4%, transparent); margin-bottom:12px; font-size:0.95rem; }

@media (max-width: 600px) {
  #report-page .card { padding: 12px; }
  #report-page .form-actions { justify-content: center; }
}

/* ======= Channel Page ======= */
#channel-page {
  color: #fff;
  font-family: 'Medodica', Arial, sans-serif;
}

#channel-banner {
  position: relative;
  width: 100%;
  height: flex;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.6));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;

  /* slight rounding */
  border-radius: 12px;
  overflow: hidden; /* ensure overlay + image respect radius */
}

/* VERY slight dark overlay (banner still visible) */
#channel-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.568)
  );
  z-index: 1;
}

.channel-banner-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 35px;
  max-width: 1100px;
  margin: 0 auto;
  z-index: 2;
}

.channel-meta h1 {
  margin: 0;
  font-size: 1.75rem;
  color: var(--user-accent, #a2ff00);
  text-align: center;
}

.channel-meta p {
  margin: 4px 0 0;
  color: #ddd;
  opacity: 0.9;
  text-align: center;
}

/* Channel external link list: match global button styles and spacing */
.channel-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* Badges always inline next to username */
.channel-badges-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Subscriber count line */
.channel-sub-count-line {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.channel-sub-count {
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}

/* ===== Mobile channel banner ===== */
@media (max-width: 768px) {
  .channel-banner-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 14px;
    gap: 10px;
  }

  /* Center avatar explicitly */
  .channel-pfp {
    display: block;
    margin: 0 auto;
  }

  /* Full-width so text-align:center applies to all content */
  .channel-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .channel-meta h1 {
    font-size: 1.35rem;
  }

  .channel-meta p {
    font-size: 0.95rem;
    max-width: 420px;
  }
}


/* Grid container: channel + legacy */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1100px;
  margin: 20px auto;
}

/* Meta row */
.video-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.video-meta span {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .channel-banner {
    height: 160px;
  }

  .channel-banner-inner {
    padding: 12px;
  }

  #channel-avatar {
    width: 72px;
    height: 72px;
  }

  .channel-meta h1 {
    font-size: 1.2rem;
  }
}
/* Video container */
#video-shell {
  position: relative;
  width: 100%;
  max-width: 100%;        /* remove fixed max-width */
  margin: 0 auto;

  border-radius: 6px;
  overflow: hidden;       /* ensures controls + spinner respect radius */

  background: #000;
}

/* Watch layout: main player and related sidebar */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.watch-main {
  min-width: 0;
}

.watch-related {
  max-width: 340px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .watch-layout { grid-template-columns: 1fr; }
  .watch-related { order: 2; max-width: none; width: 100%; }
  .watch-main { order: 1; }

  /* Center the video shell when layout stacks on mobile */
  .watch-main #video-shell {
    margin-left: auto;
    margin-right: auto;
    display: block;
    max-width: var(--watch-max-width);
    width: 100%;
  }

  /* Make controls adapt to narrow widths without wrapping */
  #watch-page .yt-controls .controls-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #watch-page .controls-row .seek-container {
    flex: 1 1 auto;
    width: auto;
    min-width: 140px;
    margin: 6px 0;
  }
  #watch-page .controls-row button, #watch-page .controls-row select {
    flex: 0 0 auto;
  }
}

/* Mobile watch UI polish: touch targets, stacked metadata, readable text */
@media (max-width: 600px) {
  #watch-page .yt-controls { padding: 14px 12px; }
  #watch-page .controls-row { display:flex; gap:10px; align-items:center; justify-content:center; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  #watch-page .controls-row > button { padding: 12px 14px !important; font-size:1.05rem !important; min-width:48px; }
  #watch-page .controls-row .seek-container { order: 2; width: auto; flex: 1 1 auto; min-width: 140px; margin: 8px 0; }
  #watch-page .controls-row .seek-container input[type="range"] { width: 100%; }

  /* Give all text sections comfortable side padding */
  #watch-page .watch-info { padding: 0 14px; }

  #watch-page #video-title { font-size: 1.15rem; line-height: 1.3; }
  #watch-page #video-stats { font-size: 0.8rem; }
  #watch-page .watch-title-section { padding: 12px 0 10px; }

  #watch-page #video-meta {
    padding: 10px 0;
    gap: 8px;
    flex-wrap: wrap;
  }
  #watch-page #channel-info { gap: 10px; }
  #watch-page #channel-info img { width: 36px; height: 36px; }

  /* Report button full-width pill below creator row on mobile */
  #watch-page #video-report-btn {
    margin-left: 0;
    width: 100%;
    text-align: center;
    order: 1;
  }

  #watch-page .watch-desc-section { padding: 12px 0 4px; }
  #watch-page #video-desc { font-size: 0.95rem; color: rgba(255,255,255,0.9); line-height: 1.6; }

  /* Video tags */
  #watch-page .video-tags-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); }
  #watch-page .video-tags { display: flex; flex-wrap: wrap; gap: 6px; }

  #watch-page .watch-related { padding: 0 14px 12px; }

  /* Make emotion buttons larger and more tappable */
  #watch-page #emotion-bar .emotions button { padding:10px 12px; min-width:44px; border-radius:10px; }

  /* Comments and other sections full width with comfortable padding */
  #watch-page #comment-section { padding: 0 14px; }
  #watch-page #comment-form { padding: 12px; }
  #watch-page textarea#comment-text { width: 100%; min-height:72px; resize: vertical; }
}

/* Video player */
#video-player {
  width: 100%;
  height: auto;
  display: block;
  background: black;
  object-fit: contain;
}

/* Spinner overlay */
.spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;          /* above controls */
  
  width: 120px;
  height: 120px;
  background-image: url('/public/images/loading.gif');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  display: none;          /* toggle with JS */
}

/* Fullscreen adjustments */
#video-shell.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  z-index: 9999;
}

/* Make the video truly fill the fullscreen container while keeping aspect ratio
   - absolutely position the <video> to remove document flow constraints
   - use object-fit:cover and object-position:center to crop from center
*/
#video-shell.fullscreen #video-player {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important; /* preserve aspect, letterbox to fit */
  object-position: center center !important;
}

/* also force for native fullscreen pseudo-classes to override inline styles */
#video-shell:fullscreen #video-player,
#video-shell:-webkit-full-screen #video-player,
#video-shell:-moz-full-screen #video-player,
#video-shell:-ms-fullscreen #video-player {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* when user chooses cover mode, crop to fill */
#video-shell.fullscreen.fs-cover #video-player,
#video-shell:fullscreen.fs-cover #video-player,
#video-shell:-webkit-full-screen.fs-cover #video-player {
  object-fit: cover !important;
}

#fs-mode-btn {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.04);
  margin-right: 6px;
}

/* Note: additional fullscreen player rules defined near top of file */

#video-shell.fullscreen .spinner {
  width: 150px;   /* slightly larger for fullscreen */
  height: 150px;
}


/* ---------------- Controls ---------------- */
.yt-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0));
  opacity: 1;
  transition: opacity 0.25s ease;
}

.yt-controls.hide {
  opacity: 0;
  pointer-events: none;
}

.controls-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

/* Seek container expands to take center space */
.controls-row .seek-container { flex: 1 1 auto; margin: 0 12px; }
.controls-row #seek-bar { width: 100%; }
.controls-row #time-display { margin-left: 8px; margin-right: 6px; white-space: nowrap; }

/* Buttons */
#play-btn,
#pause-btn,
#fs-btn {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

/* Sliders */
#seek-bar,
#volume-bar {
  appearance: none;
  height: 5px;
  border-radius: 4px;
  color: #aaa;
  background: rgba(191, 171, 171, 0.3);
  cursor: pointer;
}

#seek-bar { flex: 1; }
#volume-bar { width: 90px; }

#seek-bar::-webkit-slider-thumb,
#volume-bar::-webkit-slider-thumb,
#seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
}

/* Firefox thumb */
#seek-bar::-moz-range-thumb,
#volume-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  cursor: pointer;
}

/* Time Display */
#time-display {
  font-size: 0.85rem;
  opacity: 0.85;
  white-space: nowrap;
}

/* Speed Selector */
#speed-select {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #time-display { display: none; }
  #volume-bar { width: 70px; }
  #speed-select { display: none; }
  
  /* Simplify auth pages on mobile - remove padding, cleaner UI */
  #main-content > .spa-container#login-page,
  #main-content > .spa-container#register-page,
  #main-content > .spa-container#reset-page,
  #main-content > .spa-container#mfa-page {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  #login-page main,
  #register-page main,
  #reset-page main,
  #mfa-page main {
    padding: 12px 12px 24px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .settings-page-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Remove card styling on mobile for cleaner look */
  .auth-card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  
  .auth-form {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }
  
  .form-row {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Simplify form inputs on mobile */
  .auth-card input,
  .reset-panel input {
    padding: 14px 12px !important;
    font-size: 16px !important; /* Prevent zoom on iOS */
    border-radius: 10px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
  }
  
  .auth-card label {
    font-size: 0.9rem !important;
    margin-bottom: 8px !important;
  }
  
  /* Larger touch targets for buttons on mobile */
  .auth-card .btn,
  .reset-panel .btn,
  #mfa-page .btn {
    padding: 14px 20px !important;
    font-size: 1rem !important;
    min-height: 48px !important;
    border-radius: 10px !important;
  }
  
  /* Simplify settings page on mobile */
  .settings-page-content {
    padding: 12px 16px !important;
  }
  
  .settings-header {
    padding: 0 0 16px 0 !important;
  }
  
  .settings-header h1 {
    font-size: 1.5rem !important;
  }
  
  .settings-card {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }
  
  .settings-grid {
    gap: 12px !important;
    padding: 0 !important;
  }
  
  /* Account page simplifications */
  #account-page main {
    padding: 12px 16px 24px 16px !important;
  }
  
  #account-page .card {
    padding: 16px !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
  }
  
  #account-page input,
  #account-page select {
    font-size: 16px !important; /* Prevent zoom */
    padding: 12px !important;
  }
  
  /* Cleaner page headers on mobile */
  .settings-page-header h2 {
    font-size: 1.6rem !important;
    margin-bottom: 8px !important;
  }
  
  /* Remove extra spacing on mobile */
  .form-row {
    margin-bottom: 16px !important;
  }
  
  /* MFA page mobile tweaks */
  #mfa-page .card {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  
  #mfa-page input[type="text"] {
    font-size: 18px !important;
    padding: 16px !important;
    text-align: center !important;
    letter-spacing: 4px !important;
  }
}

/* Search results styling - card-based layout */
#search-hero {
  background: rgba(0, 0, 0, 0.3);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  margin-bottom: 20px;
}

#search-info {
  padding: 12px 16px;
  background: rgba(162, 255, 0, 0.06);
  border-left: 4px solid var(--user-accent, #a2ff00);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 24px;
  font-weight: 500;
}

#search-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.search-pill {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 16px;
  gap: 10px;
  transition: all 0.24s ease;
}

.search-pill:focus-within {
  border-color: var(--user-accent, #a2ff00);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 16px rgba(162, 255, 0, 0.15);
}

.search-pill-icon {
  color: var(--user-accent, #a2ff00);
  font-size: 1.2rem;
  flex: 0 0 auto;
}

#search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-pill-clear {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.search-pill-clear:hover {
  color: var(--user-accent, #a2ff00);
}

.search-pill-btn {
  background: linear-gradient(135deg, var(--user-accent, #a2ff00) 0%, rgba(162, 255, 0, 0.8) 100%);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(162, 255, 0, 0.2);
}

.search-pill-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(162, 255, 0, 0.3);
}

.search-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-filters .btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-filters .btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Results sections */
.search-section {
  margin-bottom: 40px;
}

.search-section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--user-accent, #a2ff00);
  text-transform: capitalize;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(180deg, var(--user-accent, #a2ff00) 0%, rgba(162, 255, 0, 0.3) 100%);
  border-radius: 2px;
}

/* Grid layout for results */
#search-results {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: 1fr;
  gap: 0;
}

.search-section {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 40px;
}

.search-results-grid {
  display: grid !important;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 40px !important;
}

.search-results-grid .video-card {
  margin: 0 !important;
}

.search-section-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.search-result {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid transparent;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.search-result:hover {
  transform: translateY(-6px);
  border-color: var(--user-accent, #a2ff00);
  box-shadow: 0 8px 28px rgba(162, 255, 0, 0.2);
}

.search-result.float-up {
  animation: floatUp 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Video results */
.search-result-video {
  position: relative;
}

.search-result-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #000;
  position: relative;
}

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

.search-result-type {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--user-accent, #a2ff00);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

/* Profile results */
.search-result-profile {
  align-items: stretch !important;
  flex-direction: row !important;
  gap: 16px !important;
  padding: 16px !important;
}

.search-result-profile:hover {
  background: rgba(0, 0, 0, 0.8) !important;
  transform: translateX(4px) !important;
}

.search-result-profile-avatar {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--user-accent, #a2ff00);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.search-result-profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.search-result-profile-avatar .gobbo-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
}

.search-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.search-result-badge {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.profile-placeholder {
  font-size: 2.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.profile-placeholder-small {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Profile search result stats display */
.search-result-stats {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 8px 0 4px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-result-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.search-result-profile-avatar .search-result-type {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  font-size: 0.65rem;
  background: var(--user-accent, #a2ff00);
  color: #000;
}

/* Tag results */
.search-result-tag {
  align-items: center !important;
  flex-direction: row !important;
  min-height: 100px;
  justify-content: center;
}

.search-result-tag-icon {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--user-accent, #a2ff00) 0%, rgba(162, 255, 0, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: #000;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

/* Common content styling */
.search-result-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-top: 3px solid var(--user-accent, #a2ff00);
}

.search-result-video .search-result-content {
  border-top: 3px solid var(--user-accent, #a2ff00);
  background: rgba(162, 255, 0, 0.02);
}

.search-result-profile .search-result-content {
  border-top: none !important;
  border-left: 3px solid var(--user-accent, #a2ff00) !important;
  padding: 0 0 0 12px !important;
  gap: 6px !important;
}

.search-result-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-video .search-result-title {
  color: #fff !important;
}

.search-result-profile .search-result-title {
  color: var(--user-accent, #a2ff00) !important;
}

.search-result-subtitle {
  font-size: 0.9rem;
  color: var(--user-accent, #a2ff00);
  font-weight: 600;
  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.35;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-profile .search-result-desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.3;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  margin-bottom: 4px;
}

.search-result-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
}

.search-result-profile .search-result-meta {
  font-size: 0.75rem;
  margin-top: 0;
}

.search-result-profile .search-result-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
  line-clamp: 1;
  -webkit-line-clamp: 1;
}

.search-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .search-section:not(.search-section-title) {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  #search-hero {
    padding: 16px;
  }

  #search-top {
    gap: 12px;
  }

  .search-section:not(.search-section-title) {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .search-result {
    border-radius: 12px;
  }

  .search-result-profile {
    flex-direction: column !important;
    align-items: center !important;
  }

  .search-result-profile-avatar {
    width: 100%;
    height: 120px;
    border-radius: 12px 12px 0 0;
  }

  .search-result-profile-avatar img {
    border-radius: 8px;
    width: 80px;
    height: 80px;
  }

  .search-result-profile .search-result-content {
    text-align: center;
    border-top: 3px solid var(--user-accent, #a2ff00);
  }

  .search-result-tag {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }

  .search-result-tag-icon {
    width: 100%;
    height: 80px;
    flex: 1;
    border-radius: 12px 12px 0 0;
  }

  .search-result-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .search-section:not(.search-section-title) {
    grid-template-columns: 1fr;
  }

  .search-section-title {
    font-size: 1.15rem;
  }

  .search-result {
    flex-direction: row;
  }

  .search-result-thumb {
    display: none;
  }

  .search-result-video {
    flex-direction: row;
  }

  .search-result-video .search-result-thumb {
    width: 100px;
    height: 56px;
    aspect-ratio: 16/9;
    display: block;
    flex: 0 0 100px;
    margin-right: 8px;
    border-radius: 8px;
  }

  .search-result-profile-avatar {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;
    border-radius: 50%;
  }

  .search-result-profile-avatar img {
    width: 100%;
    height: 100%;
  }

  .search-result-tag-icon {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    border-radius: 10px;
    font-size: 1.8rem;
  }

  .search-result-content {
    padding: 10px;
  }

  .search-result-title {
    font-size: 0.9rem;
    line-clamp: 1;
    -webkit-line-clamp: 1;
  }

  .search-result-desc {
    font-size: 0.8rem;
    line-clamp: 1;
    -webkit-line-clamp: 1;
  }
}

/* ================= Watch page strong overrides ================= */
/* These rules apply only within the watch page to avoid conflicts elsewhere. */
#watch-page {
  --watch-max-width: 1100px;
}

#watch-page #video-shell {
  margin: 24px auto;
  max-width: var(--watch-max-width);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(8,8,8,0.85));
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  /* maintain a 16:9 aspect ratio for the shell */
  aspect-ratio: 16 / 9;
  width: 100%;
}

#watch-page #video-player {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: black !important;
}

/* Ensure controls sit above the player but don't create extra rounded black areas */
#watch-page .yt-controls {
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
  padding: 12px !important;
}

#watch-page .controls-row {
  align-items: center;
  gap: 10px;
}

#watch-page .controls-row > button,
#watch-page .controls-row select,
#watch-page .controls-row input[type="range"] {
  z-index: 3;
}

#watch-page .controls-row button {
  background: rgba(0,0,0,0.32) !important;
  border: 1px solid rgba(255,255,255,0.06) !important;
  color: #fff !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  min-width: 40px;
}

/* Related videos grid — single column in sidebar, multi-column when full-width on mobile */
#related-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  #related-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    justify-items: center;
  }
}

/* Sidebar layout: show related cards in-page (no internal scroll) */
#watch-page .watch-related {
  max-height: none;
  overflow-y: visible;
  padding-right: 6px;
}

#watch-page .watch-related .video-card { margin-bottom: 0; }

/* Avoid global forced font/color rules breaking the player UI in this area */
#watch-page * { color: inherit; }

@media (max-width: 900px) {
  /* Make the video shell edge-to-edge and keep 16:9 on mobile */
  #watch-page #video-shell {
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    aspect-ratio: 16 / 9;
  }
  #watch-page { --watch-max-width: 100%; }
  #watch-page .watch-related { max-height: none; overflow: visible; }
}

/* Related cards now use the standard .video-card layout — old overlay styles removed */

/* Centered play overlay */
#video-overlay-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  z-index: 5;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: opacity 180ms ease, transform 160ms ease;
  opacity: 0.18;
  pointer-events: auto;
}

/* Visible state when controls are shown */
#video-overlay-play.visible { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }

/* Playing state keeps a subtle visible affordance */
#video-overlay-play.playing { opacity: 0.28; }

#video-overlay-play:hover { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }

#video-overlay-play.hidden { display: none; }

/* Subscribed carousel styles */
.sub-carousel { display:block; }
.sub-carousel .sub-prev, .sub-carousel .sub-next { flex: 0 0 auto; }
.sub-track { display:flex; gap:12px; overflow-x:auto; scroll-behavior:smooth; padding:8px 4px; -webkit-overflow-scrolling:touch; }
.sub-card { min-width: 260px; max-width: 420px; background:#0b0b0b; border-radius:10px; overflow:hidden; cursor:pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.35); position:relative; flex: 0 0 calc(33.333% - 12px); }
.sub-thumb { width:100%; aspect-ratio:16/9; background-size:cover; background-position:center; display:block; }
.sub-overlay { position:absolute; left:0; right:0; bottom:0; padding:12px; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%); color:#fff; }
.sub-from { font-size:0.85rem; color:rgba(255,255,255,0.85); margin-bottom:6px; }
.sub-title { font-weight:700; color:var(--user-accent, #a2ff00); font-size:1rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sub-stats { font-size:0.85rem; color:rgba(255,255,255,0.7); margin-top:6px; }

/* hide track scrollbar for cleaner look */
.sub-track::-webkit-scrollbar { height:8px; }
.sub-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 6px; }

/* Responsive: show 3 cards per view on large screens, 2 on medium, 1 on small */
@media (max-width: 1100px) { .sub-card { flex: 0 0 calc(50% - 12px); } }
@media (max-width: 700px) { .sub-card { flex: 0 0 calc(100% - 12px); } }

/* Center title and description on watch page */
#watch-page .watch-title-section,
#watch-page #video-title,
#watch-page #video-stats,
#watch-page #video-desc {
  text-align: left;
}

.search-input-wrapper .btn {
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.05);
  margin-left: 8px; /* spacing between input and button */
}
.search-input-wrapper .btn:hover { background: rgba(255,255,255,0.06); }

/* Clear (x) button positioned inside the input on the right */
.search-input-wrapper .clear-btn {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-input-wrapper .clear-btn:hover { color: #fff; }

/* Search top layout */
#search-top { display:flex; gap:8px; align-items:center; flex-wrap: wrap; }
.search-filters { min-width:160px; display:flex; flex-direction:column; }
.search-filters > #search-filters { display:flex; gap:8px; align-items:center; flex-wrap: wrap; }
.search-filters { min-width:0; }
@media (min-width:900px){ .search-filters { min-width:180px; } }

/* ensure input and button sit in one row */
.search-input-area { display:flex; gap:8px; align-items:center; }
.search-input-area .btn { margin-left:0; }

/* ===== Comprehensive Mobile Fixes ===== */
@media (max-width: 768px) {
  /* Search page: stack input area above filters on small screens */
  #search-top {
    flex-direction: column;
    align-items: stretch;
  }
  #search-top > div { width: 100%; }
  .search-filters { width: 100%; min-width: 0; }
  .search-filters > #search-filters { flex-wrap: wrap; gap: 8px; }
  .search-filters select { flex: 1 1 auto; min-width: 100px; }

  /* Login / register: "remember me + forgot password" row wraps */
  .form-row[style*="flex"] {
    flex-wrap: wrap;
  }

  /* nav profile popup: ensure login item is tappable */
  #nav-profile-popup.mobile .nppm-item {
    padding: 16px 18px;
    font-size: 1.05rem;
    text-align: center;
  }

  /* General .spa-container horizontal overflow guard + side gutter */
  .spa-container {
    overflow-x: hidden;
    word-break: break-word;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Ensure all form inputs are at least 44px tall for accessibility */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    min-height: 44px;
    font-size: 16px !important; /* Prevents iOS zoom */
  }

  /* Stack channel colour row on narrow screens */
  #profile-page .settings-form-group > div[style*="flex"] {
    flex-wrap: wrap;
  }
}

/* ── Ban banner ───────────────────────────────────────────────────────────── */
.gobbo-ban-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #7a0000 0%, #b30000 50%, #7a0000 100%);
  border-bottom: 2px solid #ff3333;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 2px 16px rgba(200,0,0,0.45);
  animation: banBannerIn 0.3s ease;
}
@keyframes banBannerIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.gobbo-ban-banner .gbb-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.gobbo-ban-banner .gbb-text {
  flex: 1;
}
.gobbo-ban-banner .gbb-text a {
  color: #ffaaaa;
  text-decoration: underline;
}
/* Push header down when ban banner is present (alone) */
body:has(.gobbo-ban-banner):not(:has(.gobbo-admin-notif-banner)) header {
  top: 44px;
}

/* ── Admin notification banner ────────────────────────────────────────────── */
.gobbo-admin-notif-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #3a2900 0%, #6a4c00 50%, #3a2900 100%);
  border-bottom: 2px solid #ffb800;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 2px 16px rgba(160, 100, 0, 0.45);
  animation: adminNotifIn 0.3s ease;
}
@keyframes adminNotifIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
/* If ban banner is also visible, push admin banner below it */
body:has(.gobbo-ban-banner) .gobbo-admin-notif-banner {
  top: 44px;
}
.gobbo-admin-notif-banner .ganb-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.gobbo-admin-notif-banner .ganb-text {
  flex: 1;
}
.gobbo-admin-notif-banner .ganb-text a {
  color: #ffe08a;
  text-decoration: underline;
}
.gobbo-admin-notif-banner .ganb-dismiss {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  line-height: 1.4;
  transition: background 0.15s;
}
.gobbo-admin-notif-banner .ganb-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
}
/* Push header down when admin notif banner is present (alone) */
body:has(.gobbo-admin-notif-banner):not(:has(.gobbo-ban-banner)) header {
  top: 44px;
}
/* Push header down when BOTH banners are present */
body:has(.gobbo-ban-banner):has(.gobbo-admin-notif-banner) header {
  top: 88px;
}

/* ── Notification bell button ───────────────────────────────────────────── */
.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.18s, transform 0.15s;
  flex-shrink: 0;
}
.notif-bell-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.notif-bell-btn:active { 
  transform: scale(0.92);
}
.notif-bell-btn svg { 
  display: block;
}

/* Mobile bell: absolute top-right in header, hidden on desktop */
.notif-bell-mobile {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}
@media (min-width: 769px) {
  .notif-bell-mobile { display: none !important; }
}
@media (max-width: 768px) {
  #notif-bell-btn { display: none !important; }
}

/* Unread badge */
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 10px;
  background: #ff4444;
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  animation: notif-pop 0.25s cubic-bezier(.36,.07,.19,.97);
}
@keyframes notif-pop {
  0% { transform: scale(0); }
  80% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Bell hover animation */
@keyframes notif-bell-shake {
  0%,100% { transform: rotate(0deg); }
  20% { transform: rotate(-16deg); }
  40% { transform: rotate(16deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(6deg); }
}
.notif-bell-btn:hover svg {
  animation: notif-bell-shake 0.45s ease;
}

/* Greeting slide animation */
@keyframes greetingSlide {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Notification panel ─────────────────────────────────────────────────── */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: transparent;
}
.notif-system-modal {
  position: fixed;
  inset: 0;
  z-index: 13010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.notif-system-panel {
  width: min(760px, calc(100vw - 32px));
  max-height: min(82vh, 760px);
  overflow: auto;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--user-accent, #a2ff00) 16%, transparent) 0%, transparent 26%),
    linear-gradient(180deg, #171717 0%, #101010 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
  padding: 22px;
}
.notif-system-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.notif-system-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--user-accent, #a2ff00) 70%, white) !important;
}
.notif-system-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #fff !important;
}
.notif-system-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  color: #fff !important;
  flex-shrink: 0;
}
.notif-system-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.notif-system-description {
  margin: 0;
  color: rgba(255,255,255,0.88) !important;
  line-height: 1.65;
  white-space: pre-wrap;
}
.notif-system-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.notif-system-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45) !important;
  margin-bottom: 3px;
}
.notif-system-meta dd {
  margin: 0;
  color: rgba(255,255,255,0.9) !important;
  word-break: break-word;
}
.notif-system-meta code {
  white-space: pre-wrap;
}
.notif-system-email {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}
.notif-system-email summary {
  cursor: pointer;
  font-weight: 700;
  color: rgba(255,255,255,0.82) !important;
  margin-bottom: 10px;
}
.notif-system-email pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.9rem;
  line-height: 1.55;
}
.notif-system-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.notif-system-btn {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: #fff !important;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}
.notif-system-btn-primary {
  background: color-mix(in srgb, var(--user-accent, #a2ff00) 16%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--user-accent, #a2ff00) 28%, rgba(255,255,255,0.14));
  color: #fff !important;
}
.notif-panel {
  position: fixed;
  z-index: 13001;
  background: linear-gradient(180deg, #161616 0%, #1c1c1c 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  border-radius: 14px;
  width: 340px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
@media (max-width: 768px) {
  .notif-panel {
    width: 100%;
    max-height: 70vh;
    border-radius: 18px 18px 0 0;
    top: auto !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
  }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--user-accent, #a2ff00) !important;
  flex: 1;
}
.notif-mark-all-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6) !important;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.notif-mark-all-btn:hover {
  background: rgba(255,255,255,0.07);
  color: #fff !important;
}
.notif-delete-all-btn {
  background: rgba(255,72,72,0.08);
  border: 1px solid rgba(255,72,72,0.24);
  color: rgba(255,170,170,0.9) !important;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.notif-delete-all-btn:hover {
  background: rgba(255,72,72,0.16);
  border-color: rgba(255,72,72,0.45);
  color: #ffc0c0 !important;
}
.notif-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5) !important;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.notif-close-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff !important;
}

.notif-list {
  overflow-y: auto;
  flex: 1;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.notif-empty {
  padding: 36px 20px;
  text-align: center;
  color: rgba(255,255,255,0.35) !important;
  font-size: 14px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.notif-item.notif-system-item {
  border-left: 3px solid color-mix(in srgb, var(--user-accent, #a2ff00) 70%, white);
  background: rgba(162,255,0,0.04);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-item.notif-unread { background: rgba(255,255,255,0.04); }
.notif-item.notif-unread:hover { background: rgba(255,255,255,0.08); }

.notif-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.3;
}
.notif-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.notif-msg {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9) !important;
  line-height: 1.4;
  word-break: break-word;
}
.notif-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55) !important;
  line-height: 1.4;
  word-break: break-word;
}
.notif-time {
  font-size: 11px;
  color: rgba(255,255,255,0.38) !important;
}
.notif-item.notif-clickable { cursor: pointer; }
.notif-item.notif-clickable:hover { background: rgba(255,255,255,0.07); }
.notif-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.3) !important;
  flex-shrink: 0;
  align-self: center;
  line-height: 1;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--user-accent, #a2ff00);
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 5px var(--user-accent, #a2ff00);
}

.notif-dupe-badge {
  align-self: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.72) !important;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  line-height: 1;
}

.notif-delete-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.55) !important;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.notif-delete-btn:hover {
  background: rgba(255, 72, 72, 0.18);
  border-color: rgba(255, 72, 72, 0.45);
  color: #ff9b9b !important;
}

/* ═════════════════════════════════════════════════════════════════
   MODERATION ACTION BAR — Account Warning Bar (Above Header)
   ═════════════════════════════════════════════════════════════════ */

.service-alert-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  z-index: 1305;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #d19c00 0%, #b97f00 45%, #8f5f00 100%);
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 4px 16px rgba(240, 180, 0, 0.24);
  overflow: visible;
}

.service-alert-banner[data-state="collapsed"],
.service-alert-banner[data-state="expanded"] {
  display: block;
}

.service-alert-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.service-alert-trigger-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.service-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  color: #fff;
}

.service-alert-summary {
  min-width: 0;
  color: #fff;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-alert-chevron {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
  color: #fff;
}

.service-alert-banner[data-state="expanded"] .service-alert-chevron {
  transform: rotate(180deg);
}

.service-alert-panel {
  position: fixed;
  top: calc(var(--service-alert-h, 0px) + 8px);
  left: 8px;
  right: 8px;
  max-height: calc(100vh - var(--service-alert-h, 0px) - 24px);
  overflow: auto;
  padding: 12px;
  z-index: 1306;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(32, 22, 0, 0.98) 0%, rgba(58, 38, 0, 0.98) 100%);
  border: 1px solid rgba(255, 213, 79, 0.28);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  pointer-events: auto;
}

.service-alert-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 0;
  height: 34px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  margin-bottom: 10px;
  white-space: nowrap;
}

.service-alert-close-icon {
  font-size: 1rem;
  line-height: 1;
}

.service-alert-close-text {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.service-alert-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.service-alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-alert-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.service-alert-card-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.service-alert-card-desc {
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 1;
}

.service-alert-card-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-alert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.service-alert-link:hover {
  color: #fff !important;
}

.service-alert-link:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.48);
}

.moderation-action-bar {
  position: fixed;
  top: var(--service-alert-h, 0px);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #ff4757 0%, #ee5a6f 100%);
  color: white;
  z-index: 10008;
  padding: 14px 20px;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  width: 100%;
  box-sizing: border-box;
  display: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-100%);
}

.moderation-action-bar[data-moderation="visible"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideDown 0.3s ease forwards;
  opacity: 1;
  transform: translateY(0);
}

.moderation-action-bar[data-moderation="hidden"] {
  display: none !important;
  opacity: 0;
  transform: translateY(-100%);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.moderation-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  gap: 12px;
}

.moderation-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.moderation-bar-icon {
  font-size: 24px;
  flex-shrink: 0;
  animation: pulse-warn 2s infinite;
}

.moderation-bar-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.moderation-bar-title {
  font-weight: 700;
  font-size: 16px;
  color: white;
}

.moderation-bar-subtitle {
  font-size: 13px;
  opacity: 0.9;
  color: white;
}

.moderation-bar-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 10px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moderation-bar-close:hover {
  opacity: 1;
}

@keyframes pulse-warn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Adjust header when moderation bar is visible */
body:has(.moderation-action-bar[data-moderation="visible"]) header {
  top: calc(var(--service-alert-h, 0px) + 80px);
  transition: top 0.3s ease;
}

/* Reset header when bar is hidden */
body:has(.moderation-action-bar[data-moderation="hidden"]) header {
  top: var(--service-alert-h, 0px);
  transition: top 0.3s ease;
}

/* Adjust body when bar is visible */
body:has(.moderation-action-bar[data-moderation="visible"]) {
  padding-top: 0;
  transition: padding-top 0.3s ease;
  box-sizing: border-box;
}

body:has(.moderation-action-bar[data-moderation="hidden"]) {
  padding-top: 0;
  transition: padding-top 0.3s ease;
}

/* ═════════════════════════════════════════════════════════════════
   MODERATION DETAILS MODAL (POPUP)
   ═════════════════════════════════════════════════════════════════ */

.moderation-details-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10007;
  padding: 20px;
  overflow-y: auto;
}

.moderation-details-modal[data-open="true"] {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.moderation-details-modal[data-open="false"] {
  display: none;
  pointer-events: none;
}

.moderation-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.moderation-modal-content {
  position: relative;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--user-accent, #a2ff00) 25%, rgba(0,0,0,0.85)),
    color-mix(in srgb, var(--user-accent, #a2ff00) 12%, rgba(0,0,0,0.85)));
  border: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 40%, transparent);
  border-radius: 14px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.moderation-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 30%, transparent);
  gap: 16px;
}

.moderation-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--user-accent, #a2ff00);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.moderation-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.moderation-modal-close:hover {
  color: rgba(255, 255, 255, 0.95);
}

.moderation-modal-close:focus {
  outline: 2px solid var(--user-accent, #a2ff00);
  outline-offset: 2px;
}

.moderation-modal-body {
  color: rgba(255, 255, 255, 0.9);
}

.moderation-detail-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.moderation-detail-row:last-of-type {
  border-bottom: none;
}

.moderation-label {
  font-weight: 600;
  color: var(--user-accent, #a2ff00);
  font-size: 14px;
  min-width: 80px;
}

.moderation-value {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  word-break: break-word;
  line-height: 1.4;
}

.moderation-restrictions-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--user-accent, #a2ff00) 20%, transparent);
}

.moderation-restrictions-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--user-accent, #a2ff00);
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.moderation-restrictions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.moderation-restrictions-list li {
  padding-left: 20px;
  position: relative;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  line-height: 1.4;
}

.moderation-restrictions-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--user-accent, #a2ff00);
  font-weight: bold;
}

.moderation-help-text {
  margin: 20px 0 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .moderation-action-bar {
    padding: 12px 16px;
  }

  .moderation-bar-left {
    gap: 10px;
  }

  .moderation-bar-icon {
    font-size: 20px;
  }

  .moderation-bar-title {
    font-size: 14px;
  }

  .moderation-bar-subtitle {
    font-size: 12px;
  }

  .moderation-modal-content {
    padding: 20px;
    border-radius: 12px;
  }

  .moderation-modal-title {
    font-size: 18px;
  }

  .moderation-label {
    min-width: 70px;
    font-size: 13px;
  }

  .moderation-value {
    font-size: 13px;
  }

}

@media (max-width: 768px) {
  body.moderation-banner-shown {
    padding-top: 150px;
  }

  .moderation-banner {
    padding: 14px 12px;
  }
  
  .moderation-banner-content {
    gap: 8px;
  }
  
  .moderation-banner-text {
    min-width: 150px;
  }
  
  .moderation-banner-btn,
  .moderation-banner-close {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* ── Global flat layout overrides (requested) ───────────────────────────── */

/* Remove rounded styling across all pages/components */
*, *::before, *::after {
  border-radius: 0 !important;
}

/* Make shell elements regular (not floating/fixed) */
:root {
  --header-h: 0px !important;
  --nav-h: 0px !important;
}

header,
.header-nav-row,
nav.mobile-menu,
.desktop-site-footer,
.desktop-site-footer-inner,
.desktop-site-footer-glow {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
}

header[data-header-visible="false"],
header[data-header-visible="true"] {
  opacity: 1 !important;
  pointer-events: auto !important;
}

#main-content {
  padding-top: 16px !important;
  padding-bottom: 16px !important;
  min-height: auto !important;
}