:root {
  --blue-100: #dbeeff;
  --blue-200: #b3d9ff;
  --blue-300: #7bbfff;
  --blue-400: #4a9ee8;
  --blue-500: #2d7dd2;
  --blue-600: #1a5fa8;
  --blue-700: #0f3d73;
  --accent: #5bb4f5;
  --white: #ffffff;
  --glass-bg: rgba(255,255,255,0.18);
  --glass-bg-solid: rgba(255,255,255,0.92);
  --glass-border: rgba(255,255,255,0.45);
  --glass-shadow: 0 8px 32px rgba(30,80,160,0.18);
  --text-dark: #0d2240;
  --text-mid: #2d5a8e;
  --text-muted: #6b9abf;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --transition: 0.2s ease;
}


[data-theme="dark"] {
  --glass-bg: rgba(255,255,255,0.06);
  --glass-bg-solid: rgba(20,26,50,0.96);
  --glass-border: rgba(255,255,255,0.14);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.5);
  --text-dark: #e2e8f0;
  --text-mid: #94a3b8;
  --text-muted: #64748b;
  --accent: #60a5fa;
}
[data-theme="dark"] body {
  background: linear-gradient(135deg, #060c1a 0%, #0a1328 35%, #0d1a35 65%, #091022 100%);
  color: #e2e8f0;
}
[data-theme="dark"] a { color: #60a5fa; }
[data-theme="dark"] a:hover { color: #93c5fd; }
[data-theme="dark"] .glass-card {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] .navbar .nav-inner { background: rgba(10,16,36,0.85); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .nav-link { color: rgba(255,255,255,0.8); }
[data-theme="dark"] .nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
[data-theme="dark"] .footer { background: rgba(6,12,26,0.8); border-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); }
[data-theme="dark"] .form-input, [data-theme="dark"] .form-select, [data-theme="dark"] .form-textarea {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: #e2e8f0;
}
[data-theme="dark"] .form-input::placeholder { color: rgba(255,255,255,0.35); }
[data-theme="dark"] .btn-outline { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.85); }
[data-theme="dark"] .btn-outline:hover { background: rgba(255,255,255,0.12); }
[data-theme="dark"] .page-title, [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f1f5f9; }
[data-theme="dark"] .page-subtitle { color: rgba(255,255,255,0.55); }
[data-theme="dark"] .mod-table td { color: rgba(255,255,255,0.88); }
[data-theme="dark"] .mod-table th { color: rgba(255,255,255,0.45); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .mod-table tr:hover td { background: rgba(255,255,255,0.04); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #a8d4f5 0%, #5bb4f5 35%, #3a8edb 65%, #2264b8 100%);
  min-height: 100vh;
  color: var(--text-dark);
  position: relative;
  overflow-x: hidden;
}

/* Moving brand-logo watermark (high-res transparent tile — no square seams)
   over slow-drifting gradient orbs for depth. */
.bg-anim {
  position: fixed;
  inset: -75%;
  width: 250%;
  height: 250%;
  pointer-events: none;
  z-index: 0;
  background-image: url('/img/logo-tile.png');
  background-repeat: repeat;
  background-size: 132px 132px;
  opacity: 0.07;
  transform: rotate(-20deg);
  animation: bg-drift 26s linear infinite;
}
.bg-anim::before,
.bg-anim::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38vw 38vw at 12% 18%, rgba(255,255,255,0.28), transparent 60%),
    radial-gradient(42vw 42vw at 88% 22%, rgba(120,190,255,0.30), transparent 62%),
    radial-gradient(46vw 46vw at 78% 90%, rgba(45,125,210,0.28), transparent 60%),
    radial-gradient(40vw 40vw at 18% 88%, rgba(160,210,255,0.25), transparent 62%);
  filter: blur(20px);
  animation: bg-orbs 24s ease-in-out infinite alternate;
}
.bg-anim::after {
  animation-duration: 34s;
  animation-direction: alternate-reverse;
  opacity: 0.7;
}
@keyframes bg-drift {
  0%   { background-position: 0 0; }
  100% { background-position: -132px 132px; }
}
@keyframes bg-orbs {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
  50%  { transform: translate3d(2%, 3%, 0) scale(1.08); }
  100% { transform: translate3d(3%, -3%, 0) scale(1.04); }
}
[data-theme="dark"] .bg-anim { opacity: 0.045; }
[data-theme="dark"] .bg-anim::before,
[data-theme="dark"] .bg-anim::after {
  background:
    radial-gradient(40vw 40vw at 12% 16%, rgba(96,165,250,0.20), transparent 60%),
    radial-gradient(44vw 44vw at 88% 24%, rgba(45,90,168,0.28), transparent 62%),
    radial-gradient(48vw 48vw at 80% 92%, rgba(30,60,140,0.30), transparent 60%),
    radial-gradient(40vw 40vw at 16% 86%, rgba(60,110,200,0.18), transparent 62%);
}
@media (prefers-reduced-motion: reduce) {
  .bg-anim, .bg-anim::before, .bg-anim::after { animation: none; }
}

nav, main, .flash-container, footer { position: relative; z-index: 1; }

body.chat-page { overflow: hidden; height: 100vh; display: flex; flex-direction: column; }

a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-600); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); border-radius: 3px; }

