/* ============================================================
   TealRiot — MVP Frontend Styles
   Dark theme, teal accent, matching logo palette
   ============================================================ */

:root {
  --bg-darkest: #020204;
  --bg-dark: #060610;
  --bg-card: #050509;
  --bg-input: #050509;
  --bg: #020204;
  --nav-bg: #040408;
  --bg-darker: #010102;
  --teal: #5dcaa5;
  --teal-dim: #4ab890;
  --teal-dark: #3a9a78;
  --teal-soft: #7ddcb8;
  --teal-glow: 0 0 14px rgba(93,202,165,0.3);
  --purple: #c48de8;
  --purple-dim: #a06bc8;
  --purple-soft: #d4a8f0;
  --purple-glow: 0 0 14px rgba(196,141,232,0.3);
  --blue: #5dcaa5;
  --blue-dim: #00a8cc;
  --blue-soft: #33e0ff;
  --text: #e0d0f0;
  --text-dim: #a890c0;
  --text-muted: #6a5888;
  --text-very-muted: #3a2e50;
  --border: #0e0e20;
  --border-hover: #141430;
  --danger: #ff4757;
  --radius: 16px;
  --radius-sm: 12px;
  --max-width: 100%;
  --header-h: 53px;
  --left-nav-w: 260px;
  --right-sidebar-w: 350px;
}

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

