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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #262626;
  --border: #2a2a2a;
  --text: #e8e8e8;
  --text-muted: #888888;
  --accent: #d32f2f;
  --accent-glow: rgba(211, 47, 47, 0.3);
  --accent-hover: #e53935;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Black Ops One', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.light-mode {
  --bg: #f2f0ed;
  --surface: #ffffff;
  --surface-2: #f5f3f0;
  --surface-3: #e8e4df;
  --border: #d5d0ca;
  --text: #1a1a1a;
  --text-muted: #6e6e6e;
  --accent: #c62828;
  --accent-glow: rgba(198, 40, 40, 0.15);
  --accent-hover: #b71c1c;
}

/* ── Header ────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(20, 20, 20, 0.9);
}

body.light-mode .header {
  background: rgba(255, 255, 255, 0.9);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.profile-btn:hover {
  color: var(--accent);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  overflow: hidden;
}

.avatar svg {
  width: 26px;
  height: 26px;
}

.profile-btn:hover .avatar {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.profile-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chat-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.chat-icon {
  width: 18px;
  height: 18px;
}

.chat-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #43e97b;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.pulse-dot.off {
  background: var(--text-muted);
  animation: none;
  opacity: 0.4;
}

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

.header-center {
  text-align: center;
  flex: 1;
}

.site-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #d32f2f 0%, #ff6659 50%, #d32f2f 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.quote {
  font-family: 'Black Ops One', serif;
  font-style: italic;
  font-size: 13px;
  color: red;
  margin-top: 4px;
  transition: opacity 0.5s ease;
}

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

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5576c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Main Layout ───────────────────────────────────────── */

/* ── Side Image ─────────────────────────────────────────── */

.side-image {
  position: fixed;
  right: 0;
  top: 85px;
  width: calc((100vw - 1400px) / 2);
  height: calc(100vh - 85px);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
  transition: opacity 0.8s ease;
  z-index: 0;
}

.side-image.fade-out {
  opacity: 0;
}

.side-image.empty {
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-image-add {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  pointer-events: auto;
  z-index: 2;
}

.side-image:hover .side-image-add {
  opacity: 1;
}

.side-image.empty .side-image-add {
  opacity: 1;
  position: static;
  width: 52px;
  height: 52px;
  border-style: dashed;
}

.side-image-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-2);
}

.side-image-clear {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: auto;
  transition: var(--transition);
  z-index: 2;
}

.side-image:hover .side-image-clear {
  opacity: 1;
}

.side-image-clear:hover {
  background: var(--accent);
}

.side-image-count {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.5);
  padding: 3px 10px;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition);
}

.side-image:hover .side-image-count {
  opacity: 1;
}

@media (max-width: 1500px) {
  .side-image { display: none; }
}

.main-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
  min-height: calc(100vh - 85px);
  position: relative;
  z-index: 1;
}

.main-content {
  flex: 1;
  padding: 28px 32px;
  border-right: 1px solid var(--border);
  max-width: calc(100% - 320px);
}

.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.content-header h2 {
  font-size: 22px;
  font-weight: 700;
}

.content-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--border);
}

.tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  color: #fff;
}

/* ── Composer ──────────────────────────────────────────── */

.composer {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.composer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.composer-avatar svg {
  width: 24px;
  height: 24px;
}

.composer-input {
  flex: 1;
}

.composer-input textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: var(--transition);
}

.composer-input textarea::placeholder {
  color: var(--text-muted);
}

.composer-input textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.composer-tools {
  display: flex;
  gap: 4px;
}

.tool-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.tool-btn svg {
  width: 18px;
  height: 18px;
}