.navbar {
  position: sticky;
  top: 16px;
  z-index: 1000;
  padding: 0 24px;
  margin: 16px auto 0;
  max-width: 1100px;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  box-shadow: var(--glass-shadow);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: -0.5px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: var(--blue-500);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

.nav-link.btn-signup {
  background: var(--white);
  color: var(--blue-500);
  margin-left: 4px;
}

.nav-link.btn-signup:hover {
  background: var(--blue-100);
  color: var(--blue-600);
}

.flash-container { max-width: 1100px; margin: 16px auto 0; padding: 0 24px; }
.flash { padding: 12px 18px; border-radius: var(--radius-sm); font-weight: 500; font-size: 0.9rem; }
.flash-success { background: rgba(255,255,255,0.85); color: #1a7a3c; border: 1px solid #a3e6b8; }
.flash-error   { background: rgba(255,255,255,0.85); color: #b91c1c; border: 1px solid #fca5a5; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-content { padding: 40px 0 80px; }

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
}

.glass-card-solid {
  background: var(--glass-bg-solid);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-shadow);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--white);
  color: var(--blue-500);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-primary:hover { background: var(--blue-100); color: var(--blue-600); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--white); }

.btn-blue {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(45,125,210,0.35);
}
.btn-blue:hover { background: linear-gradient(135deg, var(--blue-500), var(--blue-600)); transform: translateY(-1px); }

.btn-danger {
  background: #ef4444;
  color: var(--white);
}
.btn-danger:hover { background: #dc2626; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.22);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,0.18);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}

.role-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.role-edr   { background: rgba(56,189,248,0.18); color: #38bdf8; border: 1px solid #38bdf8; }
.role-admin { background: #fef3c7; color: #92400e; }
.role-mod   { background: #dbeafe; color: #1e3a8a; }
.role-user  { background: rgba(255,255,255,0.2); color: var(--white); }

.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 48px;
  align-items: center;
}

.hero-content { }

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 16px 0 20px;
}

.hero-description {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-image-wrap {
  position: relative;
}

.hero-mockup {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
}

.mockup-screen {
  background: linear-gradient(135deg, #c9e7ff, #a8d4f5);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
}

.mockup-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.mockup-logo {
  background: linear-gradient(135deg, var(--blue-400), var(--blue-600));
  color: white;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  box-shadow: 0 8px 24px rgba(45,125,210,0.4);
}

.mockup-logo span { font-size: 0.7rem; line-height: 1; }

.mockup-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  margin-bottom: 8px;
}

.mockup-btn-play {
  background: var(--blue-500);
  color: white;
}

.mockup-btn-switch {
  background: rgba(255,255,255,0.7);
  color: var(--blue-500);
}

.mockup-pattern {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0.15;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M20 5 L35 30 L5 30 Z' fill='none' stroke='%232d7dd2' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  pointer-events: none;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  margin: 0;
}

.section-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}

.feature-card {
  padding: 24px;
  text-align: center;
}

.feature-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.feature-card-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.has-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

.has-card {
  padding: 28px;
}

.has-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.has-card-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.news-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}

.news-mini-card {
  padding: 22px;
}

.news-mini-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.news-mini-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
}

.news-mini-body {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  margin-top: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.auth-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input::placeholder,
.form-textarea::placeholder { color: rgba(255,255,255,0.45); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.22);
}

.form-textarea { resize: vertical; min-height: 120px; }

.form-select option { background: var(--blue-600); color: white; }

.form-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-top: 5px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.25);
}

.chat-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: 0;
  margin-top: 16px;
  padding: 0 24px 24px;
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.chat-sidebar {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.chat-sidebar-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.5);
  padding: 0 4px;
  margin-bottom: 4px;
}

.online-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.online-user:hover { background: rgba(255,255,255,0.1); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-left: auto;
  flex-shrink: 0;
}

.chat-main {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-title {
  font-weight: 800;
  color: var(--white);
  font-size: 1rem;
}

.chat-header-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-left: auto;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg {
  display: flex;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background var(--transition);
}

.chat-msg:hover { background: rgba(255,255,255,0.08); }

.chat-msg-avatar { flex-shrink: 0; }

.chat-msg-body { flex: 1; min-width: 0; }

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.chat-msg-username {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white);
}

.chat-msg-time {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}

.chat-msg-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.5;
  word-break: break-word;
}

.chat-input-area {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 11px 18px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.chat-input::placeholder { color: rgba(255,255,255,0.45); }
.chat-input:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }

.rules-grid {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.rule-card {
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.rule-number {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  color: var(--white);
  flex-shrink: 0;
}

.rule-body {}

.rule-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}

.rule-content {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.posts-grid {
  display: grid;
  gap: 20px;
}

.post-card {
  padding: 28px;
}

.post-card-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-card-title a { color: var(--white); }
.post-card-title a:hover { color: var(--blue-100); }

.post-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.post-body {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  white-space: pre-wrap;
}

.post-image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

.post-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}

.single-post { max-width: 800px; margin: 0 auto; }

.mod-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.panel-card {
  padding: 28px;
}

.panel-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.user-table th {
  text-align: left;
  padding: 8px 12px;
  color: rgba(255,255,255,0.55);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.user-table td {
  padding: 10px 12px;
  color: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
}

.user-table tr:last-child td { border-bottom: none; }
.user-table tr:hover td { background: rgba(255,255,255,0.05); }

.banned-row td { opacity: 0.5; }

.mod-log { display: flex; flex-direction: column; gap: 10px; }

.mod-log-item {
  padding: 12px 16px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.mod-log-action { font-weight: 700; color: var(--white); }
.mod-log-meta { color: rgba(255,255,255,0.55); margin-top: 2px; font-size: 0.76rem; }

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.profile-card {
  padding: 32px 24px;
  text-align: center;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--blue-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: white;
  margin: 0 auto 16px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.4);
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-username {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 6px;
}

.profile-since {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}

.profile-stat {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
}

.settings-card {
  padding: 28px;
}

.settings-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 16px;
}

hr.section-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 24px 0;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 24px;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.2);
  line-height: 1;
  letter-spacing: -4px;
}