body {
  background: var(--bg-darkest);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

input, textarea {
  font-family: inherit;
  outline: none;
}

/* ============================================================
   Auth Screen
   ============================================================ */

.auth-screen {
  display: none;
}

.auth-screen.active {
  display: block;
  padding: 60px 20px 0;
}

.auth-screen.active .auth-card {
  margin: 0 auto;
}

/* Anti-flash: if token detected, hide auth screen before JS loads */
html.tr-authed .auth-screen { display: none !important; }

/* Force auth screen to show when active (override anti-flash) */
html.tr-authed .auth-screen.active { display: block !important; }

.auth-card {
  background: rgba(6, 6, 12, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.auth-card .logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin: 0 auto 20px;
  display: block;
}

.auth-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--blue-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.auth-card .tagline {
  color: var(--teal-soft);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  background: transparent;
  color: var(--text-dim);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.auth-tabs button.active {
  background: var(--bg-darkest);
  color: var(--teal);
  border: 1.5px solid var(--teal);
}

.auth-field {
  margin-bottom: 16px;
  text-align: left;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.auth-field input:focus {
  border-color: var(--text);
}

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

.btn-primary {
  width: 100%;
  padding: 13px;
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 8px;
  transition: all 0.2s;
}

.btn-primary:hover { box-shadow: 0 0 14px rgba(196,141,232,0.25); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-nucleus {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-nucleus:hover {
  border-color: var(--teal-dim);
  background: rgba(196, 141, 232, 0.06);
}

.nav-ecosystem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.15s;
}

.nav-ecosystem:hover {
  background: rgba(196, 141, 232, 0.1);
  color: var(--text);
}

/* Topbar search bar */
.search-bar {
  flex: 1;
  max-width: 420px;
  margin: 0 16px;
  position: relative;
}

.search-bar input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 2px rgba(196, 141, 232, 0.08);
}

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

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 500;
  max-height: 400px;
  overflow-y: auto;
}

.search-group {
  padding: 8px 14px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.1s;
}

.search-result:hover {
  background: rgba(196, 141, 232, 0.06);
}

.search-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .search-bar { max-width: none; margin: 0 8px; }
  .search-bar input { height: 38px; font-size: 0.85rem; }
}

/* ============================================================
   App Shell
   ============================================================ */

.app-shell {
  display: none;
}

.app-shell.active {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(2, 2, 4, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.main-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
  gap: 0;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

.topbar .brand span {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text);
}

.topbar .nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar .nav button {
  background: transparent;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.topbar .nav button:hover,
.topbar .nav button.active {
  background: rgba(196, 141, 232, 0.1);
  color: var(--text);
}

.topbar .nav .logout-btn {
  color: var(--text-muted);
}

/* ============================================================
   Left Navigation (persistent sidebar)
   ============================================================ */

.left-nav {
  background: var(--bg-darkest);
  border-right: 1px solid var(--border);
  padding: 12px;
  position: fixed;
  left: 0;
  top: var(--header-h);
  width: var(--left-nav-w);
  min-width: var(--left-nav-w);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  z-index: 90;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.left-nav::-webkit-scrollbar {
  display: none;
}

.left-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--text-dim);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 2px;
  text-decoration: none;
  background: rgba(6, 6, 12, 0.5);
  border: 1px solid transparent;
}

.left-nav-item:hover {
  background: rgba(196, 141, 232, 0.06);
  color: var(--text);
  border-color: rgba(196, 141, 232, 0.1);
}

.left-nav-item.active {
  background: rgba(196, 141, 232, 0.08);
  color: var(--purple);
  border-color: rgba(196, 141, 232, 0.15);
}

.left-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.left-nav-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.left-nav-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.left-nav-label {
  font-size: 11px;
  color: var(--purple-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px;
  margin-bottom: 8px;
  margin-top: 4px;
  font-weight: 700;
}

.left-nav .genre-filter {
  font-size: 12px;
  padding: 6px 10px;
  color: var(--purple-soft);
}

.left-nav .genre-filter:hover {
  color: var(--purple);
}

/* ============================================================
   Right Sidebar (persistent)
   ============================================================ */

.right-sidebar {
  background: var(--bg-darkest);
  border-left: 1px solid var(--border);
  padding: 16px;
  position: fixed;
  right: 0;
  top: var(--header-h);
  width: var(--right-sidebar-w);
  min-width: var(--right-sidebar-w);
  height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 90;
  overflow-y: auto;
}

/* ============================================================
   Composer
   ============================================================ */

.composer {
  background: rgba(4, 4, 8, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.composer textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  resize: none;
  min-height: 80px;
  line-height: 1.6;
}

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

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-very-muted);
}

.char-counter.warn { color: #ffa502; }
.char-counter.danger { color: var(--danger); }

.composer .btn-post {
  padding: 8px 24px;
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.15s;
  flex-shrink: 0;
}

.composer .btn-post:hover {
  box-shadow: 0 0 14px rgba(93,202,165,0.25);
}

.composer .btn-post:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Composer Tools — Image Upload + GIF Search
   ============================================================ */

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

.tool-btn {
  background: transparent;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.15s;
  opacity: 0.5;
}

.tool-btn:hover {
  opacity: 1;
  color: var(--purple);
}

.tool-btn img,
.tool-btn svg {
  filter: brightness(0.7) saturate(0.5);
  opacity: 0.7;
}

.tool-btn:hover img,
.tool-btn:hover svg {
  filter: brightness(1) saturate(1);
  opacity: 1;
}
  position: relative;
}

.tool-btn:hover {
  background: rgba(196, 141, 232, 0.08);
  color: var(--text);
}

/* Image preview in composer */
.composer-preview {
  margin: 12px 0 0;
}

.preview-wrap {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-wrap img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  display: block;
}

.preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-remove:hover {
  background: var(--danger);
}

/* Post images */
.post-image {
  margin-top: 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.post-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: block;
}

/* ============================================================
   Notifications + Mention Dropdown
   ============================================================ */

.nav-notif {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  border-left: 3px solid transparent;
}

.notif-item:hover {
  background: rgba(196, 141, 232, 0.04);
}

.notif-item.notif-unread {
  background: rgba(196, 141, 232, 0.06);
  border-left-color: var(--text);
}

.notif-item.notif-unread .notif-text strong {
  color: var(--purple);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-text {
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.notif-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.notif-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(196, 141, 232, 0.08);
}

.notif-section-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 12px 16px 6px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

/* Mention dropdown */
.mention-dropdown {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  max-height: 240px;
  overflow-y: auto;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.mention-item:hover {
  background: rgba(196, 141, 232, 0.1);
}

/* ============================================================
   GIF Picker
   ============================================================ */

.gif-picker {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.gif-picker-header {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.gif-picker-header input {
  flex: 1;
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.9rem;
}

.gif-picker-header input:focus {
  border-color: var(--text);
}

.gif-close {
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
}

.gif-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.gif-item {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-input);
  transition: transform 0.1s;
}

.gif-item:hover {
  transform: scale(0.96);
}

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

@media (max-width: 600px) {
  .gif-results { grid-template-columns: repeat(2, 1fr); }
}

.feed-search-bar {
  position: relative;
  margin-bottom: 16px;
}

.feed-search-bar input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feed-search-bar input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(196, 141, 232, 0.08);
}

.feed-search-bar input::placeholder {
  color: var(--text-muted);
}

.feed-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.feed-tabs button {
  background: transparent;
  color: var(--text-dim);
  padding: 14px 20px;
  font-weight: 700;
  font-size: 14px;
  position: relative;
  transition: color 0.15s;
}

.feed-tabs button.active {
  color: var(--text);
}

.feed-tabs button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--purple);
  border-radius: 3px;
}

/* ============================================================
   Post Card
   ============================================================ */

.post-card {
  background: transparent;
  border: 1px solid var(--border);
  border-bottom-color: var(--border);
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  padding: 16px 20px;
  margin-bottom: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 8px rgba(0,229,208,0.06);
}

.post-pinned-indicator {
  font-size: 0.72rem;
  color: var(--purple);
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-pinned-indicator svg {
  filter: none;
}

.btn-pin {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.btn-pin:hover {
  opacity: 1;
}

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

.post-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

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

/* Universal avatar image sizing — applies everywhere a .avatar appears
   (notifications, DM conversations, search, mentions), not just .post-header.
   Without this, images render at native size outside the post feed. */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Same fix for .avatar-lg — the edit-profile upload preview lives OUTSIDE
   .profile-header, so the scoped rule above doesn't catch it and the preview
   image rendered at native size. */
.avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.post-header .meta .name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
}

.post-header .meta .handle {
  color: var(--teal);
  font-size: 0.85rem;
}

.clickable {
  cursor: pointer;
  transition: color 0.15s;
}

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

.post-header .time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.post-body {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--text);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.post-body .hashtag {
  color: var(--blue);
  cursor: pointer;
}

.post-body .mention {
  color: var(--blue);
  cursor: pointer;
}

/* Mention links also appear in profile bios — same accent as posts */
.profile-header .bio .mention,
.bio .mention {
  color: var(--blue);
  cursor: pointer;
}

.post-actions {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  padding-top: 10px;
}

.post-actions button {
  background: transparent;
  color: var(--purple-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s;
}

.post-actions button:hover {
  background: rgba(196, 141, 232, 0.08);
  color: var(--purple);
}

.post-actions button.liked {
  color: var(--text);
}

.post-actions button.btn-repost.reposted {
  color: var(--text);
}

.post-actions button.btn-delete {
  margin-left: auto;
  opacity: 0.5;
}

.post-actions button.btn-delete:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  opacity: 1;
}

/* Report buttons — subtle by default, red on hover (mirrors btn-delete). */
.post-actions button.btn-report,
.post-actions button.btn-report-reply {
  opacity: 0.5;
}

.post-actions button.btn-report:hover,
.post-actions button.btn-report-reply:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  opacity: 1;
}

.post-actions .icon {
  font-size: 1.1rem;
}

/* ============================================================
   Inline Thread Preview (inside feed cards)
   ============================================================ */

.thread-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.thread-preview-reply {
  display: flex;
  gap: 8px;
  padding: 4px 0;
}

.thread-preview-reply:not(:last-child) {
  margin-bottom: 4px;
}

.thread-preview-body {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text);
  word-wrap: break-word;
}

.thread-preview-name {
  font-weight: 700;
  margin-right: 4px;
  color: var(--purple);
}

.thread-preview-text {
  white-space: pre-wrap;
}

.thread-preview-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.btn-view-thread {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-view-thread:hover {
  background: rgba(196, 141, 232, 0.06);
}

/* ============================================================
   Profile View
   ============================================================ */

.profile-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
}

.profile-header .avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: var(--purple-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
}

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

.profile-header .display-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}

.profile-header .handle {
  color: var(--teal);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.profile-header .bio {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.profile-header .stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 16px;
}

.profile-header .stats .stat {
  text-align: center;
}

.profile-header .stats .stat .num {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
}

.profile-header .stats .stat .label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.profile-header .btn-follow {
  margin-top: 16px;
  padding: 10px 32px;
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.profile-header .btn-follow:hover {
  box-shadow: 0 0 14px rgba(93,202,165,0.25);
}

.profile-header .btn-follow.following {
  background: transparent;
  border: 1.5px solid var(--purple-dim);
  color: var(--text);
}

/* Profile corner actions — top-right of profile card */
.profile-corner-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.corner-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(196, 141, 232, 0.3);
  background: transparent;
  color: var(--purple);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.corner-action-btn:hover {
  background: rgba(196, 141, 232, 0.08);
  color: var(--text);
  border-color: var(--purple-dim);
}

.corner-action-btn.corner-action-nuke {
  color: var(--danger);
  border-color: rgba(255, 71, 87, 0.3);
  font-size: 16px;
  font-weight: 700;
}

.corner-action-btn.corner-action-nuke:hover {
  background: rgba(255, 71, 87, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.corner-action-btn.corner-action-report {
  color: var(--purple);
  border-color: rgba(196, 141, 232, 0.3);
}

.corner-action-btn.corner-action-report:hover {
  background: rgba(196, 141, 232, 0.1);
  border-color: var(--purple);
  color: var(--purple);
}

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

/* Artist badge — shown next to display name for account_type='artist' */
.artist-badge {
  display: inline-block;
  background: rgba(180, 122, 204, 0.12);
  color: var(--purple);
  border: 1px solid var(--purple-dim);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 4px;
}

/* Profile links — chips under the bio */
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 12px;
}

.profile-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1px solid rgba(196, 141, 232, 0.3);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  letter-spacing: 0.5px;
}

.profile-link-chip::before {
  content: '≡';
  font-size: 1rem;
  margin-right: 4px;
  line-height: 1;
}

.profile-link-chip:hover {
  color: var(--purple);
  background: rgba(196, 141, 232, 0.08);
  border-color: var(--purple);
}

/* ============================================================
   Artist Stats Block (metadata only — no content surveillance)
   ============================================================ */

.artist-stats-block {
  margin-top: 16px;
}

.chart-peak-badge {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: #ffdf6b;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.artist-stats-row {
  display: flex;
  justify-content: space-around;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  margin-bottom: 12px;
}

.artist-stat {
  text-align: center;
  flex: 1;
}

.artist-stat .num {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.artist-stat .label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Releases list */
.artist-releases {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color 0.15s;
}

.release-card:hover {
  border-color: var(--border-hover);
}

.release-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--purple-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}

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

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

.release-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-genre {
  font-size: 0.75rem;
  color: var(--purple-soft);
}

.release-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.track-play-btn {
  background: var(--teal);
  color: var(--purple);
  border: 1px solid var(--teal);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.track-play-btn:hover {
  background: var(--teal);
  color: var(--bg-darkest);
}

/* Verified badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #ffffff;
  color: #000000;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 900;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

.verified-badge.admin-badge {
  background: var(--purple);
  color: var(--bg-darkest);
}

/* ============================================================
   Utility
   ============================================================ */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-dim);
}

/* Skeleton loaders — animated placeholders */
.skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-input) 0%, rgba(0,229,204,0.08) 50%, var(--bg-input) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }

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

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--bg-input) 0%, rgba(0,229,204,0.08) 50%, var(--bg-input) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  flex-shrink: 0;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Fade-in animations */
.fade-in { animation: fadeInUp 0.3s ease-out; }

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