.tool-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.post-btn {
  padding: 8px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.post-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Home Feed ─────────────────────────────────────────── */

.home-section {
  margin-bottom: 28px;
}

.home-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.home-section-header:hover {
  opacity: 0.8;
}

.home-section-color {
  width: 6px;
  height: 24px;
  border-radius: 3px;
  flex-shrink: 0;
}

.home-section-header h3 {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
}

.home-section-count {
  font-size: 12px;
  color: var(--text-muted);
  padding: 3px 10px;
  background: var(--surface-2);
  border-radius: 12px;
}

.home-post {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: var(--transition);
  cursor: pointer;
}

.home-post:hover {
  border-color: var(--surface-3);
  background: rgba(26, 26, 36, 0.9);
  transform: translateX(2px);
}

.home-post-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.home-post-body {
  flex: 1;
  min-width: 0;
}

.home-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.home-post-meta strong {
  font-size: 13px;
}

.home-post-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.home-post-body p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-post-stats {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.home-post-stats span {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-post-stats svg {
  width: 12px;
  height: 12px;
}

/* ── Posts ──────────────────────────────────────────────── */

.post-wrap {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.post-wrap:hover {
  border-color: var(--surface-3);
}

.post {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  transition: var(--transition);
}

.post:hover {
  background: rgba(26, 26, 36, 0.9);
}

.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

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

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.post-meta strong {
  font-size: 14px;
}

.post-time {
  font-size: 12px;
  color: var(--text-muted);
}

.post-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.9;
}

.post-actions {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.action-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.reply-toggle-btn.has-replies {
  color: var(--accent);
}

/* ── Replies ───────────────────────────────────────────── */

.post-replies {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 14px 20px 14px 76px;
}

.replies-list {
  max-height: 300px;
  overflow-y: auto;
}

.reply {
  display: flex;
  gap: 10px;
  padding: 10px 0;
}

.reply + .reply {
  border-top: 1px solid var(--border);
}

.reply-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
}

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

.reply-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.reply-meta strong {
  font-size: 12px;
}

.reply-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.reply-body p {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.9;
}

.reply-input-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.reply-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: var(--transition);
}

.reply-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.reply-input::placeholder {
  color: var(--text-muted);
}

.reply-send-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.reply-send-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── Empty States ──────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.empty-icon svg {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
}

.empty-state-sm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state-sm svg {
  width: 28px;
  height: 28px;
  opacity: 0.5;
}

.empty-state-sm p {
  font-size: 13px;
}

.empty-state-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state-panel svg {
  width: 36px;
  height: 36px;
  opacity: 0.4;
}

.empty-state-panel p {
  font-size: 14px;
  font-weight: 500;
}

.empty-state-panel span {
  font-size: 12px;
  opacity: 0.7;
}

/* ── Sidebar ───────────────────────────────────────────── */

.sidebar {
  width: 320px;
  padding: 28px 24px;
  flex-shrink: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.icon-btn-sm svg {
  width: 16px;
  height: 16px;
}

.icon-btn-sm:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

.board-view-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.back-btn:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.board-view-color {
  width: 10px;
  height: 28px;
  border-radius: 4px;
  flex-shrink: 0;
}

.board-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.board-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
  transform: translateX(-2px);
}

.board-color {
  width: 8px;
  height: 40px;
  border-radius: 4px;
  flex-shrink: 0;
}

.board-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.board-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-section {
  margin-top: 28px;
}

.sidebar-section h3 {
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

/* ── Slide Panels (shared) ─────────────────────────────── */

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.panel-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
}

.slide-panel.open {
  right: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.panel-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.panel-close-btn {
  margin-left: auto;
}

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

/* ── Discord-style Chat Page ───────────────────────────── */

.chat-page {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  background: var(--bg);
}

.ch-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ch-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
}

.ch-sidebar-header h3 {
  font-size: 16px;
}

.ch-category {
  padding: 16px 8px 8px;
}

.ch-category-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 8px 8px;
}

.ch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.ch-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ch-item.active {
  background: var(--surface-3);
  color: var(--text);
}

.ch-hash {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.6;
}

.ch-voice svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.ch-dm-new {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.ch-dm-new:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ch-dm-new svg {
  opacity: 0.6;
}

.ch-dm-input-wrap {
  padding: 4px 8px 8px;
}

.ch-dm-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: var(--transition);
}

.ch-dm-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.ch-dm-input::placeholder {
  color: var(--text-muted);
}

.ch-dm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  font-size: 13px;
}

.ch-dm-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.ch-dm-item.active {
  background: var(--surface-3);
  color: var(--text);
}

.ch-dm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.ch-dm-item .ch-dm-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.ch-user-bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
}

.ch-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ch-user-avatar svg {
  width: 20px;
  height: 20px;
}

.ch-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-user-info strong {
  font-size: 13px;
}

.ch-user-info span {
  font-size: 11px;
  color: #43e97b;
}

.ch-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}

.ch-topbar h3 {
  font-size: 16px;
  font-weight: 700;
}