.error-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  margin: -12px 0 12px;
}

.error-desc {
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
}

.footer {
  text-align: center;
  padding: 32px 24px;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
}

.form-page { max-width: 700px; margin: 0 auto; }
.form-card { padding: 36px; }
.form-title { font-size: 1.5rem; font-weight: 900; color: var(--white); margin-bottom: 24px; }

.text-white { color: var(--white); }
.text-muted { color: rgba(255,255,255,0.6); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255,255,255,0.5);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image-wrap { display: none; }
  .mod-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .chat-layout { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .chat-sidebar { display: none; }
  .chat-main { border-radius: var(--radius-md); }
}


.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none; border: none; cursor: pointer;
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-size: 0.875rem; font-weight: 600;
  color: rgba(255,255,255,0.9);
  transition: background var(--transition), color var(--transition);
  display: flex; align-items: center; gap: 5px;
  font-family: inherit; white-space: nowrap;
}
.nav-dropdown-btn:hover { background: rgba(255,255,255,0.2); color: var(--white); }
.nav-dropdown-btn .dd-arrow {
  font-size: 0.6rem; opacity: 0.7; transition: transform 0.2s;
}
.nav-dropdown.open .dd-arrow { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1.5px solid var(--glass-border);
  border-radius: 14px; padding: 6px;
  min-width: 160px; z-index: 2000;
  box-shadow: var(--glass-shadow);
  display: none; flex-direction: column; gap: 2px;
  transform-origin: top right;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-item {
  padding: 8px 14px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 600;
  color: rgba(255,255,255,0.9);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap; display: block;
}
.nav-dropdown-item:hover { background: rgba(255,255,255,0.2); color: var(--white); }
.nav-dropdown-danger { color: rgba(255,130,130,1); }
.nav-dropdown-danger:hover { background: rgba(239,68,68,0.2); color: #fca5a5; }
.nav-dropdown-divider { height: 1px; background: rgba(255,255,255,0.15); margin: 4px 0; }
.nav-user-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }


.nav-hamburger {
  display: none; background: none; border: none;
  color: rgba(255,255,255,0.9); cursor: pointer; padding: 6px 8px;
  line-height: 1; margin-left: auto; border-radius: 8px;
  transition: background 0.15s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.15); }
.nav-hamburger svg { display: block; }

@media (max-width: 700px) {
  .nav-hamburger { display: flex; align-items: center; }
  .nav-inner {
    position: relative;
    flex-wrap: wrap;
    border-radius: 20px;
    padding: 10px 16px;
  }
  
  .nav-inner:has(.nav-links.open) { border-radius: 20px; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 6px 0 4px;
    margin-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.2);
  }
  .nav-links.open { display: flex; }
  .nav-link, .nav-dropdown-btn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
  }
  .nav-dropdown { width: 100%; }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 4px 0 4px 10px;
    margin: 2px 0 4px;
    flex-direction: column;
  }
  .nav-dropdown-item { padding: 8px 12px; font-size: 0.88rem; }
  .nav-user-avatar { width: 22px; height: 22px; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 8px 14px; }
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
}