.slide-in-top { animation: slideInTop 0.4s ease-out; }

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

.slide-in-bottom { animation: slideInBottom 0.3s ease-out; }

@keyframes slideInBottom {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============================================================
   Profile Editing / Settings
   ============================================================ */

.edit-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  max-width: 600px;
  margin: 0 auto;
}

/* Settings Tabs */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.settings-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

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

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

.settings-panel {
  display: none;
}

.settings-panel.active {
  display: block;
}

.edit-profile-card select,
.edit-profile-card textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

/* CSS Sandbox presets */
.preset-btn {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text-dim);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.preset-btn:hover {
  border-color: var(--teal-dim);
  color: var(--text);
  background: rgba(196, 141, 232, 0.05);
}

/* ============================================================
   Links Editor + Block List (Edit Profile)
   ============================================================ */

.edit-link-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  align-items: center;
}

.edit-link-row .link-platform {
  flex: 0 0 38%;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.edit-link-row .link-url {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.edit-link-row .link-platform:focus,
.edit-link-row .link-url:focus {
  outline: none;
  border-color: var(--teal-dim);
}

.link-remove-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.15s;
}

.link-remove-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 71, 87, 0.1);
}

.edit-block-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.edit-block-row:last-child {
  border-bottom: none;
}

.unblock-btn {
  font-size: 0.75rem;
}

