@import url('https://cdn-uicons.flaticon.com/2.6.0/uicons-bold-rounded/css/uicons-bold-rounded.css');
@import url('https://cdn-uicons.flaticon.com/2.6.0/uicons-bold-straight/css/uicons-bold-straight.css');

/* ============================================================
   NORIS PLATFORM — DISCORD DARK GAMING THEME & MICRO-ANIMATIONS
   Clean, Sleek, Solid Dark Palette. STRICTLY NO EMOJIS, NO WHITE SLOP.
   Inspired by Discord Desktop App UI & Micro-Interactions.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-darkest: #1e1f22;
  --bg-sidebar: #2b2d31;
  --bg-content: #313338;
  --bg-card: #2b2d31;
  --bg-card-hover: #35373c;
  --bg-modal: #313338;
  --bg-modal-header: #2b2d31;
  --bg-input: #1e1f22;
  --bg-modifier-hover: rgba(255, 255, 255, 0.05);
  --bg-modifier-active: rgba(255, 255, 255, 0.08);
  --bg-modifier-selected: rgba(88, 101, 242, 0.16);

  /* Accents */
  --blurple: #5865f2;
  --blurple-hover: #4752c4;
  --blurple-active: #3c45a5;
  --blurple-subtle: rgba(88, 101, 242, 0.15);

  --green: #23a55a;
  --green-hover: #1f9450;
  --green-subtle: rgba(35, 165, 90, 0.16);

  --yellow: #f0b232;
  --yellow-hover: #d69e2c;
  --yellow-subtle: rgba(240, 178, 50, 0.16);

  --red: #f23f43;
  --red-hover: #da373c;
  --red-subtle: rgba(242, 63, 67, 0.16);

  /* Typography — High-Contrast Accessible Colors */
  --text-white: #ffffff;
  --text-normal: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  /* Borders & Shadows */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-focus: #5865f2;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.55);

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Fonts */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;

  /* Timing & Easing */
  --anim-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
  --anim-smooth: 0.25s cubic-bezier(0.2, 0, 0, 1);
  --anim-spring: 0.25s cubic-bezier(0.18, 0.89, 0.32, 1.25);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  background-color: var(--bg-content);
}

body {
  background-color: var(--bg-content);
  color: var(--text-normal);
  font-family: var(--font-main);
  line-height: 1.5;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Discord Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: #1a1b1e;
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-darkest);
}
::-webkit-scrollbar-thumb:hover {
  background: #2b2d31;
}

a {
  color: var(--blurple);
  text-decoration: none;
  transition: color var(--anim-fast);
}
a:hover {
  color: #7983f5;
  text-decoration: underline;
}

/* ================= APP LAYOUT ================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bg-content);
}

/* ================= LEFT SIDEBAR (Discord Channel Bar Style) ================= */
.sidebar {
  width: 270px;
  min-width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  z-index: 100;
  user-select: none;
}

.sidebar::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--bg-darkest);
  border-radius: var(--radius-sm);
}

/* Logo Header */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: opacity var(--anim-fast);
}
.sidebar-header:hover {
  opacity: 0.95;
}

.sidebar-brand-banner {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
  border-radius: 6px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.sidebar-header:hover .sidebar-brand-banner {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 14px rgba(56, 189, 248, 0.3));
}

.sidebar-logo {
  height: 34px;
  width: 34px;
  border-radius: var(--radius-md);
  transition: transform var(--anim-spring);
}
.sidebar-header:hover .sidebar-logo {
  transform: rotate(5deg) scale(1.05);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-white);
}

.sidebar-brand-tagline {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* User Card Widget (Discord Profile Plate) */
.user-card-widget {
  background-color: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0;
  transition: border-color var(--anim-fast);
}
.user-card-widget:hover {
  border-color: rgba(255, 255, 255, 0.18) !important;
}

body.theme-light .user-card-widget {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
}

.user-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.user-avatar-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}

.user-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background-color: var(--green);
  border: 2px solid var(--bg-darkest);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-light .user-name {
  color: #0f172a !important;
}

.user-role {
  font-size: 11px;
  color: #94a3b8 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-light .user-role {
  color: #475569 !important;
}

.user-auth-btn {
  background: var(--bg-modifier-hover);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--anim-fast);
}
.user-auth-btn:hover {
  background: var(--bg-modifier-active);
  color: var(--text-white);
  transform: scale(1.06);
}

.user-subscribers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.sub-counter {
  font-size: 11px;
  color: var(--text-dim);
}
.sub-counter strong {
  color: var(--text-white);
  font-family: var(--font-mono);
}

.btn-sub {
  background: var(--bg-modifier-active);
  border: 1px solid var(--border-subtle);
  color: var(--text-normal);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--anim-fast);
}
.btn-sub:hover {
  background: var(--blurple);
  color: #ffffff;
  border-color: var(--blurple);
}
.btn-sub.subscribed {
  background: var(--green-subtle);
  color: var(--green);
  border-color: rgba(35, 165, 90, 0.4);
}

.sidebar-sub-panel {
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: none;
}

/* Sidebar Navigation Items (Discord Pill Micro-Animation) */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  padding: 8px 12px 4px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background-color var(--anim-fast), color var(--anim-fast), transform var(--anim-fast);
}

/* Discord Left Indicator Pill */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background-color: #ffffff;
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: height var(--anim-smooth), opacity var(--anim-fast);
}

.nav-item:hover {
  background-color: var(--bg-modifier-hover);
  color: var(--text-white);
  transform: translateX(2px);
}
.nav-item:hover::before {
  height: 10px;
  opacity: 0.8;
}

.nav-item.active {
  background-color: var(--bg-modifier-selected);
  color: #ffffff;
  font-weight: 600;
}
.nav-item.active::before {
  height: 24px;
  opacity: 1;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: inherit;
  flex-shrink: 0;
  font-size: 16px;
}

.nav-icon i.fi,
.nav-icon .fi {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-svg {
  width: 18px;
  height: 18px;
}

/* Flaticon UIcons Bold styling across all elements */
i.fi, span.fi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--bg-darkest);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  transition: all var(--anim-fast);
}
.nav-item:hover .nav-badge,
.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.wip-badge {
  color: var(--yellow);
}
.abandoned-badge {
  color: var(--text-dim);
}
.highlight-badge {
  background: var(--blurple);
  color: #ffffff;
}

/* Sidebar Actions & Stats */
.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  margin-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
.stat-mini-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  font-family: var(--font-mono);
}
.stat-mini-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.live-sync-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 8px;
}
.live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--green);
  box-shadow: 0 0 6px rgba(35, 165, 90, 0.6);
  animation: pulse 2.5s infinite ease-in-out;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* ================= RIGHT MAIN WRAPPER ================= */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-content);
}

/* Top Bar (Discord Header) */
.top-bar {
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 12px;
  flex: 1;
  max-width: 480px;
  height: 38px;
  transition: border-color var(--anim-fast), box-shadow var(--anim-fast);
}
.search-box:focus-within {
  border-color: var(--blurple);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.25);
}
.search-svg {
  color: var(--text-dim);
  margin-right: 8px;
  flex-shrink: 0;
}
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 14px;
  width: 100%;
}
.search-box input::placeholder {
  color: var(--text-dim);
}
.clear-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--anim-fast);
}
.clear-btn:hover {
  color: var(--text-white);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-visitors {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-darkest);
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}
.online-visitors strong { color: var(--text-white); }
.online-visitors-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px color-mix(in srgb, var(--green) 70%, transparent);
}
.quick-theme-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
}
.quick-theme-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.quick-theme-track {
  width: 42px;
  height: 24px;
  padding: 3px;
  border-radius: 999px;
  background: #d9dce5;
  border: 1px solid var(--border-subtle);
  transition: background .2s ease;
}
.quick-theme-track span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px #0003;
  transition: transform .22s ease;
}
.quick-theme-control input:checked + .quick-theme-track { background: var(--blurple); }
.quick-theme-control input:checked + .quick-theme-track span { transform: translateX(18px); }
.quick-theme-control input:focus-visible + .quick-theme-track { outline: 3px solid color-mix(in srgb, var(--blurple) 35%, transparent); }
.quick-theme-icon { color: var(--text-muted); font-size: 13px; line-height: 1; }