.page-section { padding: 48px 0 80px; }
.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.page-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.7); margin-bottom: 0; }
.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-title-sm {
  font-size: 1rem;
  font-weight: 800;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.hero { padding: 56px 0 40px; }
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; animation: pulse-dot 2s infinite; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero-accent { color: var(--blue-100); }
.hero-subtitle { font-size: 1rem; color: rgba(255,255,255,0.82); line-height: 1.65; max-width: 540px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.chip-green { background: #22c55e; }
.chip-blue  { background: #60a5fa; }
.chip-purple { background: #a78bfa; }

.section { padding: 0 0 56px; }
.section-header { margin-bottom: 30px; }
.section-link { font-size: 0.9rem; font-weight: 700; color: var(--white); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.feature-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-icon { font-size: 1.8rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--white); }
.feature-card p { font-size: 0.88rem; color: rgba(255,255,255,0.75); line-height: 1.55; }
.feature-link { font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-top: auto; }

.feature-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-card-sm {
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-icon-sm { font-size: 1.5rem; flex-shrink: 0; }
.feature-card-sm h4 { font-size: 0.95rem; font-weight: 800; color: var(--white); margin-bottom: 4px; }
.feature-card-sm p { font-size: 0.85rem; color: rgba(255,255,255,0.72); line-height: 1.5; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.news-card {
  display: block;
  padding: 22px;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(30,80,160,0.25); }
.news-card .news-meta { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.news-card h3 { font-size: 1rem; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.news-card p { font-size: 0.85rem; color: rgba(255,255,255,0.75); line-height: 1.5; }

.cta-card { padding: 48px; text-align: center; }
.cta-card h2 { font-size: 1.8rem; font-weight: 900; color: var(--white); margin-bottom: 10px; }
.cta-card p { color: rgba(255,255,255,0.75); margin-bottom: 28px; font-size: 1rem; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.auth-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.auth-card { width: 100%; max-width: 440px; padding: 40px; margin: 0 auto; }
.auth-header { text-align: center; margin-bottom: 28px; }
.nav-logo-icon-lg {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--blue-400), var(--blue-500));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: white;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px rgba(45,125,210,0.35);
}
.auth-header h1 { font-size: 1.6rem; font-weight: 900; color: var(--white); margin-bottom: 4px; }
.auth-header p { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: rgba(255,255,255,0.45); font-size: 0.8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.2); }
.auth-footer { text-align: center; margin-top: 18px; font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.auth-footer a { color: var(--white); font-weight: 700; }

.btn-full { width: 100%; justify-content: center; }
.btn-discord {
  background: #5865F2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-discord:hover { background: #4752C4; color: white; }

.btn-outline-sm {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: var(--white);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-outline-sm:hover { background: rgba(255,255,255,0.15); color: var(--white); }

.btn-danger-sm {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  color: white;
  background: #ef4444;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-danger-sm:hover { background: #dc2626; }

.btn-primary-sm {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--white);
  color: var(--blue-500);
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-sm:hover { background: var(--blue-100); color: var(--blue-600); }

.posts-list { display: flex; flex-direction: column; gap: 20px; }
.post-card { display: block; padding: 28px; text-decoration: none; transition: transform var(--transition); }
.post-card:hover { transform: translateY(-2px); }
.post-card .post-meta { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.post-card h2 { font-size: 1.25rem; font-weight: 800; color: var(--white); margin-bottom: 10px; line-height: 1.3; }
.post-card p { font-size: 0.9rem; color: rgba(255,255,255,0.78); line-height: 1.6; }
.post-read-more { display: inline-block; margin-top: 12px; font-size: 0.85rem; font-weight: 700; color: var(--accent); }

.dev-card { padding: 28px; }
.dev-card .post-meta { font-size: 0.8rem; color: rgba(255,255,255,0.55); margin-bottom: 8px; }
.dev-card h2 { font-size: 1.2rem; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.dev-card p { font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.65; white-space: pre-wrap; }
.dev-image { width: 100%; max-height: 340px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 18px; }
.article-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); }

.single-post-card { max-width: 760px; margin: 0 auto; padding: 40px; }
.single-post-title { font-size: 2rem; font-weight: 900; color: var(--white); margin-bottom: 10px; line-height: 1.2; }
.single-post-meta { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 24px; }
.single-post-body { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.75; white-space: pre-wrap; }
.single-post-back { display: inline-block; margin-top: 24px; font-size: 0.85rem; font-weight: 700; color: var(--white); }

.content-form { display: flex; flex-direction: column; gap: 16px; }
.form-card-inner { padding: 36px; }
.form-card-inner h1 { font-size: 1.5rem; font-weight: 900; color: var(--white); margin-bottom: 24px; }

.rules-list { display: flex; flex-direction: column; gap: 14px; max-width: 800px; margin: 0 auto; }
.rule-card { display: flex; gap: 20px; align-items: flex-start; padding: 24px 28px; }
.rule-number {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: var(--white);
  flex-shrink: 0;
}
.rule-content h3 { font-size: 1.05rem; font-weight: 800; color: var(--white); margin-bottom: 6px; }
.rule-content p { font-size: 0.9rem; color: rgba(255,255,255,0.8); line-height: 1.6; }

.chat-page {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  padding: 16px 24px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.chat-sidebar {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-sidebar h3 { font-size: 0.9rem; font-weight: 800; color: var(--white); }
.chat-info { font-size: 0.8rem; color: rgba(255,255,255,0.6); }
.online-indicator { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: rgba(255,255,255,0.75); }
.chat-main {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.chat-loading { color: rgba(255,255,255,0.4); font-size: 0.85rem; text-align: center; padding: 24px; }
.chat-error { color: #fca5a5; font-size: 0.85rem; text-align: center; padding: 24px; }

.chat-reply-bar {
  padding: 7px 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  background: rgba(56,189,248,0.08);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: rgba(255,255,255,0.65);
  flex-shrink: 0;
}
.chat-reply-bar-icon { color: #38bdf8; font-size: 0.85rem; flex-shrink: 0; }
.chat-reply-bar-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-reply-bar-text strong { color: #38bdf8; }
.chat-reply-bar-cancel {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.4); font-size: 0.85rem; padding: 2px 4px;
  flex-shrink: 0; line-height: 1; border-radius: 4px;
  transition: color 0.15s;
}
.chat-reply-bar-cancel:hover { color: rgba(255,255,255,0.8); }


.chat-reply-preview {
  background: rgba(255,255,255,0.06); border-left: 3px solid #38bdf8;
  border-radius: 0 6px 6px 0; padding: 4px 10px; margin-bottom: 4px;
  font-size: 0.78rem; color: rgba(255,255,255,0.55);
  cursor: pointer; transition: background 0.15s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.chat-reply-preview:hover { background: rgba(255,255,255,0.1); }
.chat-reply-preview strong { color: #38bdf8; margin-right: 4px; }


.chat-reply-btn {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.4); font-size: 0.75rem; padding: 2px 6px;
  border-radius: 4px; opacity: 0; transition: opacity 0.15s, color 0.15s;
  line-height: 1; flex-shrink: 0;
}
.chat-message:hover .chat-reply-btn { opacity: 1; }
.chat-reply-btn:hover { color: #38bdf8; background: rgba(56,189,248,0.1); }

.chat-input-bar {
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.chat-input-bar .form-input {
  flex: 1;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
}

.chat-message {
  display: flex;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background var(--transition);
}
.chat-message:hover { background: rgba(255,255,255,0.07); }
.chat-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-avatar-placeholder {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; color: white;
  flex-shrink: 0;
}
.chat-msg-avatar { flex-shrink: 0; }
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.chat-msg-username { font-weight: 700; font-size: 0.9rem; color: var(--white); text-decoration: none; }
.chat-msg-username:hover { color: #38bdf8; text-decoration: underline; }
.chat-avatar-link { display: contents; }
.chat-msg-time { font-size: 0.72rem; color: rgba(255,255,255,0.4); }
.chat-msg-content { font-size: 0.9rem; color: rgba(255,255,255,0.85); line-height: 1.5; word-break: break-word; }
.chat-role-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.chat-role-edr   { background: rgba(56,189,248,0.18); color: #38bdf8; border: 1px solid #38bdf8; }
.chat-role-admin { background: #fef3c7; color: #92400e; }
.chat-role-mod { background: #dbeafe; color: #1e3a8a; }

body.chat-body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
body.chat-body main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
body.chat-body .chat-page {
  flex: 1;
  min-height: 0;
}
body.chat-body .footer { display: none; }

.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.table-card { padding: 0; overflow: hidden; }
.mod-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.mod-table th {
  text-align: left;
  padding: 12px 14px;
  color: rgba(255,255,255,0.55);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.mod-table td {
  padding: 10px 14px;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  vertical-align: middle;
}
.mod-table tr:last-child td { border-bottom: none; }
.mod-table tr:hover td { background: rgba(255,255,255,0.04); }
.mod-table a { color: var(--accent); font-weight: 600; }
.row-banned td { opacity: 0.5; }
.status-active { color: #4ade80; font-weight: 700; font-size: 0.78rem; }
.status-banned { color: #f87171; font-weight: 700; font-size: 0.78rem; }
.action-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  color: var(--white);
}
.action-cell { white-space: nowrap; }
.reason-input {
  width: 100px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: white;
  font-size: 0.75rem;
}
.empty-text { padding: 24px; color: rgba(255,255,255,0.5); font-size: 0.9rem; }


.mod-section { padding: 20px; }
.mod-section-title { font-size: 1rem; font-weight: 800; color: rgba(255,255,255,0.9); margin: 0 0 14px; letter-spacing: 0.01em; }
.mod-username { color: rgba(255,255,255,0.95) !important; font-weight: 700; }
.mod-table a.mod-username { color: var(--accent) !important; }


.mod-actions-btn {
  padding: 3px 13px;
  font-size: 1.1rem;
  letter-spacing: 2px;
  background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.35);
  color: #c4b5fd;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
}
.mod-actions-btn:hover { background: rgba(167,139,250,0.28); }
.mod-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #0f1429;
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
  z-index: 200;
  overflow: hidden;
}
.mod-dropdown-menu.open { display: block; }
.mod-dropdown-group { border-top: 1px solid rgba(255,255,255,0.07); padding: 5px 0; }
.mod-dropdown-group:first-child { border-top: none; }
.mod-dropdown-group-label {
  padding: 7px 14px 3px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c6fcd;
}

.mod-dropdown-group:nth-child(1) .mod-dropdown-group-label { color: #f87171; }
.mod-dropdown-group:nth-child(2) .mod-dropdown-group-label { color: #60a5fa; }
.mod-dropdown-group:nth-child(3) .mod-dropdown-group-label { color: #fbbf24; }
.mod-dropdown-group:nth-child(4) .mod-dropdown-group-label { color: #4ade80; }
.mod-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s, color 0.1s;
  line-height: 1.3;
}
.mod-dropdown-item:hover { background: rgba(255,255,255,0.07); }
.mod-dropdown-blue { color: #93c5fd !important; }
.mod-dropdown-blue:hover { background: rgba(96,165,250,0.14) !important; }
.mod-dropdown-danger { color: #fca5a5 !important; }
.mod-dropdown-danger:hover { background: rgba(239,68,68,0.18) !important; }
.mod-dropdown-warn { color: #fde68a !important; }
.mod-dropdown-warn:hover { background: rgba(251,191,36,0.14) !important; }
.mod-dropdown-green { color: #86efac !important; }
.mod-dropdown-green:hover { background: rgba(34,197,94,0.14) !important; }
.mod-dropdown-form { margin: 0; }
.mod-reason-input {
  width: calc(100% - 32px);
  margin: 6px 16px 4px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  display: block;
}
.mod-reason-input::placeholder { color: rgba(255,255,255,0.35); }
.mod-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 16px 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}
.mod-dropdown-menu input[type="checkbox"] {
  accent-color: #a78bfa;
  width: 14px;
  height: 14px;
}
.mod-reason-input::placeholder { color: rgba(255,255,255,0.45); }
.mod-dropdown-menu label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 14px 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
}
.mod-dropdown-menu input[type="checkbox"] {
  accent-color: #a78bfa;
  width: 14px;
  height: 14px;
}


.badge-picker { padding: 4px 0; }
.badge-picker-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: background 0.1s;
}
.badge-picker-item:hover { background: rgba(255,255,255,0.06); }
.badge-picker-item input[type="checkbox"] { accent-color: #a78bfa; width: 13px; height: 13px; flex-shrink: 0; }
.badge-picker-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 4px;
}
.badge-apply-btn {
  padding: 4px 14px;
  background: rgba(167,139,250,0.2);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 6px;
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
}
.badge-apply-btn:hover { background: rgba(167,139,250,0.35); }
.badge-apply-btn:disabled { opacity: 0.5; cursor: default; }
.badge-apply-status { font-size: 0.75rem; font-weight: 600; }


.theme-toggle-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.theme-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.theme-btn.active { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }
.theme-btn:hover { background: rgba(255,255,255,0.2); }


.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px 16px;
}
.stat-value { font-size: 1.6rem; font-weight: 900; color: var(--white); line-height: 1; }
.stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.55); margin-top: 5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-sub { font-size: 0.7rem; color: rgba(255,255,255,0.4); margin-top: 2px; }


.edr-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edr-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 12px 14px;
}
.edr-toggle-info { display: flex; align-items: center; gap: 12px; }
.edr-toggle-icon { font-size: 1.2rem; }
.edr-toggle-label { font-size: .9rem; font-weight: 600; }
.edr-toggle-desc { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 2px; }
.edr-toggle-btn {
  padding: 6px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  letter-spacing: .06em;
  min-width: 56px;
  transition: opacity .15s;
}
.edr-toggle-btn:hover { opacity: .85; }
.edr-on  { background: #ef4444; color: #fff; }
.edr-off { background: rgba(255,255,255,.12); color: rgba(255,255,255,.55); }

.edr-danger-zone {
  margin-top: 22px;
  border-top: 1px solid rgba(239,68,68,.25);
  padding-top: 16px;
}
.edr-danger-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #f87171;
  margin-bottom: 12px;
}
.edr-danger-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.edr-danger-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.28);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s;
}
.edr-danger-btn:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.5); }
.edr-danger-btn.edr-danger-soft {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.12);
}
.edr-danger-btn.edr-danger-soft:hover { background: rgba(255,255,255,.1); }
.edr-danger-btn-icon { font-size: 1.2rem; }
.edr-danger-btn-label { font-size: .88rem; font-weight: 700; color: #fca5a5; margin-top: 2px; }
.edr-danger-btn.edr-danger-soft .edr-danger-btn-label { color: rgba(255,255,255,.8); }
.edr-danger-btn-desc { font-size: .74rem; color: rgba(255,255,255,.45); }

.container-narrow { max-width: 800px; }
.profile-card { padding: 36px; }
.profile-avatar-section { display: flex; gap: 24px; align-items: center; margin-bottom: 28px; flex-wrap: wrap; }
.profile-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,0.4); }
.profile-avatar-placeholder {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--blue-400);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 900; color: white;
  border: 3px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.profile-info h1 { font-size: 1.5rem; font-weight: 900; color: var(--white); margin-bottom: 6px; }
.profile-joined { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 6px; }
.profile-stats { font-size: 0.82rem; color: rgba(255,255,255,0.65); margin-top: 4px; }
.profile-edit-section { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 24px; }
.profile-edit-section h3 { font-size: 0.95rem; font-weight: 800; color: rgba(255,255,255,0.75); margin: 20px 0 12px; }
.profile-edit-section h3:first-child { margin-top: 0; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.content-form { display: flex; flex-direction: column; gap: 14px; }

.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 48px 24px;
  text-align: center;
}
.error-section .error-code {
  font-size: 7rem;
  font-weight: 900;
  color: rgba(255,255,255,0.18);
  letter-spacing: -4px;
  line-height: 1;
}
.error-section h1 { font-size: 1.8rem; font-weight: 900; color: var(--white); margin: -8px 0 10px; }
.error-section p { color: rgba(255,255,255,0.65); margin-bottom: 26px; }

.form-page-section { padding: 48px 0; }
.form-page-section .form-page { max-width: 720px; margin: 0 auto; }

.empty-state { padding: 48px; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.95rem; }

@media (max-width: 760px) {
  .mod-grid { grid-template-columns: 1fr; }
  .chat-page { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .chat-main { border-left: 1.5px solid var(--glass-border); border-radius: var(--radius-md); }
}

.article-card { padding: 36px; }
.article-card .post-meta { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-bottom: 12px; }
.article-card h1 { font-size: 1.9rem; font-weight: 900; color: var(--white); margin-bottom: 20px; line-height: 1.2; }
.article-body { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.75; }

.form-card { padding: 36px; }
.form-card h1 { font-size: 1.5rem; font-weight: 900; color: var(--white); margin-bottom: 24px; }
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.93rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 200px;
}
.form-textarea::placeholder { color: rgba(255,255,255,0.4); }
.form-textarea:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
}
.back-link:hover { color: var(--white); }

.error-card { padding: 56px; text-align: center; max-width: 500px; margin: 0 auto; }
.error-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 48px 24px;
}
.error-card .error-code {
  font-size: 5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.2);
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 8px;
}
.error-card h1 { font-size: 1.6rem; font-weight: 900; color: var(--white); margin-bottom: 10px; }
.error-card p { color: rgba(255,255,255,0.65); margin-bottom: 24px; }

.form-input {
  width: 100%;
  padding: 11px 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.93rem;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
}
.form-input::placeholder { color: rgba(255,255,255,0.4); }
.form-input:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.form-input[type="file"] { padding: 9px 14px; }

label { display: block; font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.8); margin-bottom: 7px; }

.nav-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.code-input {
  font-size: 1.8rem;
  letter-spacing: 8px;
  text-align: center;
  font-weight: 900;
}

.btn-text-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}
.btn-text-link:hover { color: var(--white); }

.support-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.form-select {
  width: 100%;
  padding: 11px 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-size: 0.93rem;
  outline: none;
  font-family: inherit;
  appearance: none;
  cursor: pointer;
}
.form-select option { background: #1a5fa8; color: white; }
.form-select:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }

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

.badword-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}
.badword-modal {
  max-width: 420px;
  width: 90%;
  text-align: center;
  padding: 40px 32px;
  animation: pop-in 0.2s ease;
}
@keyframes pop-in {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.badword-icon { font-size: 3rem; margin-bottom: 12px; }
.badword-modal h2 { font-size: 2rem; font-weight: 900; margin-bottom: 8px; }
.badword-rule { font-size: 0.85rem; opacity: 0.7; margin: 10px 0; font-style: italic; }
.badword-warn { font-size: 0.82rem; color: #ffaaaa; margin-bottom: 20px; }

.chat-date-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 10px; padding: 0 4px;
}
.chat-date-sep::before, .chat-date-sep::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
.chat-date-sep span {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em;
  color: rgba(255,255,255,0.3); white-space: nowrap; text-transform: uppercase;
}
.chat-system-msg {
  text-align: center;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 6px auto;
  max-width: 400px;
  opacity: 0.85;
}
.chat-system-warn { background: rgba(255,100,100,0.25); color: #ffcccc; }
.chat-system-info { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); }

.typing-indicator {
  padding: 4px 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  min-height: 22px;
}

.btn-gif, .btn-img-upload {
  padding: 8px 14px;
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-pill);
  color: var(--white);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-gif:hover, .btn-img-upload:hover { background: rgba(255,255,255,0.3); }
.btn-img-upload input[type=file] { display: none; }

.gif-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 80px;
  backdrop-filter: blur(4px);
}
.gif-modal {
  width: min(500px, 95vw);
  max-height: 420px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}
.gif-modal-header {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn-gif-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}
.btn-gif-close:hover { background: rgba(255,255,255,0.35); }
.gif-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  overflow-y: auto;
  max-height: 320px;
}
.gif-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s;
}
.gif-thumb:hover { transform: scale(1.04); }

.chat-gif {
  max-width: 240px;
  max-height: 200px;
  border-radius: 10px;
  margin-top: 4px;
  display: block;
}

.chat-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s, background 0.15s;
  color: rgba(255,255,255,0.7);
  margin-left: 4px;
}
.chat-message:hover .chat-delete-btn { opacity: 1; }
.chat-delete-btn:hover { background: rgba(255,80,80,0.3); color: #ffaaaa; }

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.member-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--white);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.member-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(30,80,160,0.28); color: var(--white); }
.member-banner {
  width: 100%;
  height: 72px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.member-body { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px 18px; }
.member-avatar-wrap { position: relative; flex-shrink: 0; }
.member-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.4); }
.member-avatar-placeholder { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.3rem; }
.member-role-dot { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.6); }
.member-role-edr   { background: #38bdf8; }
.member-role-admin { background: #f59e0b; }
.member-role-mod   { background: #3b82f6; }
.member-role-user  { background: #6b7280; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-username { font-size: 0.8rem; opacity: 0.6; margin-top: 2px; }
.member-bio { font-size: 0.82rem; opacity: 0.75; margin-top: 6px; line-height: 1.4; }
.member-badges { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.member-badge-icon { font-size: 1rem; }
.member-since { font-size: 0.75rem; opacity: 0.5; margin-top: 8px; }

.profile-header { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 32px; }
.profile-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1.5px solid;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}
.profile-badge .badge-label { color: var(--text-dark); opacity: 0.85; }
.profile-badge svg { flex-shrink: 0; }
.profile-bio { font-size: 0.9rem; opacity: 0.8; line-height: 1.6; margin-bottom: 14px; max-width: 500px; }
.profile-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-weight: 800; font-size: 1.1rem; }
.stat-label { font-size: 0.75rem; opacity: 0.6; }

.role-edr { background: rgba(56,189,248,0.18); color: #38bdf8; border: 1.5px solid #38bdf8; }

.profile-banner {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(135deg, rgba(56,189,248,0.25) 0%, rgba(99,102,241,0.25) 100%);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.profile-banner-placeholder { width: 100%; height: 100%; border-radius: inherit; }
.profile-card { padding: 0; overflow: hidden; }
.profile-body { padding: 0 28px 28px; position: relative; }
.profile-avatar-wrap { margin-top: -44px; margin-bottom: 12px; }
.profile-avatar-lg {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.18);
  display: block;
}
.profile-avatar-placeholder-lg {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  border: 4px solid rgba(255,255,255,0.18);
}
.profile-meta { flex: 1; min-width: 0; }
.profile-display-name { font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.profile-username { opacity: 0.6; font-size: 0.9rem; margin-bottom: 10px; }

.profile-socials { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  transition: background 0.18s, color 0.18s;
  text-decoration: none;
}
.social-link:hover { background: rgba(255,255,255,0.22); color: #fff; }

.socials-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .socials-form-grid { grid-template-columns: 1fr; } }

.profile-edit-section { padding: 28px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; flex-direction: column; gap: 8px; }
.profile-edit-section h3 { font-size: 0.88rem; font-weight: 700; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 14px; margin-bottom: 4px; }

.chat-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.chat-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  margin: 16px 24px 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(20px);
  border: 1.5px solid var(--glass-border);
}
.chat-topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-topbar-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.chat-topbar-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: white;
}
.chat-topbar-name {
  font-weight: 900;
  font-size: 1rem;
  color: white;
  letter-spacing: 0.05em;
}
.chat-topbar-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  padding: 3px 10px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-pill);
}
.chat-page { padding-top: 12px; }

.chat-audio-wrap { max-width: 320px; padding: 8px 0; }
.chat-audio-wrap audio { border-radius: 999px; width: 100%; min-width: 260px; }

img.emoji { height: 1.2em; width: 1.2em; vertical-align: -0.2em; display: inline; margin: 0 1px; }

/* Discord Widget */
.discord-widget-wrap { max-width: 680px; margin: 0 auto; }
.discord-widget-card { padding: 0; overflow: hidden; }
.dw-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
}
.dw-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.dw-info { flex: 1; min-width: 0; }
.dw-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}
.dw-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.dw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
  flex-shrink: 0;
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(35,165,90,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(35,165,90,0); }
}
.dw-join-btn {
  flex-shrink: 0;
  background: #5865F2;
  color: #fff;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.dw-join-btn:hover { background: #4752C4; transform: translateY(-1px); color: #fff; text-decoration: none; }
.dw-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 4px;
  padding: 12px;
}
.dw-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.12s;
}
.dw-member:hover { background: rgba(88,101,242,0.08); }
[data-theme="light"] .dw-member:hover { background: rgba(88,101,242,0.06); }
.dw-avatar-wrap { position: relative; flex-shrink: 0; }
.dw-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.dw-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}
.dw-member-info { min-width: 0; }
.dw-member-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dw-member-activity {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.dw-loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.dw-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--glass-border);
  border-top-color: #5865F2;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.dw-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
@media (max-width: 480px) {
  .dw-header { padding: 16px; gap: 10px; }
  .dw-members { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   Design polish layer — depth, sheen, motion (additive)
   ══════════════════════════════════════════════════════════════ */

/* Richer glass cards with a subtle top sheen + interactive lift */
.glass-card, .glass-card-solid, .feature-card, .role-card,
.pt-card, .news-card, .update-card {
  position: relative;
  transition: transform .28s cubic-bezier(.22,1,.36,1),
              box-shadow .28s cubic-bezier(.22,1,.36,1),
              border-color .28s ease;
}
.glass-card::before, .glass-card-solid::before, .feature-card::before, .pt-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 42%);
  opacity: .6; pointer-events: none;
}
[data-theme="dark"] .glass-card::before,
[data-theme="dark"] .glass-card-solid::before,
[data-theme="dark"] .feature-card::before,
[data-theme="dark"] .pt-card::before {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 42%);
}
.feature-card:hover, .role-card:hover, .pt-card:hover,
.news-card:hover, .update-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 44px rgba(20,80,160,.22);
  border-color: rgba(120,190,255,.6);
}
[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .role-card:hover,
[data-theme="dark"] .pt-card:hover,
[data-theme="dark"] .news-card:hover,
[data-theme="dark"] .update-card:hover {
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
  border-color: rgba(96,165,250,.55);
}

/* Primary button: gradient + glow + shine sweep */
.btn-primary {
  background: linear-gradient(135deg, #ffffff, #eaf4ff);
  color: var(--blue-600);
  box-shadow: 0 6px 18px rgba(26,95,168,.28);
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(26,95,168,.4); }
.btn-primary:hover::after { left: 130%; }

/* Hero title — layered glow + tighter type */
.hero-title {
  letter-spacing: -0.02em;
  text-shadow: 0 2px 30px rgba(45,125,210,.25);
}
[data-theme="dark"] .hero-title { text-shadow: 0 2px 34px rgba(96,165,250,.45); }

/* Nav — floating frosted bar */
.navbar .nav-inner {
  box-shadow: 0 6px 24px rgba(20,70,140,.12);
  transition: box-shadow .3s ease;
}

/* Section headings get a soft gradient underline accent */
.section-title::after, .page-title::after {
  content: "";
  display: block;
  width: 54px; height: 4px; margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--accent));
  opacity: .85;
}
.section-header[style*="center"] .section-title::after,
.page-header[style*="center"] .page-title::after { margin-left: auto; margin-right: auto; }