/* ============================================================
   Thread View
   ============================================================ */

.back-btn {
  background: transparent;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.back-btn:hover {
  background: rgba(196, 141, 232, 0.1);
}

.thread-toggle {
  margin-top: 12px;
  margin-bottom: 4px;
}

.thread-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.thread-toggle-btn:hover {
  border-color: var(--purple-dim);
  color: var(--purple);
}

.thread-replies {
  margin-top: 8px;
}

.reply-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  margin-top: 8px;
  border-left: 2px solid var(--teal-dark);
}

.reply-card .post-actions button {
  padding: 2px 6px;
  font-size: 0.8rem;
}

/* ============================================================
   DMs (Direct Messages)
   ============================================================ */

.dm-layout {
  display: flex;
  gap: 0;
  width: 100%;
  height: calc(100vh - var(--header-h) - 24px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dm-sidebar {
  width: 240px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.dm-new {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.dm-conversations {
  flex: 1;
  overflow-y: auto;
}

.dm-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(196, 141, 232, 0.05);
}

.dm-conv-item:hover {
  background: rgba(196, 141, 232, 0.05);
}

.dm-conv-item.active {
  background: rgba(196, 141, 232, 0.1);
  border-left: 3px solid var(--teal);
}

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

.dm-conv-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--purple);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-conv-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dm-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-darkest);
}

.dm-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

.dm-empty .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.dm-chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
}

.dm-chat-name {
  font-weight: 700;
  color: var(--purple);
}

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

.dm-msg {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.dm-msg-me {
  align-self: flex-end;
  align-items: flex-end;
}

.dm-msg-them {
  align-self: flex-start;
}

.dm-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.dm-msg-me .dm-msg-bubble {
  background: var(--teal-dark);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.dm-msg-them .dm-msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.dm-msg-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}

.dm-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-dark);
}

.dm-input-bar input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.9rem;
}

.dm-input-bar input:focus {
  border-color: var(--text);
}

.dm-input-bar .btn-post {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  transition: all 0.2s;
}

.dm-input-bar .btn-post:hover {
  box-shadow: 0 0 14px rgba(93,202,165,0.25);
}

.dm-new-form {
  padding: 24px;
  max-width: 360px;
  margin: 0 auto;
  align-self: center;
  width: 100%;
}

/* Mobile DM layout */
@media (max-width: 600px) {
  .dm-layout { flex-direction: column; height: calc(100vh - var(--header-h) - 32px); }
  .dm-sidebar { width: 100%; height: 45%; }
  .dm-chat { height: 55%; }
  .dm-chat-header .back-btn { display: inline-block !important; }
}

.reply-flattened {
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 6px 12px;
  font-style: italic;
}

.inline-reply-composer {
  border: 1px dashed var(--teal-dim) !important;
}

.inline-reply-box {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}

.inline-reply-preview {
  padding: 8px 0;
}

.inline-reply-preview .preview-wrap {
  position: relative;
  display: inline-block;
  max-width: 200px;
}