@media (max-height: 850px) and (min-width: 701px) {
  .sidebar { padding: 7px 9px; overflow-y: auto; }
  .sidebar-header { padding: 2px 8px 6px !important; }
  .sidebar-brand-banner { max-height: 34px; width: auto; }
  .user-card-widget { margin: 6px 0; padding: 7px 9px; gap: 5px; }
  .sidebar-sub-panel { display: none; }
  .sidebar-nav { gap: 0; min-height: 0; flex: 0 0 auto; }
  .nav-section-label { padding: 4px 10px 2px; margin-top: 4px !important; font-size: 9px; }
  .nav-item { padding: 4px 9px 4px 12px; gap: 9px; font-size: 12px; line-height: 1.1; }
  .sidebar-actions { margin-top: 5px; padding-top: 5px; gap: 4px; }
  .sidebar-stats, .live-sync-indicator { display: none; }
}

@media (max-width: 1050px) {
  .online-visitors span:last-child, .quick-theme-icon { display: none; }
  .top-bar-right { gap: 7px; }
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-label {
  font-size: 12px;
  color: var(--text-dim);
}
.select-control {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-normal);
  padding: 6px 12px;
  font-size: 13px;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
  transition: border-color var(--anim-fast);
}
.select-control:focus {
  border-color: var(--blurple);
}

/* ================= CONTENT BODY ================= */
.content-body {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Hero Banner (YouTube Streamer Thumbnail Aesthetic) */
.hero-banner.yt-style-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: linear-gradient(135deg, #d2d8e2 0%, #bcc5d3 50%, #a8b4c4 100%);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 34px 42px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 45px -10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}
.hero-banner.yt-style-banner:hover {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%) !important;
  border-color: #ffffff !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45), 0 0 35px rgba(203, 213, 225, 0.6), inset 0 1px 2px #ffffff !important;
  filter: brightness(1.05);
}
.hero-banner.yt-style-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 85% 15%, rgba(0, 82, 255, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.35) 0%, transparent 50%);
  pointer-events: none;
}

.yt-banner-content {
  flex: 1 1 520px;
  min-width: 280px;
  position: relative;
  z-index: 2;
}

.yt-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0052ff;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  
  margin-bottom: 12px;
}

.yt-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  
  animation: ytDotPulse 1.8s infinite;
}

@keyframes ytDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.yt-banner-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
}

.yt-title-dark {
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.yt-title-blue {
  color: #0052ff;
  
}

.yt-banner-desc {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: #1e293b;
  max-width: 580px;
  margin: 0 0 22px 0;
}

.yt-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.yt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.35s cubic-bezier(0.2, 0, 0, 1), color 0.35s cubic-bezier(0.2, 0, 0, 1), border-color 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s cubic-bezier(0.2, 0, 0, 1), filter 0.35s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  letter-spacing: -0.01em;
}

.yt-btn-blue {
  background: linear-gradient(135deg, #0052ff 0%, #003fc7 100%);
  color: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 14px rgba(0, 82, 255, 0.3);
}

.yt-btn-blue:hover {
  background: linear-gradient(135deg, #1a66ff 0%, #004fe8 100%);
  transform: translateY(-2px);
  filter: brightness(1.22);
  box-shadow: 0 8px 24px rgba(0, 82, 255, 0.5), 0 0 20px rgba(56, 189, 248, 0.45);
}

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

.yt-btn-dark {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
}

.yt-btn-dark:hover {
  background: #1e293b;
  transform: translateY(-2px);
  filter: brightness(1.25);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.5), 0 0 18px rgba(255, 255, 255, 0.18);
}

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

/* Right Side Graphic Showcase (Zero face/мужика) */
.yt-banner-visual {
  flex: 0 0 310px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.yt-visual-card {
  width: 100%;
  max-width: 310px;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transform: rotate(-1.5deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.yt-visual-card:hover {
  transform: rotate(0deg) translateY(-3px);
  box-shadow: 0 14px 30px -5px rgba(0, 0, 0, 0.6);
}

.yt-visual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.yt-visual-tag {
  background: rgba(0, 82, 255, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(0, 82, 255, 0.4);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.yt-visual-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.yt-pulse-circle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: ytDotPulse 1.5s infinite;
}

.yt-visual-main {
  text-align: center;
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 14px;
}

.yt-visual-big-number {
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 30%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.yt-visual-label {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 1.2px;
  margin-top: 4px;
}

.yt-visual-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yt-mini-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
}

@media (max-width: 900px) {
  .hero-banner.yt-style-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 22px;
  }
  .yt-banner-visual {
    width: 100%;
    flex: 1 1 auto;
  }
  .yt-visual-card {
    max-width: 100%;
    transform: none;
  }
  .yt-banner-title {
    font-size: 28px;
  }
}

.hero-banner {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.08) 0%, rgba(30, 31, 34, 0.6) 100%);
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}
.hero-banner:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%) !important;
  border-color: rgba(203, 213, 225, 0.6) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(148, 163, 184, 0.4) !important;
  filter: brightness(1.08);
}
.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blurple), transparent);
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--blurple);
  background: var(--blurple-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}
.accent-text {
  color: var(--blurple);
}

.hero-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.online-tunnel-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-normal);
}
.tunnel-link {
  color: var(--blurple);
  font-family: var(--font-mono);
  font-weight: 600;
}
.btn-copy-tunnel {
  background: var(--bg-modifier-active);
  border: 1px solid var(--border-subtle);
  color: var(--text-normal);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  transition: all var(--anim-fast);
}
.btn-copy-tunnel:hover {
  background: var(--blurple);
  color: #ffffff;
  border-color: var(--blurple);
}

/* Tags Filter Row (Discord Pills) */
.tags-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  margin-bottom: 24px;
  padding-bottom: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tags-filter-row::-webkit-scrollbar {
  display: none;
}
.tags-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 4px;
  flex-shrink: 0;
}
.tag-pill {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  cursor: pointer;
  transition: all var(--anim-fast);
}
.tag-pill:hover {
  background: var(--bg-modifier-hover);
  color: var(--text-white);
  transform: translateY(-1px);
}
.tag-pill.active {
  background: var(--blurple);
  border-color: var(--blurple);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.4);
}

/* Section Header */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.3px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}
.results-count {
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ================= PROJECTS GRID & CARDS ================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.project-card {
  background: rgba(43, 45, 49, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover {
  transform: none;
  background: rgba(62, 67, 76, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Card Banner / Thumbnail */
.card-banner {
  position: relative;
  width: 100%;
  height: 170px;
  background: var(--bg-darkest);
  overflow: hidden;
}
.card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.25s ease;
}
.project-card:hover .card-banner-img {
  transform: none;
  filter: brightness(1.08);
}

.card-banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1e1f22 0%, #2b2d31 100%);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
}
.card-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blurple);
}

.card-badges-top {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

/* Badges (Discord pill style) */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.status-badge.released {
  background: var(--green);
  color: #ffffff;
}
.status-badge.wip {
  background: var(--yellow);
  color: #000000;
}
.status-badge.abandoned {
  background: #4e5058;
  color: #ffffff;
}

.category-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.recommend-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--blurple);
  color: #ffffff;
  letter-spacing: 0.4px;
}