.ch-topbar-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.ch-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.ch-welcome {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.ch-welcome-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.ch-welcome h2 {
  font-size: 24px;
  font-weight: 700;
}

.ch-welcome p {
  font-size: 14px;
  color: var(--text-muted);
}

.ch-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px 20px;
  flex-shrink: 0;
}

.ch-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.ch-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.ch-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.send-btn svg {
  width: 16px;
  height: 16px;
}

.send-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.ch-members {
  width: 240px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 16px 12px;
  overflow-y: auto;
  flex-shrink: 0;
}

.ch-members-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 8px 12px;
}

.ch-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.ch-member:hover {
  background: var(--surface-2);
}

.ch-member.offline {
  opacity: 0.4;
}

.ch-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.ch-member-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ch-member-info strong {
  font-size: 13px;
}

.ch-member-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.ch-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--surface-3);
}

.ch-status.online {
  background: #43e97b;
}

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 0;
}

.chat-msg:hover {
  background: var(--surface-2);
  margin: 0 -16px;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
}

.chat-msg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

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

.chat-msg-header strong {
  font-size: 14px;
}

.chat-msg-header .chat-msg-time {
  font-size: 11px;
  color: var(--text-muted);
}

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

.chat-msg p {
  font-size: 14px;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.5;
}

.chat-msg-body p + p {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .ch-members { display: none; }
  .ch-sidebar { width: 200px; }
}

@media (max-width: 600px) {
  .ch-sidebar { display: none; }
}

/* ── Profile Panel ─────────────────────────────────────── */

.profile-banner-upload {
  width: 100%;
  height: 120px;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  margin-bottom: 20px;
  transition: var(--transition);
}

.profile-banner-upload:hover {
  border-color: var(--accent);
}

.profile-banner-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12px;
  background-size: cover;
  background-position: center;
}

.profile-banner-preview.has-image {
  color: transparent;
}

.profile-banner-preview.has-image svg {
  display: none;
}

.profile-media-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.profile-media-remove:hover {
  background: var(--accent);
}

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.profile-avatar-lg svg {
  width: 44px;
  height: 44px;
}

.profile-avatar-lg:hover {
  border-color: var(--accent);
}

.profile-avatar-lg.has-image > svg {
  display: none;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-avatar-lg:hover .profile-avatar-overlay {
  opacity: 1;
}

.upload-avatar-btn {
  padding: 6px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.upload-avatar-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--accent);
}

.profile-remove-link {
  margin-top: 4px;
  border: none;
  background: none;
  color: #f5576c;
  font-size: 11px;
}

.profile-remove-link:hover {
  background: none;
  color: #ff7b8a;
  border-color: transparent;
}

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

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.profile-stats {
  display: flex;
  gap: 4px;
  margin: 20px 0;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Anthem Upload (Settings Panel) ────────────────────── */

.anthem-upload {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.anthem-upload:hover {
  border-color: var(--accent);
}

.anthem-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--text-muted);
  font-size: 12px;
}

.anthem-empty svg {
  flex-shrink: 0;
  opacity: 0.5;
}

.anthem-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(211,47,47,0.1), rgba(211,47,47,0.03));
}

.anthem-play-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.anthem-play-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.anthem-info {
  flex: 1;
  min-width: 0;
}

.anthem-info strong {
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anthem-bar {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.anthem-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s linear;
}

.anthem-remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.anthem-remove:hover {
  border-color: #f5576c;
  color: #f5576c;
  background: rgba(245,87,108,0.1);
}

/* ── Anthem (Profile Page) ────────────────────────────── */

.pp-anthem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 40px;
  background: linear-gradient(135deg, rgba(211,47,47,0.08), rgba(211,47,47,0.02));
  border-bottom: 1px solid var(--border);
}

.pp-anthem-icon {
  color: var(--accent);
  flex-shrink: 0;
  animation: anthemPulse 2s ease-in-out infinite;
}