/* Smooth entrance for main content */
main { animation: pageIn .5s cubic-bezier(.22,1,.36,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main { animation: none; } .btn-primary::after { display: none; } }

/* Prettier scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue-400), var(--blue-600)); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Home / component refinements ─────────────────────────────── */
/* Icon medallion behind feature-card icons */
.feature-card .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(91,180,245,.20), rgba(45,125,210,.28));
  border: 1px solid rgba(120,190,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px rgba(20,80,160,.18);
  margin-bottom: 6px;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.feature-card:hover .feature-icon { transform: translateY(-3px) scale(1.06) rotate(-3deg); }

/* Feature link arrow slides on hover */
.feature-link { display: inline-flex; align-items: center; gap: 6px; transition: gap .25s ease, color .2s ease; }
.feature-card:hover .feature-link { gap: 11px; }

/* Chips: subtle hover glow + lift */
.chip { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(20,80,160,.18); }
.chip-dot { box-shadow: 0 0 0 3px rgba(255,255,255,.06); animation: chipPulse 2.4s ease-in-out infinite; }
@keyframes chipPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* Badge pill (Early Access) — soft glow */
.badge-pill { box-shadow: 0 4px 14px rgba(20,80,160,.16); }

/* Nav dropdown menu: smoother panel */
.nav-dropdown-menu {
  box-shadow: 0 16px 40px rgba(10,30,70,.28) !important;
  border-radius: 14px !important;
}
.nav-dropdown-item { transition: background .18s ease, padding-left .18s ease; }
.nav-dropdown-item:hover { padding-left: 20px; }

/* Discord FAB: gentle idle float */
.discord-fab { animation: fabFloat 4s ease-in-out infinite; }
@keyframes fabFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.discord-fab:hover { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .feature-card:hover .feature-icon, .chip-dot, .discord-fab { animation: none; transform: none; }
}