/* Card Body */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
  line-height: 1.3;
  transition: color var(--anim-fast);
}
.project-card:hover .card-title {
  color: #7983f5;
}

.card-author {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.card-author strong {
  color: var(--text-muted);
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-localpath {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  background: var(--bg-darkest);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color var(--anim-fast);
}
.card-localpath:hover {
  color: var(--blurple);
}

/* WIP Progress Bar */
.wip-progress-container {
  margin-bottom: 12px;
}
.wip-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 4px;
}
.wip-progress-bar {
  height: 6px;
  background: var(--bg-darkest);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.wip-progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: var(--radius-full);
}

/* Card Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.card-tag {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-darkest);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--anim-fast);
}
.card-tag:hover {
  color: var(--blurple);
  background: var(--blurple-subtle);
}

/* Card Footer */
.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
}
.rating-count {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

/* Discord Reaction Vote Group */
.card-vote-group {
  display: flex;
  gap: 6px;
}
.like-btn, .dislike-btn {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--anim-fast);
}
.like-btn:hover {
  background: var(--bg-modifier-hover);
  color: var(--blurple);
  border-color: rgba(88, 101, 242, 0.4);
  transform: scale(1.04);
}
.dislike-btn:hover {
  background: var(--bg-modifier-hover);
  color: var(--red);
  border-color: rgba(242, 63, 67, 0.4);
  transform: scale(1.04);
}
.like-btn.liked {
  background: var(--blurple-subtle);
  border-color: var(--blurple);
  color: var(--blurple);
}
.dislike-btn.disliked {
  background: var(--red-subtle);
  border-color: var(--red);
  color: var(--red);
}
.vote-svg {
  flex-shrink: 0;
}

/* Dedicated Action Row */
.card-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.friends-play-together {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.friends-play-together h3 { margin: 0 0 5px; font-size: 18px; }
.friends-play-together p { margin: 0; color: var(--text-muted); font-size: 13px; }
.friends-game-links { display: flex; flex-wrap: wrap; gap: 8px; }
.friends-game-links a {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--blurple);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

body[data-view="friends"] #hero-banner,
body[data-view="settings"] #hero-banner,
body[data-view="media"] #hero-banner,
body[data-view="authors"] #hero-banner,
body[data-view="friends"] #tags-filter-row,
body[data-view="settings"] #tags-filter-row,
body[data-view="media"] #tags-filter-row,
body[data-view="authors"] #tags-filter-row,
body[data-view="friends"] .section-header .filter-group,
body[data-view="settings"] .section-header .filter-group,
body[data-view="media"] .section-header .filter-group,
body[data-view="authors"] .section-header .filter-group {
  display: none !important;
}

.btn-play-sm {
  background: var(--blurple);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex: 1;
  text-align: center;
  transition: all var(--anim-fast);
}
.btn-play-sm:hover {
  background: var(--blurple-hover);
  transform: translateY(-1px);
}
.btn-play-sm:active {
  transform: scale(0.97);
  background: var(--blurple-active);
}

.btn-download-sm {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-normal);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all var(--anim-fast);
}
.btn-download-sm:hover {
  background: var(--bg-modifier-active);
  color: var(--text-white);
  text-decoration: none;
}

.btn-recommend-sm {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 11px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--anim-fast);
}
.btn-recommend-sm:hover {
  color: var(--yellow);
  border-color: var(--yellow);
}
.btn-recommend-sm.recommended {
  background: var(--yellow-subtle);
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn-change-thumb-sm, .btn-edit-sm, .btn-delete-sm {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--anim-fast);
}
.btn-change-thumb-sm:hover, .btn-edit-sm:hover {
  background: var(--bg-modifier-hover);
  color: var(--text-white);
}
.btn-delete-sm:hover {
  background: var(--red-subtle);
  border-color: var(--red);
  color: var(--red);
}

/* ================= BUTTONS (Discord Tactile Press) ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.2, 0, 0, 1), transform 0.25s cubic-bezier(0.2, 0, 0, 1), filter 0.35s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.35s cubic-bezier(0.2, 0, 0, 1), border-color 0.35s cubic-bezier(0.2, 0, 0, 1), color 0.35s cubic-bezier(0.2, 0, 0, 1);
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.22);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.btn:active {
  transform: scale(0.98);
  filter: brightness(0.96);
}

.btn-primary {
  background-color: var(--blurple);
  color: var(--btn-primary-text, #ffffff) !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 3px 10px rgba(88, 101, 242, 0.3);
}
.btn-primary *,
.btn-primary .btn-icon,
.btn-primary i,
.btn-primary span {
  color: var(--btn-primary-text, #ffffff) !important;
}
.btn-primary:hover {
  background-color: var(--blurple-hover);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.5), 0 0 18px rgba(88, 101, 242, 0.4);
}
.btn-primary:active {
  background-color: var(--blurple-active);
}

.btn-secondary {
  background-color: #4e5058;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}
.btn-secondary:hover {
  background-color: #6d6f78;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 255, 255, 0.18);
}
.btn-secondary:active {
  background-color: #3f4147;
}

.btn-admin {
  background-color: var(--green);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(35, 165, 89, 0.3);
}
.btn-admin:hover {
  background-color: var(--green-hover);
  box-shadow: 0 8px 25px rgba(35, 165, 89, 0.55), 0 0 18px rgba(35, 165, 89, 0.4);
}

.btn-full {
  width: 100%;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}

/* ================= MODALS (Bubble Glassmorphism & Spring Pop) ================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(10, 12, 16, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.2, 0, 0, 1);
}
.modal-overlay.open {
  display: flex;
  opacity: 1;
}

@keyframes bubbleModalPop {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }
  65% {
    transform: scale(1.02) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-card {
  background: rgba(36, 38, 44, 0.82);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px; /* Bubble rounded silhouette */
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: bubbleModalPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.25) forwards;
}
.modal-sm { max-width: 440px; }
.modal-md { max-width: 580px; }
.modal-lg { max-width: 820px; }

.modal-header {
  padding: 16px 22px;
  background: rgba(25, 27, 32, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
}
.modal-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.modal-close-btn, .modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--anim-fast);
}
.modal-close-btn:hover, .modal-close:hover {
  background: var(--bg-modifier-hover);
  color: var(--text-white);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 22px;
  background: rgba(25, 27, 32, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  background-color: var(--bg-input);
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color var(--anim-fast);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--blurple);
}

/* Auth Tabs Toggle */
.auth-tabs-toggle {
  display: flex;
  background: var(--bg-darkest);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 4px;
}
.auth-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--anim-fast);
}
.auth-toggle-btn.active {
  background: var(--bg-sidebar);
  color: var(--text-white);
}

.modal-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blurple);
  margin-bottom: 8px;
}

/* Profile Modal Details & Levels */
.profile-levels-scroll-container {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.profile-level-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  transition: border-color var(--anim-fast);
}
.profile-level-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
}

.profile-level-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000000;
}

.profile-level-info {
  flex: 1;
  overflow: hidden;
}
.profile-level-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-level-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.profile-level-tag {
  background: var(--bg-modifier-active);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* Detail Modal Content */
.detail-banner {
  width: 100%;
  max-height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  background: #000000;
}
.detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-desc-box {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-normal);
  line-height: 1.5;
}

.btn-play-large {
  background: var(--green);
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all var(--anim-fast);
}
.btn-play-large:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
}

.btn-download-primary {
  background: var(--blurple);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--anim-fast);
}
.btn-download-primary:hover {
  background: var(--blurple-hover);
  text-decoration: none;
}

.btn-recommend-large {
  background: var(--bg-darkest);
  border: 1px solid var(--yellow);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--anim-fast);
}
.btn-recommend-large.recommended {
  background: var(--yellow-subtle);
}