.inline-reply-preview .preview-wrap img {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
}

.reply-composer-wrap {
  margin-top: 16px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--teal-dim);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 999;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Mobile */
@media (max-width: 600px) {
  .main-content {
    margin-left: 0;
    margin-right: 0;
    padding: 0 0 80px;
  }
  .left-nav { display: none; }
  .right-sidebar { display: none; }
  .topbar .nav button { padding: 8px 10px; font-size: 0.8rem; }
  .auth-card { padding: 28px 20px; }
}

/* ============================================================
   Mobile Bottom Tab Bar
   ============================================================ */

.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 13, 11, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  z-index: 200;
  padding: 6px 0 env(safe-area-inset-bottom, 6px);
  justify-content: space-around;
}

.mobile-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 10px;
  transition: color 0.15s;
}

.mobile-tabbar button.active {
  color: var(--text);
}

.mobile-tabbar .tab-icon {
  font-size: 1.3rem;
}

.mobile-tabbar .tab-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@media (max-width: 600px) {
  .mobile-tabbar { display: flex; }
  .topbar .nav { display: none; }
  .main-content { padding-bottom: 80px; }
}

/* ============================================================
   SVG Icon Styles
   ============================================================ */

.nav-icon {
  width: 22px;
  height: 22px;
  color: var(--text-dim);
  transition: color 0.15s;
}

.nav-notif:hover .nav-icon,
.nav-ecosystem:hover .nav-icon,
.topbar .nav button:hover .nav-icon {
  color: var(--text);
}

.fab-icon {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.post-fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-darkest);
  border: 1.5px solid var(--purple);
  position: fixed;
  bottom: 28px;
  right: calc(var(--right-sidebar-w) + 24px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  cursor: pointer;
}

.fab-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--purple);
  line-height: 1;
}

.post-fab:hover {
  box-shadow: 0 0 14px rgba(93,202,165,0.25);
}

.post-fab:active {
  transform: scale(0.95);
}

.icon-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 50%;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: rgba(196, 141, 232, 0.1);
}

.icon-cover {
  width: 32px;
  height: 32px;
}

.mini-player-close {
  background: transparent;
  border: none;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.15s;
}

.mini-player-close:hover {
  background: rgba(255, 71, 87, 0.1);
}

.mobile-tabbar .tab-icon {
  width: 24px;
  height: 24px;
  color: var(--text-dim);
  transition: color 0.15s;
}

.mobile-tabbar button.active .tab-icon {
  color: var(--text);
}

.mobile-tabbar button:hover .tab-icon {
  color: var(--text);
}

/* Show post-fab only when authenticated (app-shell is active) */
.app-shell.active .post-fab {
  display: flex;
}

@media (max-width: 600px) {
  .post-fab {
    bottom: 88px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .fab-icon { width: 24px; height: 24px; }
}

/* ============================================================
   Unauthenticated Explore Page
   ============================================================ */

.unauth-explore {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.explore-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.explore-section {
  background: transparent;
}

.explore-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.explore-tags {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explore-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s;
}

.explore-tag:hover {
  border-color: var(--border-hover);
}

.explore-rank {
  font-weight: 800;
  color: var(--teal-dim);
  width: 20px;
}

.explore-tag-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.explore-tag-stats {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.explore-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

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

.explore-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  overflow: hidden;
  flex-shrink: 0;
}

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

.explore-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--purple);
}

.explore-handle {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.explore-post-body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 10px;
}