@keyframes anthemPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.pp-anthem strong {
  font-size: 13px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pp-anthem-play {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.pp-anthem-play:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.pp-anthem-bar {
  width: 120px;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.pp-anthem-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s linear;
}

.save-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.save-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.save-btn.saved {
  background: #2ecc71;
}

/* ── Notifications Panel ───────────────────────────────── */

.text-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.text-btn:hover {
  background: var(--accent-glow);
}

.notif-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
}

.notif-tab {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.notif-tab:hover {
  color: var(--text);
}

.notif-tab.active {
  background: var(--accent);
  color: #fff;
}

/* ── About Panel ───────────────────────────────────────── */

.about-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.about-symbol {
  font-size: 42px;
  color: var(--accent);
}

.about-logo h2 {
  font-size: 22px;
  font-weight: 800;
}

.about-version {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 12px;
}

.about-section {
  margin-bottom: 24px;
}

.about-section h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.about-section p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  opacity: 0.85;
}

.about-list {
  list-style: none;
  padding: 0;
}

.about-list li {
  font-size: 13px;
  color: var(--text);
  opacity: 0.85;
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tag {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
}

.about-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.about-footer p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Settings Panel ────────────────────────────────────── */

.settings-group {
  margin-bottom: 28px;
}

.settings-group h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--border);
}

.setting-info {
  flex: 1;
  min-width: 0;
}

.setting-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.setting-desc {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 12px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-3);
  border-radius: 24px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  background: #fff;
  transform: translateX(20px);
}

.setting-row-col {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.setting-key-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.setting-key-input {
  flex: 1;
  padding: 9px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: monospace;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.setting-key-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.setting-key-input::placeholder {
  color: var(--text-muted);
  font-family: monospace;
}

.setting-key-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.setting-key-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.setting-key-save {
  padding: 0 16px;
  height: 36px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.setting-key-save:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.setting-key-status {
  font-size: 12px;
  min-height: 16px;
}

.setting-key-status.success {
  color: #43e97b;
}

.setting-key-status.error {
  color: #f5576c;
}

.settings-action-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  margin-bottom: 6px;
}

.settings-action-btn:hover {
  background: var(--surface-3);
  border-color: var(--accent);
}

.settings-action-btn.danger {
  color: #f5576c;
  border-color: rgba(245, 87, 108, 0.2);
}

.settings-action-btn.danger:hover {
  background: rgba(245, 87, 108, 0.1);
  border-color: #f5576c;
}

/* ── Responsive ────────────────────────────────────────── */

@media (max-width: 900px) {
  .header {
    padding: 12px 16px;
  }

  .site-title {
    font-size: 20px;
  }

  .quote {
    display: none;
  }

  .main-layout {
    flex-direction: column;
  }

  .main-content {
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 20px 16px;
  }

  .sidebar {
    width: 100%;
    padding: 20px 16px;
  }

  .header-right {
    display: none;
  }
}

@media (max-width: 600px) {
  .profile-label {
    display: none;
  }

  .chat-count {
    display: none;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .slide-panel {
    width: 100%;
    right: -100%;
  }
}

/* ── Login Screen ──────────────────────────────────────── */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(211, 47, 47, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 102, 89, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(211, 47, 47, 0.06) 0%, transparent 50%);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  margin: 16px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #d32f2f 0%, #ff6659 50%, #d32f2f 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

.login-symbol {
  font-size: 48px;
  margin-bottom: 8px;
  line-height: 1;
}

.login-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-form .form-group {
  margin-bottom: 14px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
}

.login-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.guest-btn {
  width: 100%;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.guest-btn:hover {
  background: var(--surface-3);
  border-color: var(--text-muted);
}

.guest-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.login-footer a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.login-sep {
  color: var(--text-muted);
  margin: 0 6px;
}

.login-footer-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-right: 4px;
}

/* ── Signup Card ───────────────────────────────────────── */

.signup-card {
  display: none;
  max-width: 440px;
}

.signup-card.active {
  display: block;
  animation: cardIn 0.35s ease;
}

.login-card.hiding {
  animation: cardOut 0.25s ease forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(-12px) scale(0.97); }
}

.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.input-prefix-wrap input {
  padding-left: 30px;
}

.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s ease, background 0.3s ease;
}

.strength-fill.weak     { width: 25%;  background: #f5576c; }
.strength-fill.fair     { width: 50%;  background: #fa709a; }
.strength-fill.good     { width: 75%;  background: #fee140; }
.strength-fill.strong   { width: 100%; background: #43e97b; }

.strength-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 42px;
}

.field-error {
  display: block;
  font-size: 11px;
  color: #f5576c;
  margin-top: 6px;
  min-height: 16px;
}

.auth-error {
  font-size: 12px;
  font-weight: 500;
  min-height: 18px;
  margin-bottom: 4px;
}

.checkbox-group {
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: var(--transition);
  margin-top: 1px;
}

.checkbox-label input:checked ~ .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-label input:checked ~ .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label a {
  color: var(--accent);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Guest Banner ──────────────────────────────────────── */

.guest-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.12), rgba(255, 102, 89, 0.08));
  border-bottom: 1px solid rgba(211, 47, 47, 0.25);
  font-size: 13px;
  color: var(--text);
}

.guest-banner.visible {
  display: flex;
}

.guest-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-banner-content strong {
  color: var(--accent);
}

.guest-banner-login {
  padding: 6px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.guest-banner-login:hover {
  background: var(--accent-hover);
}

/* ── Now Playing Bar ───────────────────────────────────── */

.now-playing {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(211,47,47,0.15), rgba(211,47,47,0.05));
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.now-playing-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--surface-3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.now-playing-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.now-playing-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.now-playing-info strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-user {
  font-size: 11px;
  color: var(--text-muted);
}

.now-playing-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.np-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.np-btn:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.np-volume {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.np-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.now-playing-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.05);
}

.np-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  width: 0%;
  transition: width 1s linear;
}

/* System Messages in Chat */

.chat-system-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  margin: 8px 0;
  background: linear-gradient(135deg, rgba(211,47,47,0.1), rgba(211,47,47,0.03));
  border: 1px solid rgba(211,47,47,0.15);
  border-radius: var(--radius);
}