/* Reviews in Modal */
.reviews-section {
  margin-top: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.reviews-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.add-review-box {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.star-rating-picker {
  display: flex;
  gap: 4px;
  margin: 6px 0 10px;
}
.star-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--anim-fast), transform var(--anim-fast);
}
.star-btn.active, .star-btn:hover {
  color: var(--yellow);
  transform: scale(1.15);
}

.review-item {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.review-author {
  font-weight: 700;
  color: var(--text-white);
  font-size: 13px;
}
.review-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
}
.review-comment {
  font-size: 13px;
  color: var(--text-normal);
  margin-top: 4px;
}

/* ================= TOAST NOTIFICATIONS (Discord Spring In) ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}

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

.toast {
  background-color: var(--bg-sidebar);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--blurple);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-white);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideIn var(--anim-spring) forwards;
  max-width: 380px;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blurple); }

.toast-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ================= MINI POSTS (Sidebar) ================= */
.mini-post-card {
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mini-post-user {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-white);
}
.mini-post-date {
  font-size: 10px;
  color: var(--text-dim);
}
.mini-post-text {
  font-size: 12px;
  color: var(--text-normal);
  line-height: 1.35;
}
.mini-post-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.mini-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.mini-post-like-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color var(--anim-fast);
}
.mini-post-like-btn:hover {
  color: var(--blurple);
}
.mini-post-like-btn.liked {
  color: var(--blurple);
}
.mini-post-del-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
  transition: color var(--anim-fast);
}
.mini-post-del-btn:hover {
  color: var(--red);
}

/* ================= EXPLORER FOLDERS LIST ================= */
.explorer-custom-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  background: var(--bg-darkest);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.explorer-subheading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.folders-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
}
.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-darkest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color var(--anim-fast);
}
.folder-item:hover {
  border-color: rgba(88, 101, 242, 0.4);
}
.folder-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}
.folder-icon {
  color: var(--blurple);
  display: flex;
  align-items: center;
}
.folder-name-row {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.folder-name {
  font-weight: 700;
  color: var(--text-white);
  font-size: 13px;
}
.folder-path {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.added-badge {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  margin-right: 8px;
}

/* ================= MEDIA GRID ================= */
.media-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.media-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.media-intro {
  font-size: 13px;
  color: var(--text-dim);
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.media-preview-wrap {
  width: 100%;
  height: 180px;
  background: #000000;
}
.media-preview-wrap img, .media-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-info {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.media-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}
.media-author {
  font-size: 11px;
  color: var(--text-dim);
}

/* ================= FOOTER ================= */
.site-footer {
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  padding: 20px 28px;
  margin-top: auto;
}
.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand {
  font-weight: 900;
  letter-spacing: 0.8px;
  color: var(--text-white);
}
.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
}
.creator-badge {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ================= LOADING & SPINNER ================= */
.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: var(--text-dim);
  text-align: center;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--blurple);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= ROTATE SCREEN OVERLAY (ENFORCES HORIZONTAL GAMING) ================= */
.rotate-device-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: #090d16;
  color: #ffffff;
  z-index: 9999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

@media screen and (orientation: portrait) and (max-width: 900px) {
  .rotate-device-overlay {
    display: flex !important;
  }
}

.rotate-card {
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.rotate-phone-icon {
  font-size: 56px;
  color: #38bdf8;
  animation: rotatePhoneAnim 2.2s infinite ease-in-out;
  margin-bottom: 6px;
}

@keyframes rotatePhoneAnim {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-90deg); }
  65% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}

.rotate-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #f8fafc;
}

.rotate-card p {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.rotate-device-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}

/* ================= HORIZONTAL CONSOLE LAYOUT (LANDSCAPE ON MOBILE) ================= */
/* Horizontal scrollable category tags without page wobble */
.tags-filter-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 10px !important;
  margin-bottom: 18px !important;
  padding: 4px 2px 8px 2px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  touch-action: pan-x pan-y !important;
}
.tags-filter-row::-webkit-scrollbar {
  display: none !important;
}
.tag-pill {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  user-select: none !important;
  padding: 6px 14px !important;
  font-size: 12.5px !important;
}

/* Prevent horizontal page shake on mobile */
html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  touch-action: pan-y;
}

/* In Landscape / Horizontal mode: Sidebar is ON THE SIDE, spaced comfortably */
@media screen and (orientation: landscape) and (max-height: 600px) {
  .app-layout {
    display: flex !important;
    flex-direction: row !important;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .sidebar {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 8px !important;
    transform: none !important;
    border-right: 1px solid var(--border-subtle) !important;
    z-index: 100 !important;
    overflow-y: auto !important;
  }

  .sidebar-header {
    padding: 2px 4px 8px !important;
  }

  .sidebar-brand-banner {
    max-width: 160px !important;
  }

  .nav-item {
    padding: 7px 10px !important;
    font-size: 12px !important;
    gap: 8px !important;
    margin-bottom: 3px !important;
    border-radius: 8px !important;
  }

  .nav-section-label {
    font-size: 10px !important;
    margin: 8px 0 3px 6px !important;
  }

  .main-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
    width: calc(100vw - 220px) !important;
    overflow-x: hidden !important;
  }

  .top-bar {
    padding: 8px 14px !important;
    gap: 12px !important;
  }

  .hero-banner.yt-style-banner {
    padding: 14px 18px !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
  }

  .content-body {
    padding: 10px 16px 30px 16px !important;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .project-card {
    border-radius: 14px !important;
  }

  /* Mobile Fullscreen Game Theater in landscape */
  #game-theater-modal.open {
    padding: 0 !important;
  }
  #game-theater-modal .modal-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
  }
}


/* Game ID Badges for Quick Copy */
.card-id-badge {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  padding: 2px 6px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: all 0.15s ease;
}
.card-id-badge:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}


/* ================= THEME & CUSTOMIZATION STYLES ================= */
body.theme-light {
  --bg-darkest: #e3e5e8;
  --bg-sidebar: #f2f3f5;
  --bg-content: #ffffff;
  --bg-card: #f2f3f5;
  --bg-card-hover: #e8eaed;
  --bg-modal: #ffffff;
  --bg-modal-header: #f2f3f5;
  --bg-input: #e3e5e8;
  --text-white: #060607;
  --text-normal: #2e3338;
  --text-muted: #4e5058;
}

body.theme-light .project-card,
body.theme-light .modal-card,
body.theme-light .user-card-widget {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

body.theme-light .card-title,
body.theme-light .modal-title,
body.theme-light h1, body.theme-light h2, body.theme-light h3, body.theme-light h4 {
  color: #0f172a !important;
}

body.bg-style-space {
  background: #07090e !important;
  --bg-content: #0b0f19;
  --bg-card: #0f172a;
}

body.bg-style-indigo {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%) !important;
  --bg-content: #0f172a;
}

/* ================= MODAL SCROLL & PUBLISH FORM FIX ================= */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100% !important;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 12, 16, 0.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: none !important;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  box-sizing: border-box;
}

.modal-overlay.open {
  display: flex !important;
}

.modal-card {
  background: rgba(36, 38, 44, 0.96);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 640px;
  max-height: 86vh !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  overscroll-behavior: contain !important;
}

.modal-header {
  flex-shrink: 0 !important;
}

.publish-form,
.modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 18px 24px 28px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.publish-form::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.publish-form::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.publish-form::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 10px;
}

.publish-form .modal-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ================= NORIS DIRECT MINI-CHAT ================= */
.chat-modal-card {
  max-width: 520px !important;
  width: 95vw !important;
  height: 640px !important;
  max-height: 88vh !important;
  border-radius: 22px !important;
  background: #1e1f22 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.3) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.chat-modal-header {
  padding: 14px 18px !important;
  background: #2b2d31 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-shrink: 0 !important;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
  transition: opacity 0.15s;
}