.explore-post-img-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--teal-soft);
  background: rgba(0,229,204,0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.explore-post-stats {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.explore-cta {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
}

.explore-cta-title {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--blue-dim));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.explore-cta-text {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.explore-cta-btn {
  max-width: 280px;
  margin: 0 auto;
}

/* Right sidebar search bar */
.sidebar-search {
  width: 100%;
  position: relative;
}

.sidebar-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 22px;
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sidebar-search input:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 2px rgba(196, 141, 232, 0.08);
}

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

.sidebar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ============================================================
   Feed Layout (center column)
   ============================================================ */

.feed-center {
  flex: 1;
  min-width: 0;
  max-width: 600px;
  padding: 0 16px;
}

.feed-layout {
  display: block;
  max-width: 600px;
  margin: 0 auto;
}

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

.feed-sidebar {
  display: none;
}

.sidebar-card {
  background: rgba(2, 2, 4, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.sidebar-body {
  padding: 8px 0;
}

.sidebar-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
  opacity: 0.85;
  filter: brightness(1.8);
}

.sidebar-empty {
  padding: 16px;
  color: var(--text-dim);
  font-size: 0.82rem;
  text-align: center;
}

/* Trending items */
.trend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.trend-item:hover {
  background: rgba(196, 141, 232, 0.05);
}

.trend-rank {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--teal-dim);
  width: 20px;
  text-align: center;
}

.trend-content {
  flex: 1;
  min-width: 0;
}

.trend-tag {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.trend-item:hover .trend-tag {
  color: var(--text);
}

.trend-stats {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Full-page trending list */
.trending-list-full .trend-item {
  border-bottom: 1px solid var(--border);
}
.trending-list-full .trend-item:last-child {
  border-bottom: none;
}

/* Responsive — hide sidebars on tablet */
@media (max-width: 1024px) {
  .left-nav { display: none; }
  .right-sidebar { display: none; }
  .main-content {
    margin-left: 0;
    margin-right: 0;
  }
}

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

/* ============================================================
   Repost marker + embedded quote card
   ============================================================ */

.repost-marker {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 2px;
}

.quote-card {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal-dim);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.quote-card:hover {
  background: rgba(196, 141, 232, 0.04);
  border-color: var(--teal-dim);
}

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

.quote-header .meta .name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
}

.quote-header .meta .handle {
  font-size: 0.78rem;
}

.quote-card .post-image {
  margin-top: 8px;
}

/* ============================================================
   Compose modal
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 200;
  padding: 5vh 16px;
  backdrop-filter: blur(2px);
}

.compose-modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.15s ease-out;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.compose-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.compose-modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.compose-modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.compose-modal textarea {
  width: 100%;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  min-height: 90px;
}

.compose-modal textarea:focus {
  outline: none;
  border-color: var(--text);
}

.compose-modal .composer-footer {
  margin-top: 10px;
}

/* ============================================================
   Report modal (mirrors compose-modal structure)
   ============================================================ */
.report-modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.15s ease-out;
}

.report-modal-hint {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.report-modal-body select {
  width: 100%;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.report-modal-body select:focus {
  outline: none;
  border-color: var(--text);
}

.report-modal-body textarea {
  width: 100%;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}

.report-modal-body textarea:focus {
  outline: none;
  border-color: var(--teal-dim);
}

.report-modal-body .btn-primary {
  margin-top: 14px;
  width: 100%;
}

/* ============================================================
   Submission & Cap Modals
   ============================================================ */
.submission-modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.15s ease-out;
}

.submission-modal textarea {
  width: 100%;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}

.submission-modal textarea:focus {
  outline: none;
  border-color: var(--text);
}

.submission-modal select {
  width: 100%;
  background: var(--bg-darkest);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}

.submission-modal select:focus {
  outline: none;
  border-color: var(--text);
}

.submission-modal .btn-primary {
  margin-top: 14px;
  width: 100%;
}

.submission-modal .form-field {
  margin-bottom: 12px;
}

.submission-modal .form-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 600;
}

.submission-modal .form-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.submission-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-darkest);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.submission-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.submission-status-badge.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.submission-status-badge.approved {
  background: rgba(196, 141, 232, 0.15);
  color: #00e5cc;
}

.submission-status-badge.rejected {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
}

.submission-status-badge.refunded {
  background: rgba(155, 155, 155, 0.15);
  color: #999;
}

/* Cap intercept modal */
.cap-modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  animation: modal-in 0.15s ease-out;
  text-align: center;
}

.cap-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.cap-modal h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
}

.cap-modal-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.4;
}

.cap-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cap-btn-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
}

.cap-btn-secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s;
}

.cap-btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

.cap-btn-sub {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}

/* Track submission badge (in artist profile releases) */
.release-submission-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}

.release-submission-badge.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.release-submission-badge.approved {
  background: rgba(196, 141, 232, 0.15);
  color: #00e5cc;
}

.release-submission-badge.rejected {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
}

/* Submission queue cards (admin) */
.submission-queue-card {
  background: var(--bg-darker);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

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

.submission-queue-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.submission-queue-actions .btn-approve {
  background: rgba(196, 141, 232, 0.15);
  color: #00e5cc;
  border: 1px solid rgba(196, 141, 232, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.submission-queue-actions .btn-approve:hover {
  background: rgba(196, 141, 232, 0.25);
}

.submission-queue-actions .btn-reject {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.submission-queue-actions .btn-reject:hover {
  background: rgba(255, 71, 87, 0.2);
}

/* ============================================================
   Admin Safety Console
   ============================================================ */
.admin-console {
  max-width: 720px;
  margin: 0 auto;
}

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

.admin-header h2 {
  color: var(--text);
  font-size: 1.3rem;
}

.admin-tools {
  display: flex;
  gap: 8px;
}

.admin-report-card {
  margin-bottom: 12px;
}

.admin-report-target {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
}

.admin-report-reason {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
}

.admin-report-actions {
  flex-wrap: wrap;
  gap: 4px;
}

.admin-report-actions .btn-admin-action {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.admin-report-actions .btn-admin-action:hover {
  background: rgba(196, 141, 232, 0.08);
  color: var(--text);
  border-color: var(--teal-dim);
}

.admin-report-actions .btn-admin-action[data-action="escalated"]:hover,
.admin-report-actions .btn-admin-action[data-action="suspended"]:hover {
  background: rgba(255, 71, 87, 0.1);
  color: var(--danger);
  border-color: var(--danger);
}

/* Status chips — color by severity, using existing theme vars. */
.admin-status-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
}

.admin-status-chip.status-open,
.admin-status-chip.status-reviewing {
  background: rgba(196, 141, 232, 0.15);
  color: var(--text);
}

.admin-status-chip.status-suspended,
.admin-status-chip.status-escalated {
  background: rgba(255, 71, 87, 0.15);
  color: var(--danger);
}

/* Audit log panel */
#admin-audit-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.audit-section {
  margin-bottom: 20px;
}

.audit-section h3 {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.audit-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--bg-darkest);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.audit-type {
  font-weight: 700;
  color: var(--text);
}

.audit-type.audit-lea {
  color: var(--danger);
}

.audit-meta {
  color: var(--text-dim);
  font-size: 0.78rem;
}

/* ============================================================
   Mini-Player (persistent audio bar)
   Sits fixed at the bottom; on mobile it stacks above the tabbar.
   ============================================================ */

.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(8, 13, 11, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-hover);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
}

.mini-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 0;
  max-width: 220px;
}

.mini-player-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  overflow: hidden;
}

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