.chat-system-msg svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.chat-system-msg-text {
  font-size: 13px;
  color: var(--text-muted);
}

.chat-system-msg-text strong {
  color: var(--text);
}

/* ── Profile Page ──────────────────────────────────────── */

.profile-page {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  overflow-y: auto;
  background-size: cover;
  background-position: center;
}

.profile-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(10,10,10,0.85) 35%, var(--bg) 65%);
  z-index: 0;
  pointer-events: none;
}

.profile-page > * {
  position: relative;
  z-index: 1;
}

.pp-banner {
  height: 200px;
  position: relative;
}

.pp-back-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  z-index: 2;
}

.pp-back-btn:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}

.pp-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 40px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.pp-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 5px solid var(--bg);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 48px;
  font-weight: 700;
  overflow: hidden;
}

.pp-avatar svg {
  width: 60px;
  height: 60px;
}

.pp-avatar-letter {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
}

.pp-info {
  padding-top: 14px;
  min-width: 0;
}

.pp-info h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
}

.pp-username {
  display: block;
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 2px;
}

.pp-bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  opacity: 0.85;
  margin-top: 12px;
  max-width: 520px;
}

.pp-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.pp-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.pp-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-shrink: 0;
}

.pp-follow-btn {
  padding: 10px 28px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pp-follow-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.pp-follow-btn.following {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.pp-follow-btn.following:hover {
  border-color: #f5576c;
  color: #f5576c;
  background: rgba(245,87,108,0.1);
  box-shadow: none;
}

.pp-msg-btn {
  padding: 10px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pp-msg-btn:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.pp-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px 40px;
  border-bottom: 1px solid var(--border);
}

.pp-stat {
  font-size: 14px;
  color: var(--text-muted);
}

.pp-stat strong {
  color: var(--text);
  font-weight: 700;
  margin-right: 4px;
}

.pp-tabs {
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
}

.pp-tab {
  padding: 14px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.pp-tab:hover {
  color: var(--text);
}

.pp-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.pp-content {
  padding: 24px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.pp-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.pp-post {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: var(--transition);
}

.pp-post:hover {
  border-color: var(--surface-3);
}

.pp-post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

.pp-post-body {
  flex: 1;
  min-width: 0;
}

.pp-post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.pp-post-meta strong {
  font-size: 14px;
}

.pp-post-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

.pp-post-body p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

@media (max-width: 700px) {
  .pp-header { padding: 0 20px; }
  .pp-stats { padding: 20px; }
  .pp-tabs { padding: 0 20px; }
  .pp-content { padding: 20px; }
}

/* ── Reels Page ────────────────────────────────────────── */

.reels-page {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reels-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.reels-topbar h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.reels-topbar .back-btn {
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.reels-topbar .back-btn:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
}

.reels-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.reel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.reel.active {
  transform: translateY(0);
  opacity: 1;
}

.reel.above {
  transform: translateY(-100%);
  opacity: 0;
}

.reel.below {
  transform: translateY(100%);
  opacity: 0;
}

.reel-card {
  width: 400px;
  height: 85vh;
  max-height: 750px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}

.reel-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
}

.reel-text {
  font-size: 16px;
  color: #fff;
  line-height: 1.5;
  max-width: 280px;
}

.reel-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.reel-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  border: 2px solid #fff;
}

.reel-user strong {
  font-size: 14px;
  color: #fff;
}

.reel-user span {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.reel-caption {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  line-height: 1.5;
  margin-bottom: 8px;
}

.reel-sound {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.reel-sound svg {
  width: 14px;
  height: 14px;
}

.reel-actions {
  position: absolute;
  right: 16px;
  bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.reel-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.reel-action:hover {
  transform: scale(1.15);
}

.reel-action svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.reel-action span {
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.reel-action.liked svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}

.reel-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reel-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 120px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
}

.reel-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  display: flex;
  gap: 4px;
  padding: 60px 16px 0;
  z-index: 11;
}

.reel-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
}

.reel-progress-bar.viewed {
  background: #fff;
}

.reel-progress-bar.current .reel-progress-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  animation: reelTimer 8s linear forwards;
}

@keyframes reelTimer {
  from { width: 0; }
  to { width: 100%; }
}

.reels-nav {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.reels-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.reels-nav-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.reels-nav-btn svg {
  width: 22px;
  height: 22px;
}

/* Upload Button in Topbar */

.reels-upload-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.reels-upload-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.reels-upload-btn svg {
  width: 18px;
  height: 18px;
}

/* Upload Modal */

.reel-upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.reel-upload-modal {
  width: 480px;
  max-height: 90vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.reel-upload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.reel-upload-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.reel-upload-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reel-upload-media {
  width: 100%;
  aspect-ratio: 9/10;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.reel-upload-media:hover {
  border-color: var(--accent);
}

.reel-drop-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.reel-drop-placeholder svg {
  opacity: 0.5;
}

.reel-drop-placeholder p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.reel-drop-placeholder span {
  font-size: 12px;
}

.reel-drop-preview {
  position: absolute;
  inset: 0;
}

.reel-drop-preview video,
.reel-drop-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.reel-remove-media {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.reel-remove-media:hover {
  background: var(--accent);
}

.reel-upload-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reel-upload-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.reel-field-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

.reel-upload-field textarea,
.reel-upload-input {
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
  transition: var(--transition);
}

.reel-upload-field textarea:focus,
.reel-upload-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.reel-char-count {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
}

.reel-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reel-emoji-opt {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface-2);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.reel-emoji-opt:hover {
  border-color: var(--text-muted);
}

.reel-emoji-opt.selected {
  border-color: var(--accent);
  background: rgba(211,47,47,0.15);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.reel-bg-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reel-bg-opt {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.reel-bg-opt:hover {
  border-color: var(--text-muted);
  transform: scale(1.08);
}

.reel-bg-opt.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(0,0,0,0.3);
  transform: scale(1.08);
}

.reel-upload-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.reel-upload-cancel {
  padding: 10px 20px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.reel-upload-cancel:hover {
  background: var(--surface-2);
  border-color: var(--text-muted);
}

.reel-upload-submit {
  padding: 10px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.reel-upload-submit:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}

@media (max-width: 500px) {
  .reel-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .reels-nav { display: none; }
  .reel-upload-modal {
    width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* ── Guest Mode Locks ──────────────────────────────────── */

body.guest-mode .composer {
  position: relative;
  pointer-events: none;
  opacity: 0.45;
}

body.guest-mode .composer::after {
  content: 'Sign in to post';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

body.guest-mode .ch-input-area {
  position: relative;
  pointer-events: none;
  opacity: 0.45;
}

body.guest-mode .ch-input-area::after {
  content: 'Sign in to chat';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

body.guest-mode .action-btn,
body.guest-mode .post-btn,
body.guest-mode .send-btn,
body.guest-mode .tool-btn {
  pointer-events: none;
  opacity: 0.35;
}

body.guest-mode .upload-avatar-btn,
body.guest-mode .save-btn,
body.guest-mode #saveProfileBtn {
  pointer-events: none;
  opacity: 0.35;
}

body.guest-mode .profile-panel .form-group input,
body.guest-mode .profile-panel .form-group textarea,
body.guest-mode #profilePanel .form-group input,
body.guest-mode #profilePanel .form-group textarea {
  pointer-events: none;
  opacity: 0.5;
}

body.guest-mode .settings-action-btn {
  pointer-events: none;
  opacity: 0.35;
}

/* ── Scrollbar ─────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