.chat-header-user:hover {
  opacity: 0.9;
}

.chat-avatar-wrapper {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(88, 101, 242, 0.6);
  background: #111214;
}

.chat-online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2.5px solid #2b2d31;
  border-radius: 50%;
}

.chat-header-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.chat-target-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-target-name {
  font-weight: 800;
  color: #fff;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-target-badge {
  background: rgba(88, 101, 242, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.4);
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 1px 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.chat-target-status {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.chat-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.chat-messages-container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.chat-messages-container::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.chat-date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 8px;
  position: relative;
}

.chat-date-separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.chat-date-separator span {
  position: relative;
  background: #1e1f22;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-empty-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  color: #94a3b8;
  margin: auto;
}

.chat-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  color: #5865f2;
}

.chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.chat-msg-row.mine {
  justify-content: flex-end;
}

.chat-msg-row.theirs {
  justify-content: flex-start;
}

.chat-msg-row.theirs .chat-bubble-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.chat-msg-bubble {
  max-width: 78%;
  padding: 9px 14px;
  word-break: break-word;
  line-height: 1.45;
  font-size: 13.5px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.chat-msg-row.mine .chat-msg-bubble {
  background: #5865f2;
  color: #ffffff;
  border-radius: 18px 18px 4px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-msg-row.theirs .chat-msg-bubble {
  background: #2b2d31;
  color: #e2e8f0;
  border-radius: 18px 18px 18px 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-msg-text {
  white-space: pre-wrap;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.72;
}

.chat-footer {
  padding: 12px 16px !important;
  background: #2b2d31 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input {
  width: 100%;
  background: #1e1f22;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 11px 16px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input:focus {
  border-color: #5865f2;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
}

.chat-input::placeholder {
  color: #64748b;
}

.chat-send-btn {
  background: #5865f2;
  color: #fff;
  border: none;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.18s, transform 0.15s;
}

.chat-send-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

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

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================ */
/* THEME PRESETS SELECTOR (SETTINGS TAB)                        */
/* ============================================================ */
.theme-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.theme-preset-card {
  cursor: pointer;
  border-radius: 16px;
  padding: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.theme-preset-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.theme-preset-card.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.theme-preset-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.theme-preset-name {
  font-weight: 800;
  color: #ffffff;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.theme-preset-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.theme-preset-badge {
  display: inline-block;
  margin-top: 8px;
  background: #38bdf8;
  color: #000000;
  font-weight: 800;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.3px;
}

/* ============================================================ */
/* THEME 2: IPHONE (iOS GLASSMORPHISM)                          */
/* ============================================================ */
body.theme-style-ios {
  background: radial-gradient(at 15% 15%, rgba(99, 102, 241, 0.22) 0px, transparent 55%),
              radial-gradient(at 85% 15%, rgba(56, 189, 248, 0.2) 0px, transparent 55%),
              radial-gradient(at 85% 85%, rgba(168, 85, 247, 0.18) 0px, transparent 55%),
              radial-gradient(at 15% 85%, rgba(16, 185, 129, 0.16) 0px, transparent 55%),
              #0c101c !important;
  --text-white: #ffffff !important;
  --text-normal: #f8fafc !important;
  --text-muted: #e2e8f0 !important;
  --text-dim: #cbd5e1 !important;
}

body.theme-style-ios .sidebar,
body.theme-style-ios .top-bar,
body.theme-style-ios .project-card,
body.theme-style-ios .user-card-widget,
body.theme-style-ios .modal-content,
body.theme-style-ios .chat-window {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(28px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 22px !important;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.35) !important;
}

body.theme-style-ios h1,
body.theme-style-ios h2,
body.theme-style-ios h3,
body.theme-style-ios .section-title,
body.theme-style-ios .project-title,
body.theme-style-ios .sidebar-brand-title {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
}

body.theme-style-ios .section-subtitle,
body.theme-style-ios .results-count,
body.theme-style-ios .tags-label,
body.theme-style-ios .project-desc,
body.theme-style-ios .stat-mini-lbl,
body.theme-style-ios .theme-preset-desc {
  color: #e2e8f0 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

body.theme-style-ios .btn,
body.theme-style-ios .yt-btn,
body.theme-style-ios .tag-pill,
body.theme-style-ios .chat-send-btn {
  border-radius: 999px !important;
  font-weight: 700 !important;
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease !important;
}

body.theme-style-ios .btn:active,
body.theme-style-ios .yt-btn:active,
body.theme-style-ios .tag-pill:active {
  transform: scale(0.96) !important;
}

body.theme-style-ios .search-box input {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

/* ============================================================ */
/* THEME 3: EMERALD (ИЗУМРУДНЫЙ КИБЕРПАНК)                      */
/* ============================================================ */
body.theme-style-emerald {
  background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.18) 0%, transparent 60%),
              radial-gradient(circle at 15% 85%, rgba(5, 150, 105, 0.14) 0%, transparent 55%),
              linear-gradient(135deg, #022019 0%, #032b22 50%, #01140f 100%) !important;
  --text-white: #ffffff !important;
  --text-normal: #f0fdf4 !important;
  --text-muted: #a7f3d0 !important;
  --text-dim: #6ee7b7 !important;
}

body.theme-style-emerald .sidebar,
body.theme-style-emerald .top-bar,
body.theme-style-emerald .project-card,
body.theme-style-emerald .user-card-widget,
body.theme-style-emerald .modal-content,
body.theme-style-emerald .chat-window {
  background: rgba(2, 44, 34, 0.88) !important;
  border: 1px solid rgba(16, 185, 129, 0.32) !important;
  box-shadow: 0 12px 30px rgba(1, 26, 20, 0.5) !important;
}

body.theme-style-emerald h1,
body.theme-style-emerald h2,
body.theme-style-emerald h3,
body.theme-style-emerald .section-title,
body.theme-style-emerald .project-title,
body.theme-style-emerald .sidebar-brand-title {
  color: #ffffff !important;
}

body.theme-style-emerald .section-subtitle,
body.theme-style-emerald .results-count,
body.theme-style-emerald .tags-label,
body.theme-style-emerald .project-desc,
body.theme-style-emerald .stat-mini-lbl {
  color: #d1fae5 !important;
}

body.theme-style-emerald .btn-primary,
body.theme-style-emerald .yt-btn-blue,
body.theme-style-emerald .chat-send-btn {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  border-color: #10b981 !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

body.theme-style-emerald .tag-pill.active,
body.theme-style-emerald .nav-item.active {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #34d399 !important;
  border-color: #10b981 !important;
}

body.theme-style-emerald .accent-text,
body.theme-style-emerald .yt-title-blue {
  color: #10b981 !important;
  text-shadow: 0 2px 16px rgba(16, 185, 129, 0.35) !important;
}

/* ============================================================ */
/* THEME 4: RETRO 1999 (WINDOWS 98 & LEGO-STYLE BUTTONS)        */
/* ============================================================ */
body.theme-style-retro99 {
  background: #008080 !important;
  font-family: 'Segoe UI', Tahoma, 'MS Sans Serif', sans-serif !important;

  --bg-darkest: #008080;
  --bg-sidebar: #c0c0c0;
  --bg-content: #008080;
  --bg-card: #c0c0c0;
  --bg-card-hover: #d4d0c8;
  --bg-modal: #c0c0c0;
  --bg-modal-header: #000080;
  --bg-input: #ffffff;

  --text-white: #000000 !important;
  --text-normal: #111111 !important;
  --text-muted: #2d3748 !important;
  --text-dim: #475569 !important;
}

/* Desktop titles outside windows on teal: CRISP WHITE WITH SHADOW */
body.theme-style-retro99 .section-title,
body.theme-style-retro99 .section-subtitle,
body.theme-style-retro99 .results-count,
body.theme-style-retro99 .tags-label {
  color: #ffffff !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9) !important;
  font-weight: 800 !important;
}

/* Windows, Panels & Cards on Gray: CRISP BLACK TEXT */
body.theme-style-retro99 .sidebar,
body.theme-style-retro99 .project-card,
body.theme-style-retro99 .user-card-widget,
body.theme-style-retro99 .modal-content,
body.theme-style-retro99 .chat-window,
body.theme-style-retro99 .hero-banner {
  background: #c0c0c0 !important;
  border-top: 2px solid #ffffff !important;
  border-left: 2px solid #ffffff !important;
  border-right: 2px solid #404040 !important;
  border-bottom: 2px solid #404040 !important;
  border-radius: 0px !important;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.45) !important;
  color: #000000 !important;
}

body.theme-style-retro99 .top-bar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%) !important;
  border-top: 2px solid #ffffff !important;
  border-left: 2px solid #ffffff !important;
  border-right: 2px solid #404040 !important;
  border-bottom: 2px solid #404040 !important;
  border-radius: 0px !important;
  color: #ffffff !important;
}

body.theme-style-retro99 .top-bar * {
  color: #ffffff !important;
}

body.theme-style-retro99 .project-title,
body.theme-style-retro99 .sidebar-brand-title,
body.theme-style-retro99 .user-name,
body.theme-style-retro99 .nav-text,
body.theme-style-retro99 .theme-preset-name,
body.theme-style-retro99 label,
body.theme-style-retro99 h1,
body.theme-style-retro99 h2,
body.theme-style-retro99 h3,
body.theme-style-retro99 h4 {
  color: #000000 !important;
  font-weight: 800 !important;
}

body.theme-style-retro99 p,
body.theme-style-retro99 .project-desc,
body.theme-style-retro99 .project-author,
body.theme-style-retro99 .yt-banner-desc,
body.theme-style-retro99 .theme-preset-desc,
body.theme-style-retro99 .stat-mini-lbl {
  color: #1a1a1a !important;
}

body.theme-style-retro99 .theme-preset-card {
  background: #d4d0c8 !important;
  border: 2px outset #ffffff !important;
  color: #000000 !important;
}

body.theme-style-retro99 .theme-preset-card.active {
  border: 2px inset #ffffff !important;
  background: #bfb8ad !important;
}

body.theme-style-retro99 .theme-preset-card * {
  color: #000000 !important;
}

body.theme-style-retro99 .yt-title-dark,
body.theme-style-retro99 .yt-title-blue {
  color: #000080 !important;
  text-shadow: none !important;
}

/* Lego-Style Tactile Buttons */
body.theme-style-retro99 .btn,
body.theme-style-retro99 .yt-btn,
body.theme-style-retro99 .tag-pill,
body.theme-style-retro99 .chat-send-btn,
body.theme-style-retro99 .nav-item {
  background: #d4d0c8 !important;
  color: #000000 !important;
  border-top: 3px solid #ffffff !important;
  border-left: 3px solid #ffffff !important;
  border-right: 3px solid #404040 !important;
  border-bottom: 3px solid #404040 !important;
  border-radius: 4px !important;
  box-shadow: inset 1px 1px 0px #ffffff, inset -1px -1px 0px #808080, 2px 2px 0px rgba(0,0,0,0.3) !important;
  font-weight: 800 !important;
  cursor: pointer !important;
  transition: none !important;
}

body.theme-style-retro99 .btn:active,
body.theme-style-retro99 .yt-btn:active,
body.theme-style-retro99 .tag-pill:active,
body.theme-style-retro99 .chat-send-btn:active,
body.theme-style-retro99 .nav-item:active {
  border-top: 3px solid #404040 !important;
  border-left: 3px solid #404040 !important;
  border-right: 3px solid #ffffff !important;
  border-bottom: 3px solid #ffffff !important;
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4) !important;
  transform: translate(1px, 1px) !important;
}

body.theme-style-retro99 .search-box input {
  background: #ffffff !important;
  color: #000000 !important;
  border-top: 2px solid #808080 !important;
  border-left: 2px solid #808080 !important;
  border-right: 2px solid #ffffff !important;
  border-bottom: 2px solid #ffffff !important;
  border-radius: 0px !important;
}

/* ============================================================ */
/* THEME 5: MINECRAFT (PIXEL BLOCKS & EMERALD GLOW)             */
/* ============================================================ */
body.theme-style-minecraft {
  background: radial-gradient(circle at 50% 25%, #2a221d 0%, #151210 100%) !important;
  font-family: 'Segoe UI', 'Courier New', monospace, sans-serif !important;
  --text-white: #ffffff !important;
  --text-normal: #f5eedb !important;
  --text-muted: #bfae9d !important;
  --text-dim: #8c7e6f !important;
}

body.theme-style-minecraft .sidebar,
body.theme-style-minecraft .top-bar,
body.theme-style-minecraft .project-card,
body.theme-style-minecraft .user-card-widget,
body.theme-style-minecraft .modal-content,
body.theme-style-minecraft .chat-window,
body.theme-style-minecraft .hero-banner {
  background: #2b2520 !important;
  border: 3px solid #14110e !important;
  outline: 2px solid #4a3e35 !important;
  border-radius: 4px !important;
  box-shadow: 4px 4px 0px #0b0908 !important;
}

body.theme-style-minecraft .btn,
body.theme-style-minecraft .yt-btn,
body.theme-style-minecraft .tag-pill,
body.theme-style-minecraft .chat-send-btn {
  border-radius: 2px !important;
  background: #4e433a !important;
  border-top: 3px solid #7a6b5c !important;
  border-left: 3px solid #7a6b5c !important;
  border-right: 3px solid #221c17 !important;
  border-bottom: 3px solid #221c17 !important;
  color: #ffffff !important;
  box-shadow: 2px 2px 0px #000000 !important;
  font-weight: 800 !important;
  transition: none !important;
}

body.theme-style-minecraft .btn:active,
body.theme-style-minecraft .yt-btn:active,
body.theme-style-minecraft .tag-pill:active {
  border-top: 3px solid #221c17 !important;
  border-left: 3px solid #221c17 !important;
  border-right: 3px solid #7a6b5c !important;
  border-bottom: 3px solid #7a6b5c !important;
  transform: translate(1px, 1px) !important;
}

body.theme-style-minecraft .btn-primary,
body.theme-style-minecraft .yt-btn-blue,
body.theme-style-minecraft .tag-pill.active {
  background: #16a34a !important;
  border-top: 3px solid #4ade80 !important;
  border-left: 3px solid #4ade80 !important;
  border-right: 3px solid #14532d !important;
  border-bottom: 3px solid #14532d !important;
  color: #ffffff !important;
}

body.theme-style-minecraft .search-box input {
  background: #1e1916 !important;
  border: 2px solid #4a3e35 !important;
  border-radius: 2px !important;
  color: #f5eedb !important;
}

/* ============================================================ */
/* THEME 6: SYNTHWAVE / CYBERPUNK 80s (NEON LASER & RETROWAVE)  */
/* ============================================================ */
body.theme-style-synthwave {
  background: radial-gradient(circle at 50% 12%, rgba(255, 0, 128, 0.28) 0%, transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(0, 240, 255, 0.16) 0%, transparent 50%),
              linear-gradient(180deg, #1b0933 0%, #0d021c 60%, #05000a 100%) !important;
  --text-white: #ffffff !important;
  --text-normal: #fdf2f8 !important;
  --text-muted: #f472b6 !important;
  --text-dim: #c084fc !important;
}

body.theme-style-synthwave .sidebar,
body.theme-style-synthwave .top-bar,
body.theme-style-synthwave .project-card,
body.theme-style-synthwave .user-card-widget,
body.theme-style-synthwave .modal-content,
body.theme-style-synthwave .chat-window {
  background: rgba(26, 11, 46, 0.88) !important;
  border: 1px solid rgba(255, 0, 128, 0.45) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 0, 128, 0.2), inset 0 0 16px rgba(0, 240, 255, 0.08) !important;
}

body.theme-style-synthwave h1,
body.theme-style-synthwave h2,
body.theme-style-synthwave h3,
body.theme-style-synthwave .section-title,
body.theme-style-synthwave .project-title,
body.theme-style-synthwave .sidebar-brand-title {
  color: #ffffff !important;
  text-shadow: 0 0 12px rgba(255, 0, 128, 0.7), 0 0 24px rgba(0, 240, 255, 0.4) !important;
}

body.theme-style-synthwave .btn,
body.theme-style-synthwave .yt-btn,
body.theme-style-synthwave .tag-pill,
body.theme-style-synthwave .chat-send-btn {
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

body.theme-style-synthwave .btn-primary,
body.theme-style-synthwave .yt-btn-blue,
body.theme-style-synthwave .chat-send-btn,
body.theme-style-synthwave .tag-pill.active {
  background: linear-gradient(135deg, #ff007f 0%, #8b5cf6 100%) !important;
  border: 1px solid #00f0ff !important;
  box-shadow: 0 0 16px rgba(255, 0, 128, 0.5) !important;
  color: #ffffff !important;
}

/* ============================================================ */
/* THEME 7: DEEP SPACE (КОСМИЧЕСКАЯ ГАЛАКТИКА И САПФИР)         */
/* ============================================================ */
body.theme-style-space {
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
              radial-gradient(circle at 50% 50%, rgba(30, 58, 138, 0.25) 0%, transparent 60%),
              linear-gradient(135deg, #020617 0%, #060e28 50%, #030712 100%) !important;
  --text-white: #ffffff !important;
  --text-normal: #f0f9ff !important;
  --text-muted: #93c5fd !important;
  --text-dim: #60a5fa !important;
}

body.theme-style-space .sidebar,
body.theme-style-space .top-bar,
body.theme-style-space .project-card,
body.theme-style-space .user-card-widget,
body.theme-style-space .modal-content,
body.theme-style-space .chat-window {
  background: rgba(7, 16, 43, 0.88) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 22px rgba(56, 189, 248, 0.12) !important;
}

body.theme-style-space .btn-primary,
body.theme-style-space .yt-btn-blue,
body.theme-style-space .chat-send-btn,
body.theme-style-space .tag-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #1e40af 100%) !important;
  border: 1px solid #38bdf8 !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
}

/* ============================================================ */
/* THEME 8: WEB 2000 (САЙТЫ 1990 - 2007, WEB 1.0/2.0 И НАРОД)   */
/* ============================================================ */
body.theme-style-web2000 {
  background: #eef2f7 !important;
  font-family: 'Verdana', 'Tahoma', 'Segoe UI', sans-serif !important;
  --text-white: #0f172a !important;
  --text-normal: #1e293b !important;
  --text-muted: #334155 !important;
  --text-dim: #475569 !important;
}

body.theme-style-web2000 .section-title,
body.theme-style-web2000 .project-title,
body.theme-style-web2000 h1,
body.theme-style-web2000 h2,
body.theme-style-web2000 h3 {
  color: #003399 !important;
  font-weight: 800 !important;
}

body.theme-style-web2000 .sidebar,
body.theme-style-web2000 .project-card,
body.theme-style-web2000 .user-card-widget,
body.theme-style-web2000 .modal-content,
body.theme-style-web2000 .chat-window,
body.theme-style-web2000 .hero-banner {
  background: #ffffff !important;
  border: 1px solid #b4c2d6 !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 12px rgba(0, 40, 100, 0.08) !important;
  color: #1e293b !important;
}

body.theme-style-web2000 .top-bar {
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important;
  border-bottom: 2px solid #1e3a8a !important;
  color: #ffffff !important;
  border-radius: 0 0 8px 8px !important;
}

body.theme-style-web2000 .top-bar * {
  color: #ffffff !important;
}

body.theme-style-web2000 .btn,
body.theme-style-web2000 .yt-btn,
body.theme-style-web2000 .tag-pill {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
  border: 1px solid #94a3b8 !important;
  color: #0f172a !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 1px 0 #ffffff !important;
}

body.theme-style-web2000 .btn-primary,
body.theme-style-web2000 .yt-btn-blue,
body.theme-style-web2000 .chat-send-btn,
body.theme-style-web2000 .tag-pill.active {
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 50%, #1d4ed8 100%) !important;
  border: 1px solid #1e40af !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

body.theme-style-web2000 .search-box input {
  background: #ffffff !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 4px !important;
  color: #0f172a !important;
}

/* ============================================================ */
/* THEME 9: SAKURA (НЕЖНАЯ САКУРА И ТЕМНАЯ СЛИВА)               */
/* ============================================================ */
body.theme-style-sakura {
  background: radial-gradient(circle at 15% 20%, rgba(244, 114, 182, 0.25) 0%, transparent 55%),
              radial-gradient(circle at 85% 80%, rgba(251, 113, 133, 0.2) 0%, transparent 50%),
              linear-gradient(135deg, #180d22 0%, #251230 50%, #110816 100%) !important;
  --text-white: #ffffff !important;
  --text-normal: #fdf2f8 !important;
  --text-muted: #fbcfe8 !important;
  --text-dim: #f472b6 !important;
}

body.theme-style-sakura .sidebar,
body.theme-style-sakura .top-bar,
body.theme-style-sakura .project-card,
body.theme-style-sakura .user-card-widget,
body.theme-style-sakura .modal-content,
body.theme-style-sakura .chat-window {
  background: rgba(38, 20, 50, 0.88) !important;
  border: 1px solid rgba(244, 114, 182, 0.35) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 32px rgba(18, 5, 24, 0.6), 0 0 18px rgba(244, 114, 182, 0.14) !important;
}

body.theme-style-sakura .btn-primary,
body.theme-style-sakura .yt-btn-blue,
body.theme-style-sakura .chat-send-btn,
body.theme-style-sakura .tag-pill.active {
  background: linear-gradient(135deg, #f472b6 0%, #db2777 100%) !important;
  border: 1px solid #fbcfe8 !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(244, 114, 182, 0.35) !important;
}

/* ============================================================ */
/* INDIVIDUAL UI PARAMETER MODIFIERS (BORDER RADIUS & UI SCALE) */
/* ============================================================ */
body.ui-radius-sharp .btn,
body.ui-radius-sharp .yt-btn,
body.ui-radius-sharp .tag-pill,
body.ui-radius-sharp .project-card,
body.ui-radius-sharp .sidebar,
body.ui-radius-sharp .user-card-widget,
body.ui-radius-sharp .modal-content,
body.ui-radius-sharp .chat-window,
body.ui-radius-sharp .search-box input {
  border-radius: 2px !important;
}

body.ui-radius-standard .btn,
body.ui-radius-standard .yt-btn,
body.ui-radius-standard .tag-pill,
body.ui-radius-standard .project-card,
body.ui-radius-standard .user-card-widget,
body.ui-radius-standard .modal-content,
body.ui-radius-standard .chat-window {
  border-radius: 12px !important;
}

body.ui-radius-soft .btn,
body.ui-radius-soft .yt-btn,
body.ui-radius-soft .tag-pill,
body.ui-radius-soft .project-card,
body.ui-radius-soft .user-card-widget,
body.ui-radius-soft .modal-content,
body.ui-radius-soft .chat-window {
  border-radius: 22px !important;
}

body.ui-radius-round .btn,
body.ui-radius-round .yt-btn,
body.ui-radius-round .tag-pill,
body.ui-radius-round .chat-send-btn,
body.ui-radius-round .search-box input {
  border-radius: 999px !important;
}

/* High Contrast rules for Light Theme */
body.theme-light {
  --text-white: #0f172a !important;
  --text-normal: #1e293b !important;
  --text-muted: #334155 !important;
  --text-dim: #475569 !important;
}

body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light label,
body.theme-light .section-title,
body.theme-light .theme-preset-name,
body.theme-light .user-name,
body.theme-light .sidebar-brand-title,
body.theme-light .nav-text {
  color: #0f172a !important;
}

body.theme-light p,
body.theme-light .section-subtitle,
body.theme-light .results-count,
body.theme-light .tags-label,
body.theme-light .project-desc,
body.theme-light .theme-preset-desc,
body.theme-light .stat-mini-lbl {
  color: #334155 !important;
}

/* User Card Widget & Mini Posts Contrast Fix for Light Theme */
body.theme-light .user-card-widget,
body.theme-light .mini-post-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body.theme-light .user-name,
body.theme-light .mini-post-card .mini-post-user {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body.theme-light .user-role,
body.theme-light .sub-counter,
body.theme-light .mini-post-date {
  color: #475569 !important;
  font-weight: 600 !important;
}

body.theme-light .mini-post-text {
  color: #1e293b !important;
  font-weight: 500 !important;
}

/* Custom Background Color Support across the whole platform */
body.has-custom-bg {
  background: var(--custom-bg-color) !important;
}

/* Custom Text Color Support across the whole platform */
body.has-custom-text-color,
body.has-custom-text-color h1,
body.has-custom-text-color h2,
body.has-custom-text-color h3,
body.has-custom-text-color h4,
body.has-custom-text-color p,
body.has-custom-text-color label,
body.has-custom-text-color .card-title,
body.has-custom-text-color .project-title,
body.has-custom-text-color .project-desc,
body.has-custom-text-color .section-title,
body.has-custom-text-color .section-subtitle,
body.has-custom-text-color .user-name,
body.has-custom-text-color .mini-post-text,
body.has-custom-text-color .nav-text,
body.has-custom-text-color .sidebar-brand-title {
  color: var(--custom-text-color) !important;
}

/* Color swatch buttons in modal & settings */
.post-color-btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-color-btn:hover {
  transform: scale(1.15);
}
.post-color-btn.active {
  box-shadow: 0 0 0 2px var(--blurple);
}

/* Explicit high-contrast rules for sidebar-post-btn & secondary buttons */
#sidebar-post-btn,
.btn-secondary {
  background-color: #3b3f46 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22) !important;
  transition: all 0.35s cubic-bezier(0.2, 0, 0, 1) !important;
}

#sidebar-post-btn:hover,
.btn-secondary:hover {
  background-color: #5865f2 !important;
  color: #ffffff !important;
  border-color: #7983f5 !important;
  filter: brightness(1.22) !important;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.5), 0 0 16px rgba(88, 101, 242, 0.38) !important;
}

body.theme-light #sidebar-post-btn,
body.theme-light .btn-secondary {
  background-color: #475569 !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

/* Protect buttons against becoming unreadable under custom text colors */
body.has-custom-text-color .btn-primary,
body.has-custom-text-color .btn-primary * {
  color: var(--btn-primary-text, #ffffff) !important;
}
body.has-custom-text-color .btn-secondary,
body.has-custom-text-color #sidebar-post-btn {
  color: #ffffff !important;
}
body.has-custom-text-color .btn-admin {
  color: #ffffff !important;
}
body.has-custom-text-color .tag-pill.active {
  color: var(--btn-primary-text, #ffffff) !important;
}





/* ================= INTERACTIVE BACKGROUND PARTICLES (DISABLED BY USER REQUEST) ================= */
.main-wrapper {
  position: relative;
}

.bg-particles-canvas,
.banner-particles-canvas {
  display: none !important;
}

/* Узкий экран: меню открывается поверх страницы и не сжимает игры. */
.mobile-sidebar-toggle-btn,
.sidebar-backdrop {
  display: none;
}
@media (max-width: 700px) {
  body .app-layout { display: block !important; }
  body .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(280px, 84vw) !important;
    min-width: 0 !important;
    max-width: 84vw !important;
    height: 100dvh !important;
    transform: translateX(-105%) !important;
    transition: transform .24s ease !important;
    z-index: 120 !important;
    overflow-y: auto !important;
  }
  body .sidebar.mobile-open { transform: translateX(0) !important; }
  body .main-wrapper {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100dvh !important;
  }
  .sidebar-backdrop.active {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(8, 9, 17, .58);
  }
  .mobile-sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    height: 38px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-normal);
  }
  .top-bar { padding: 8px 12px !important; }
  .content-body { padding: 16px 14px 30px !important; }
  .projects-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  body .sidebar { transition: none !important; }
}

/* Ensure foreground content stays cleanly interactive and above background particles */
.top-bar,
.content-body {
  position: relative;
  z-index: 2;
}

/* Modals and toasts MUST be fixed overlays with top-level z-index! */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
}

.modal-overlay.open {
  display: flex !important;
  opacity: 1 !important;
}

.toast-container {
  position: fixed !important;
  z-index: 100000 !important;
}

/* ================= SUBCATEGORIES FILTER BAR & BADGES ================= */
.subcategories-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px;
  margin: 10px 0 16px;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}
.subcategories-filter-bar::-webkit-scrollbar {
  height: 5px;
}
.subcategories-filter-bar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.subcat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-right: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.subcat-pill {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.category-badge.subcat-badge {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  font-size: 10.5px !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  margin-left: 4px !important;
  font-weight: 600 !important;
}

/* Help tab */
.help-page { max-width: 920px; margin: 0 auto; color: var(--text-normal); line-height: 1.55; }
.help-intro { margin: 0 0 18px; color: var(--text-muted); }
.help-quick-check, .help-questions details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.help-quick-check { padding: 18px 22px; border-left: 3px solid #8b65d8; }
.help-quick-check strong { font-size: 17px; }
.help-quick-check ol { margin: 10px 0 0; padding-left: 22px; }
.help-quick-check li + li { margin-top: 5px; }
.help-page h3 { margin: 28px 0 14px; font-size: 20px; }
.help-questions { display: grid; gap: 10px; }
.help-questions details { padding: 0 18px; }
.help-questions summary { cursor: pointer; padding: 15px 0; font-weight: 650; }
.help-questions summary:focus-visible { outline: 2px solid #8b65d8; outline-offset: 3px; }
.help-questions p { margin: 0 0 16px; color: var(--text-muted); }
.help-questions a { color: #a889f1; text-decoration: underline; }
@media (max-width: 640px) {
  .help-quick-check { padding: 15px 17px; }
  .help-questions details { padding: 0 14px; }
}

.account-figure {
  max-width: 920px;
  margin: 18px auto 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-normal);
}
.account-figure-art { width: 112px; height: 112px; flex: 0 0 112px; }
.account-figure-art svg { width: 100%; height: 100%; display: block; border-radius: 8px; }
.account-figure-copy { min-width: 0; }
.account-figure-copy strong, .account-figure-copy code { display: block; }
.account-figure-copy strong { font-size: 15px; margin-bottom: 5px; }
.account-figure-copy code { font: 600 13px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.account-figure-copy p { margin: 8px 0 0; color: var(--text-muted); font-size: 12px; }
@media (max-width: 560px) {
  .account-figure { align-items: flex-start; gap: 12px; }
  .account-figure-art { width: 76px; height: 76px; flex-basis: 76px; }
}