.mini-player-meta {
  min-width: 0;
}

.mini-player-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-artist {
  font-size: 0.76rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#mp-audio {
  flex: 1;
  min-width: 0;
  height: 32px;
}

.mini-player-close {
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  padding: 6px 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: all 0.15s;
}

.mini-player-close:hover {
  background: rgba(196, 141, 232, 0.1);
  color: var(--text);
}

/* Stack the player above the mobile tabbar on small screens */
@media (max-width: 600px) {
  .mini-player { bottom: 60px; }
  .mini-player-info { max-width: 130px; }
  #mp-audio { height: 36px; }
}

/* ============================================================
   Upload Form (artist track release)
   ============================================================ */

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  max-width: 480px;
}

.upload-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upload-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.upload-form .opt {
  font-weight: 400;
  color: var(--text-dim);
}

.upload-form input[type="text"],
.upload-form input[type="file"] {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.15s;
}

.upload-form input[type="text"]:focus {
  border-color: var(--text);
}

.upload-form .form-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.coming-soon-banner {
  padding: 14px 16px;
  margin-bottom: 8px;
  background: rgba(196, 141, 232, 0.07);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--teal-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ============================================================
   Charts Page
   ============================================================ */

.page-card {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.charts-week {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.charts-tabs {
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.charts-tabs .tab-count {
  opacity: 0.6;
  font-size: 0.78rem;
  margin-left: 3px;
}

.chart-section-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 18px 0 8px;
  padding-left: 2px;
}

.chart-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chart-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.chart-entry:hover {
  background: rgba(196, 141, 232, 0.04);
}

.chart-rank {
  font-weight: 800;
  font-size: 1rem;
  color: var(--teal-dim);
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}

.chart-entry .release-cover {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.chart-peak-note {
  color: var(--teal-soft);
  font-weight: 600;
  margin-right: 6px;
}

/* ============================================================
   Phase 4 — Discovery sidebar elements
   (scope tabs, suggested-users rail, charts rail)
   ============================================================ */

.sidebar-header-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.scope-tabs {
  display: flex;
  gap: 2px;
}

.scope-tabs button {
  background: transparent;
  color: var(--text-dim);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  transition: all 0.15s;
}

.scope-tabs button:hover {
  color: var(--text);
}

.scope-tabs button.active {
  background: rgba(196, 141, 232, 0.15);
  color: var(--text);
}

/* Suggested users rail */
/* Terminal-style suggested users */
#suggested-widget .sidebar-header {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 6px rgba(93, 202, 165, 0.3);
}

#suggested-widget .sidebar-icon {
  display: none;
}

.terminal-log {
  max-height: 220px;
  overflow-y: auto;
  padding: 8px 12px;
  scrollbar-width: none;
}

.terminal-log::-webkit-scrollbar {
  display: none;
}

.terminal-line {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  padding: 4px 0;
  color: var(--teal);
  opacity: 0;
  animation: terminal-appear 0.3s ease forwards;
}

@keyframes terminal-appear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.terminal-prompt {
  color: var(--text-dim);
  font-size: 0.72rem;
  opacity: 1;
}

.terminal-user {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.terminal-user:hover {
  background: rgba(93, 202, 165, 0.06);
}

.terminal-user:hover .terminal-name {
  color: #fff;
  text-shadow: 0 0 8px rgba(93, 202, 165, 0.5);
}

.terminal-prefix {
  color: var(--teal-dim);
  font-size: 0.7rem;
}

.terminal-name {
  color: var(--teal);
  font-weight: 600;
  transition: all 0.15s;
}

.terminal-status {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.terminal-done {
  color: var(--text-muted);
  font-size: 0.72rem;
  opacity: 1;
  animation: blink-cursor 1s step-end infinite;
}

.terminal-empty {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.btn-follow-mini {
  background: var(--bg-darkest);
  color: var(--purple);
  border: 1.5px solid var(--purple);
  padding: 5px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.74rem;
  flex-shrink: 0;
  transition: all 0.15s;
}

.btn-follow-mini:hover {
  box-shadow: 0 0 10px rgba(93,202,165,0.2);
}

.btn-follow-mini.following {
  background: transparent;
  border: 1.5px solid var(--purple-dim);
  color: var(--text);
}

/* Charts rail (compact weekly top) */
.chart-rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  transition: background 0.15s;
}

.chart-rail-item:hover {
  background: rgba(196, 141, 232, 0.04);
}

.chart-rail-rank {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--teal-dim);
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.chart-rail-cover {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  overflow: hidden;
}

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

.chart-rail-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-rail-genre {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact play button in the rail rows */
.chart-rail-item .track-play-btn {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ============================================================
   Admin Panel
   ============================================================ */

.admin-panel {
  padding: 20px 24px;
}

.admin-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.admin-search input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.9rem;
}

.admin-search input:focus {
  outline: none;
  border-color: var(--text);
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--nav-bg);
  border-radius: 8px;
  margin-bottom: 4px;
}

.admin-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.admin-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-user-name {
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}

.admin-user-name:hover {
  color: var(--purple-soft);
}

.admin-user-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

.admin-user-badge {
  font-size: 0.85rem;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.admin-pagination button {
  padding: 6px 12px;
}

.admin-pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   Genre Filter Banner
   ============================================================ */

.genre-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: rgba(196, 141, 232, 0.08);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius-sm);
  color: var(--teal-soft);
  font-size: 0.9rem;
}

.genre-filter-banner strong {
  color: var(--text);
}

.genre-filter-clear {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--teal-dim);
  border-radius: 14px;
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.genre-filter-clear:hover {
  background: rgba(196, 141, 232, 0.12);
}

/* ============================================================
   Save / Bookmark Button
   ============================================================ */

.post-actions button.btn-save {
  margin-left: auto;
  opacity: 0.6;
}

.post-actions button.btn-save:hover {
  opacity: 1;
  background: rgba(196, 141, 232, 0.06);
  color: var(--text);
}

.post-actions button.btn-save.saved {
  opacity: 1;
  color: var(--text);
}

/* ============================================================
   Hot Regions Widget (right sidebar)
   ============================================================ */

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  margin-right: 6px;
  position: relative;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--teal), 0 0 12px var(--teal);
  animation: pulse-glow 2s ease-in-out infinite;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1px solid var(--teal);
  opacity: 0;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--teal), 0 0 12px var(--teal); }
  50% { opacity: 0.6; box-shadow: 0 0 3px var(--teal), 0 0 6px var(--teal); }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

#hot-regions-widget .sidebar-header {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  text-shadow: 0 0 8px rgba(93, 202, 165, 0.4);
}

.hot-region-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.hot-region-item:hover {
  background: rgba(196, 141, 232, 0.05);
}

.hot-region-code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  min-width: 28px;
  text-align: center;
}

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

.hot-region-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.hot-region-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hot-region-trend {
  font-size: 0.85rem;
  font-weight: 700;
}

.trend-up { color: #00e5a0; }
.trend-down { color: #ff4757; }
.trend-stable { color: var(--text-muted); }

/* ============================================================
   Comms Toggle Bar (right sidebar)
   ============================================================ */

.comms-toggle-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  background: rgba(2, 2, 4, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  margin-top: 16px;
}

.comms-toggle-bar:hover {
  border-color: var(--purple-dim);
  background: rgba(10, 8, 16, 0.8);
}

.comms-toggle-bar.active {
  border-color: var(--teal);
  background: rgba(93, 202, 165, 0.06);
}

.comms-toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(196, 141, 232, 0.5);
  transition: background 0.2s;
}

.comms-toggle-bar.active .comms-toggle-dot {
  background: var(--teal);
  box-shadow: 0 0 8px rgba(93, 202, 165, 0.5);
}

.comms-toggle-label {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex: 1;
  transition: color 0.2s;
}

.comms-toggle-bar.active .comms-toggle-label {
  color: var(--teal);
  text-shadow: 0 0 6px rgba(93, 202, 165, 0.3);
}

.comms-toggle-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.comms-toggle-bar.active .comms-toggle-arrow {
  color: var(--teal);
}

.comms-panel {
  background: rgba(2, 2, 4, 0.8);
  border: 1px solid var(--teal-dim);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: -2px;
  max-height: 200px;
  overflow-y: auto;
}

.comms-messages {
  padding: 10px 14px;
  min-height: 60px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.72rem;
}

.comms-msg {
  margin-bottom: 6px;
  color: var(--teal-soft);
}

.comms-msg.system {
  color: var(--text-muted);
  opacity: 0.8;
}

/* ============================================================
   Nuke Confirmation Modal
   ============================================================ */

.nuke-modal {
  background: var(--bg-card);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 30px rgba(255, 71, 87, 0.15);
}

.nuke-modal-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.nuke-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 12px;
}

.nuke-modal-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.5;
}

.nuke-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.nuke-modal-actions .btn-secondary {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}

.nuke-modal-actions .btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
}

.nuke-modal-actions .btn-danger {
  padding: 10px 24px;
  background: var(--danger);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}

.nuke-modal-actions .btn-danger:hover {
  opacity: 0.85;
  box-shadow: 0 0 16px rgba(255, 71, 87, 0.3);
}
