/* =========================
   Design Tokens & Variables
   ========================= */
:root {
  /* Colors */
  --dark-bg: #0c0a09;
  --primary-purple: #9333ea;
  --light-purple: #c084fc;
  --subtle-purple: rgba(147, 51, 234, 0.1);
  --border-color: rgba(147, 51, 234, 0.2);
  --glow-color: rgba(147, 51, 234, 0.3);
  --accent-green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);

  /* Reels/Camera specific */
  --ff-bg: #0b0a0b;
  --ff-surface: #111016;
  --ff-glass: rgba(147, 51, 234, 0.12);
  --ff-border: rgba(147, 51, 234, 0.28);
  --ff-border-subtle: rgba(255, 255, 255, 0.08);
  --ff-text: #f5f3ff;
  --ff-sub: #d6ccff;
  --ff-muted: #a1a1aa;
  --ff-primary: #7c3aed;
  --ff-primary-2: #a855f7;
  --ff-success: #10b981;
  --ff-danger: #ef4444;
  --ff-radius: 12px;
  --ff-radius-lg: 18px;
  --ff-shadow: 0 16px 40px rgba(147, 51, 234, .25);

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
    'Segoe UI Symbol', sans-serif;
}

/* =========================
   Reset & Base
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

input,
textarea,
button {
  font-family: inherit;
}

body {
  font-family: var(--font-main);
  background-color: var(--dark-bg);
  color: #f1f5f9;
  position: relative;
  overflow: auto !important;
  /* Prevent modal scroll lock */
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, var(--glow-color) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, var(--glow-color) 0%, transparent 40%);
  animation: auraFlow 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes auraFlow {
  0% {
    transform: rotate(0deg) scale(1.0);
    opacity: 0.6;
  }

  50% {
    transform: rotate(180deg) scale(1.2);
    opacity: 1.0;
  }

  100% {
    transform: rotate(360deg) scale(1.0);
    opacity: 0.6;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlight-pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

/* =========================
   App Shell & Layout
   ========================= */
#app-container {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: rgba(12, 10, 9, 0.6);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

header {
  background: rgba(12, 10, 9, 0.7);
  backdrop-filter: blur(16px);
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.content {
  padding: 20px;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* =========================
   Typography
   ========================= */
h1,
h2 {
  font-weight: 700;
  color: #fff;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
  margin: 24px 0 16px;
  color: #e9d5ff;
}

.tagline {
  font-size: 14px;
  opacity: 0.8;
}

/* =========================
   Tabs
   ========================= */
.tabs {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  justify-content: space-between;
  gap: 6px;
}

.tab {
  padding: 12px 0;
  background: transparent;
  border: none;
  color: #a78bfa;
  cursor: pointer;
  font-size: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
  flex: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab:hover,
.tab.active {
  color: #fff;
}

.tabs .indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--light-purple);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--light-purple);
}

/* Friends panel tabs as chips */
#friends-panel-wrap .tab.chip {
  appearance: none;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, .25);
  color: #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

#friends-panel-wrap .tab.active {
  background: #7c3aed;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(124, 58, 237, .35);
}

/* =========================
   Buttons (Unified)
   ========================= */
/* Unified Modal Action Buttons */
.modal-action-btn {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-primary {
  background: var(--primary-purple);
  color: white;
  box-shadow: 0 4px 15px var(--glow-color);
}

.btn-primary:hover {
  background: #a855f7;
  box-shadow: 0 6px 25px var(--glow-color);
}

.btn-secondary {
  background: var(--subtle-purple);
  color: #c4b5fd;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(147, 51, 234, 0.2);
  color: #fff;
}

.btn-fandango {
  background: #F57C00;
  color: #fff;
  border: 1px solid #E65100;
  box-shadow: 0 4px 15px rgba(245, 124, 0, 0.3);
}

.btn-fandango:hover {
  background: #EF6C00;
  box-shadow: 0 6px 20px rgba(245, 124, 0, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #991b1b;
}

.btn-danger:hover {
  background: #991b1b;
  color: #fff;
}

.btn.active {
  background: var(--primary-purple);
  color: #fff;
}

/* Icon-only buttons */
.icon-only-btn,
.icon-btn {
  appearance: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border-color);
  color: #c4b5fd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}

.icon-only-btn:hover,
.icon-btn:hover {
  background: rgba(147, 51, 234, .15);
  color: #fff;
  transform: translateY(-1px);
}

.icon-only-btn:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid var(--light-purple);
  outline-offset: 3px;
}

.icon-btn {
  width: 36px;
  height: 36px;
}

.icon-btn.active {
  background: var(--primary-purple);
}

/* Action icon button (for save, etc.) */
.action-icon-btn {
  appearance: none;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #c4b5fd;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.action-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(147, 51, 234, .15);
}

.action-icon-btn.is-active {
  background: var(--primary-purple);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 18px var(--glow-color);
}

.action-icon-btn:focus-visible {
  outline: 2px solid var(--light-purple);
  outline-offset: 3px;
}

/* =========================
   Cards (Recommendation)
   ========================= */
.rec-card {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 30, 30, 0.5), rgba(20, 20, 20, 0.5));
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  will-change: transform;
}

.rec-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 30px var(--glow-color);
}

.rec-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.rec-title {
  font-size: 20px;
  font-weight: 600;
}

.rec-type {
  display: inline-block;
  padding: 4px 10px;
  background: var(--subtle-purple);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 11px;
  color: var(--light-purple);
  font-weight: 500;
  margin-top: 6px;
  text-transform: capitalize;
}

.score {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: var(--primary-purple);
  border-radius: 10px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--glow-color);
  flex-shrink: 0;
}

.score.score-clickable {
  cursor: pointer;
  transition: transform .15s ease;
}

.score.score-clickable:hover {
  transform: translateY(-2px);
}

.score.score-clickable:active {
  transform: scale(.98);
}

.rec-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #a1a1aa;
}

.rec-comment {
  font-size: 14px;
  color: #d4d4d8;
  line-height: 1.5;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.rec-comment:hover {
  background: rgba(147, 51, 234, 0.15);
  border-color: rgba(147, 51, 234, 0.3);
  transform: translateY(-1px);
}

.rec-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Card options menu (kebab) */
.rec-options {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  will-change: transform;
}

.rec-options-btn {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  line-height: 0;
  padding-bottom: 4px;
}

.options-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 38px;
  background: rgba(20, 20, 20, 0.85);
  /* Glass background */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(147, 51, 234, 0.25);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  min-width: 140px;
  /* Smaller width */
  width: max-content;
  z-index: 100;
  will-change: transform;
  padding: 4px;
  /* Inner padding for floating items look */
}

.options-menu.visible {
  display: block;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

.options-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #e2e8f0;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  /* Rounded items */
  transition: all 0.2s ease;
}

.options-menu-item:hover {
  background: rgba(147, 51, 234, 0.15);
  color: #fff;
}

.options-menu-item i {
  font-size: 15px;
  color: #a855f7;
}

/* =========================
   Avatars
   ========================= */
.friend-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-purple);
  margin: 0 auto 15px;
  display: block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
}

/* Avatar Picker Modal */
.avatar-picker-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 5000;
}

.avatar-picker-overlay.visible {
  display: flex;
}

.avatar-picker-modal {
  position: relative;
  background: #1a1a1a;
  border: 2px solid var(--primary-purple);
  border-radius: 20px;
  padding: 20px;
  width: min(520px, 92vw);
  max-height: min(80vh, 720px);
  overflow: auto;
  box-shadow: 0 0 40px var(--glow-color);
}

.avatar-picker-modal h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--light-purple);
}

.avatar-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.avatar-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f0f0f0;
}

.avatar-option:hover {
  transform: scale(1.1);
  border-color: var(--light-purple);
}

.avatar-option.selected {
  border-color: var(--primary-purple);
  box-shadow: 0 0 20px var(--glow-color);
}

.avatar-seed-input {
  margin: 20px 0;
}

.avatar-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 20px auto;
  display: block;
  border: 3px solid var(--primary-purple);
}

/* =========================
   Forms
   ========================= */
.add-form {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}

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

.form-group label {
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
  color: #e2e8f0;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f9fafb;
  font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 10px var(--glow-color);
  outline: none;
}

.split-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.split-buttons .btn {
  flex-grow: 1;
}

.input {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

/* =========================
   Friends & Profile
   ========================= */
.friend-code-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.friend-code {
  font-size: 1.2em;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--light-purple);
  cursor: pointer;
}

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

.friend-item {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.friend-item:hover {
  background: var(--subtle-purple);
}

.profile-header {
  text-align: center;
  padding: 10px;
  margin-bottom: 20px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.profile-name-row h1 {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.profile-v2-stat-button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.profile-v2-stat-button:focus-visible {
  outline: 2px solid var(--light-purple);
  outline-offset: 3px;
}

/* =========================
   Profile V2 (Main Layout)
   ========================= */
.profile-v2 {
  padding-bottom: 70px;
}

.profile-v2-header {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.1) 0%, #0a0a0a 100%);
  padding: 20px 20px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(147, 51, 234, 0.2);
}

.profile-v2-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #9333ea;
  margin-bottom: 15px;
  box-shadow: 0 0 30px rgba(147, 51, 234, 0.4);
}

.profile-v2-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
}

.profile-v2-stat {
  text-align: center;
}

.profile-v2-stat-number {
  font-size: 20px;
  font-weight: 700;
  color: #a855f7;
}

.profile-v2-stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.stat-box-metrics {
  border-left: 1px solid rgba(139, 92, 246, 0.15);
  padding-left: 20px;
  margin-left: -5px;
}
.stat-box-metrics .stat-value i {
  color: #a855f7;
  transition: transform 0.2s;
}
.stat-box-metrics:active .stat-value i {
  transform: scale(0.9);
}

/* Filters (sticky) */
.profile-v2 .profile-v2-filters {
  position: sticky;
  top: calc(var(--header-height, 0px));
  z-index: 50;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(147, 51, 234, 0.2);
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  row-gap: 6px;
}

/* Row 1: Pills */
.profile-v2 .profile-v2-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-v2 .profile-v2-toggle-btn {
  padding: 6px 10px;
  border-radius: 14px;
  background: #1e1030 !important;
  border: 1px solid rgba(147, 51, 234, 0.3);
  color: #a855f7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.profile-v2 .profile-v2-toggle-btn.active {
  background: #9333ea !important;
  color: #fff;
  border-color: #9333ea;
}

/* Row 2: Saved R/U switch */
.profile-v2 #saved-mode-switch {
  display: none;
  flex: 0 0 100%;
  width: 100%;
  order: 99;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.profile-v2 .profile-v2-filters:has(.profile-v2-toggle-btn[data-filter="saved"].active) #saved-mode-switch {
  display: flex;
}

.profile-v2 #saved-mode-switch .chip {
  appearance: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(147, 51, 234, 0.35);
  background: rgba(147, 51, 234, 0.12);
  color: #c4b5fd;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.profile-v2 #saved-mode-switch .chip[aria-selected="true"] {
  background: #7c3aed;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(124, 58, 237, .45);
}

.profile-v2 #saved-mode-switch .seg-divider {
  display: none;
}

/* Row 3: Dropdowns */
.profile-v2 .profile-v2-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.profile-v2 .profile-v2-select,
.profile-v2-select {
  padding: 6px 28px 6px 12px;
  background: #1a1a2e;
  border: 1px solid rgba(147, 51, 234, 0.35);
  border-radius: 8px;
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a78bfa'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-v2 .profile-v2-select:focus,
.profile-v2-select:focus {
  border-color: rgba(147, 51, 234, 0.6);
  box-shadow: 0 0 8px rgba(147, 51, 234, 0.15);
}

.profile-v2 .profile-v2-select option,
.profile-v2-select option {
  background: #1a1a2e;
  color: #e5e7eb;
}

/* Content */
.profile-v2-content {
  padding: 20px;
}

.profile-v2 .profile-v2-content {
  padding-top: 6px;
}

/* =========================
   Profile V2 Cards (List View)
   ========================= */
.profile-v2-card {
  background: #141414;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: transform .2s;
  position: relative;
  border-left: 3px solid transparent;
  will-change: transform;
}

.profile-v2-card:hover {
  transform: translateX(4px);
}

/* Dynamic Tabs: Show count only when active */
.profile-v2-toggle-btn .count {
  display: none;
  font-size: 11px;
  opacity: 0.9;
  margin-left: 4px;
}

.profile-v2-toggle-btn.active .count {
  display: inline-block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }

  to {
    opacity: 0.9;
    transform: translateX(0);
  }
}

.profile-v2-toggle-btn i {
  font-family: 'bootstrap-icons' !important;
  font-size: 16px;
  vertical-align: middle;
  display: inline-block;
  line-height: 1;
}

/* Hype Tab Styles (Gold/Yellow) */
.profile-v2-toggle-btn.hype-tab.active {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.5);
  color: #fde047;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
}

.profile-v2-toggle-btn.hype-tab:hover {
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.3);
}

.profile-v2-card.rating-excellent {
  border-left-color: #9333ea;
  background: linear-gradient(90deg, rgba(147, 51, 234, .1) 0%, #141414 50%);
}

.profile-v2-card.rating-good {
  border-left-color: #6b21a8;
}

.profile-v2-card.rating-mid {
  opacity: .7;
}

.profile-v2-card.rating-poor {
  opacity: .5;
  border-left-color: #451a03;
}

.profile-v2-card-poster {
  width: 60px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
}

.profile-v2-card-info {
  flex: 1;
  padding-right: 88px;
  /* Reserve space for score */
}

.profile-v2-card-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.profile-v2-card-meta {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.profile-v2-card-comment {
  font-size: 12px;
  color: #999;
  font-style: italic;
  line-height: 1.4;
}

/* FIX E2: Read more link and clickable elements */
.read-more-link {
  color: var(--primary-purple);
  font-weight: 600;
  font-style: normal;
  cursor: pointer;
  margin-left: 4px;
  transition: color 0.2s;
}

.read-more-link:hover {
  color: var(--light-purple);
  text-decoration: underline;
}

.profile-clickable {
  cursor: pointer;
}

.profile-v2-card-poster.profile-clickable:hover {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.profile-v2-card-title.profile-clickable:hover {
  color: var(--light-purple);
  transition: color 0.2s;
}

/* END FIX E2 */

.profile-v2-card-rating,
.profile-v2-card .profile-v2-card-rating {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  color: #c084fc;
  background: #2b1b3f;
  box-shadow: 0 4px 18px rgba(124, 58, 237, .35) inset, 0 6px 20px rgba(0, 0, 0, .35);
  border: none;
  pointer-events: none;
  z-index: 0;
}

/* Safety: cards should not look disabled unless explicitly marked */
.profile-v2-card:not(.disabled):not(.inactive),
.profile-card:not(.disabled):not(.inactive) {
  opacity: 1 !important;
  filter: none !important;
}

/* =========================
   Badges (Unified)
   ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(147, 51, 234, .35);
  background: rgba(147, 51, 234, .10);
  color: #e9d5ff;
  box-shadow: 0 0 14px rgba(147, 51, 234, .25);
}

.profile-v2-card .badge-hype,
.badge-hype {
  margin-top: 2px;
  background: #1a102a;
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, .55);
  box-shadow: 0 0 22px rgba(147, 51, 234, .55);
}

/* Hype Badge Symbol Variants */
/* Hype Badge Symbol Variants */
.badge-hype.hype-minus {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.badge-hype.hype-plus {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.3);
}

/* Gold/Yellow for Lightning Tiers */
.badge-hype.hype-single,
.badge-hype.hype-double,
.badge-hype.hype-triple {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border: 1px solid rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.3);
}

/* Extra glow for top tier */
.badge-hype.hype-triple {
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
  border-color: rgba(253, 224, 71, 0.6);
  animation: legendaryPulse 2s ease-in-out infinite;
}

.badge-hype-legendary {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(168, 85, 247, 0.25));
  color: #f3e8ff;
  border-color: rgba(168, 85, 247, 0.8);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.6), 0 0 40px rgba(168, 85, 247, 0.4);
  animation: legendaryPulse 2s ease-in-out infinite;
}

@keyframes legendaryPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.6), 0 0 40px rgba(168, 85, 247, 0.4);
  }

  50% {
    box-shadow: 0 0 25px rgba(147, 51, 234, 0.8), 0 0 50px rgba(168, 85, 247, 0.6);
  }
}


/* Purple glow for lightning bolt emoji */
.badge-hype-legendary::first-letter {
  filter: drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 12px #a855f7) drop-shadow(0 0 16px #a855f7);
  animation: boltGlow 1.5s ease-in-out infinite alternate;
}

@keyframes boltGlow {
  0% {
    filter: drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 12px #a855f7) drop-shadow(0 0 16px #a855f7);
  }

  100% {
    filter: drop-shadow(0 0 12px #a855f7) drop-shadow(0 0 18px #a855f7) drop-shadow(0 0 24px #a855f7);
  }
}

.badge-score {
  background: rgba(255, 255, 255, .06);
  color: #e9d5ff;
}

.badge-watch {
  background: rgba(99, 102, 241, .18);
  color: #e0e7ff;
  box-shadow: 0 0 16px rgba(99, 102, 241, .45);
}

.watching-progress {
  background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
  margin-top: 8px;
}

/* Mini pills (pre/post) */
.mini-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  border-radius: 999px;
  vertical-align: middle;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, .15);
}

.mini-pill-pre {
  background: rgba(124, 58, 237, .18);
  color: #e9d5ff;
}

.mini-pill-post {
  background: rgba(16, 185, 129, .18);
  color: #d1fae5;
}

/* =========================
   Progress Bars
   ========================= */
.profile-v2-progress {
  margin-top: 24px;
  margin-right: -60px;
  /* Extend slightly into reserved area but leave gap */
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
  --progress-width: 88%;
  --pct: 0;
}

.profile-v2-progress-bar {
  position: relative;
  width: var(--progress-width);
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
  flex: none;
}

.profile-v2-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%);
  box-shadow: 0 0 10px rgba(147, 51, 234, .45);
  transition: width .35s ease;
  border-radius: inherit;
}

.progress-pct {
  position: absolute;
  top: 50%;
  left: clamp(8%, var(--pct, 0%), 92%);
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, .98);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.profile-v2-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
}

.ff-progress {
  --pct: 0%;
  position: relative;
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
}

.ff-progress>.bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pct);
  background: linear-gradient(90deg, #a855f7, #7c3aed);
  box-shadow: 0 0 12px rgba(124, 58, 237, .6);
}

/* =========================
   Grid Layouts
   ========================= */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.grid-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 2/3;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .5);
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform;
}

.grid-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px var(--glow-color);
}

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

.grid-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .9), transparent);
}

.grid-item .title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

/* Horizontal scroll rows */
.scroll-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 15px;
  padding: 10px 0;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-height: 250px;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

/* =========================
   Dynamic Filter Chips
   ========================= */
.filter-chip {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #9ca3af;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-chip.active {
  background: rgba(124, 58, 237, 0.2) !important;
  border-color: rgba(124, 58, 237, 0.4);
  color: #c4b5fd;
  box-shadow: 0 0 10px rgba(124, 58, 237, 0.1);
}

.filter-chip i {
  font-size: 12px;
  opacity: 0.8;
}

/* Specific Hype Filters */
.filter-chip.hype-btn.active {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

.profile-v2-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  /* Prevent layout shift when empty */
}

/* RESTORED scroll-item */
.scroll-item {
  width: 140px;
  min-width: 140px;
}

/* Section header */
.section-header {
  display: block;
  position: relative;
}

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

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
}

.section-bar h2 {
  margin: 0;
}

/* View toggle */
.view-toggle {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.view-toggle .btn {
  padding: 4px 8px;
  height: 30px;
  min-width: 34px;
  border-radius: 10px;
  line-height: 1;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: none;
}

.view-toggle .btn i {
  font-size: 16px;
}

.view-toggle .btn.active {
  background: rgba(124, 58, 237, .25);
  border-color: rgba(124, 58, 237, .45);
}

/* Icon row */
.icon-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Friends love row */
.friends-love-row {
  display: flex;
  align-items: center;
}

.friends-love-row .friend-avatar {
  width: 24px;
  height: 24px;
  border: 2px solid var(--dark-bg);
  border-radius: 50%;
}

.friends-love-row .friend-avatar+.friend-avatar {
  margin-left: -8px;
}

/* =========================
   List Card (Upgraded to Match App Aesthetic)
   ========================= */
/* =========================
   List Card - Redesigned Layout
   ========================= */
/* FIX LIST-VIEW-04: Buttons under score, comment at bottom */

.list-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* OPTIMIZED: was 12px */
  padding: 14px;
  /* OPTIMIZED: was 18px */
  margin: 14px 0;
  border-radius: 20px;
  cursor: pointer;
  position: relative;
  overflow: visible;
  /* FIX: Allow menu to pop out */
}

.list-card.menu-active {
  z-index: 500;
  /* Ensure on top */

  background: linear-gradient(135deg,
      rgba(88, 28, 135, 0.25),
      rgba(30, 30, 30, 0.7),
      rgba(20, 20, 20, 0.65));
  backdrop-filter: blur(16px);

  border: 1.5px solid transparent;
  background-image:
    linear-gradient(135deg, rgba(30, 30, 30, 0.7), rgba(20, 20, 20, 0.65)),
    linear-gradient(135deg, var(--primary-purple), var(--light-purple), #ec4899);
  background-origin: border-box;
  background-clip: padding-box, border-box;

  box-shadow:
    0 6px 25px rgba(0, 0, 0, 0.4),
    0 0 2px rgba(147, 51, 234, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);

  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease,
    background 0.35s ease;

  will-change: transform;
  animation: slideInUp 0.4s ease-out;
}

/* Hover effect */
.list-card:hover {
  transform: translateY(-6px) scale(1.015);
  background: linear-gradient(135deg,
      rgba(109, 40, 170, 0.35),
      rgba(35, 35, 35, 0.75),
      rgba(25, 25, 25, 0.7));
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 35px var(--glow-color),
    0 0 3px var(--light-purple),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.list-card:active {
  transform: translateY(-3px) scale(1.0);
  transition-duration: 0.12s;
}

/* Top: poster | meta | right column */
.list-card-top {
  display: flex;
  gap: 12px;
  /* OPTIMIZED: was 16px */
  align-items: flex-start;
}

/* Poster */
.list-card .poster {
  width: 90px;
  height: 135px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(147, 51, 234, 0.35);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.6),
    0 0 12px rgba(147, 51, 234, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.list-card:hover .poster {
  transform: translateY(-4px) scale(1.05) rotate(1deg);
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.7),
    0 0 20px rgba(147, 51, 234, 0.45);
}

/* Middle meta */
.list-card .meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* OPTIMIZED: was 10px */
}

/* Right column: score + buttons */
.list-card-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* OPTIMIZED: was 10px */
  align-items: center;
  flex-shrink: 0;
  min-width: 96px;
  /* prevents collision with meta */
}

/* Title row / badges */
.list-card .title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 0;
  /* OPTIMIZED: was 3px */
}

/* Title */
.list-card .rec-title {
  margin: 0;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.list-card:hover .rec-title {
  color: var(--light-purple);
  text-shadow:
    0 0 12px rgba(192, 132, 252, 0.5),
    0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Byline */
.list-card .byline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 600;
  margin-top: 0;
  /* OPTIMIZED: was 3px */
  transition: color 0.25s ease;
}

.list-card:hover .byline {
  color: #e9d5ff;
  text-shadow: 0 0 8px rgba(233, 213, 255, 0.3);
}

/* Progress */
.list-card .progress-container {
  margin-top: 6px;
  /* OPTIMIZED: was 12px */
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-card .progress-label {
  font-size: 12px;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.list-card .ff-progress {
  --pct: 0%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.list-card .ff-progress .bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--pct);
  background: linear-gradient(90deg, var(--primary-purple), var(--light-purple), #ec4899);
  border-radius: 12px;
  box-shadow:
    0 0 14px rgba(147, 51, 234, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressGlow 2s ease-in-out infinite;
}

/* Score (compact) */
.list-score {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 8px 8px;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(109, 40, 217, 0.15));
  border: 1.5px solid rgba(147, 51, 234, 0.45);
  border-radius: 10px;
  box-shadow:
    0 3px 10px rgba(147, 51, 234, 0.25),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.list-card:hover .list-score {
  transform: scale(1.05) translateY(-1px);
  border-color: rgba(192, 132, 252, 0.6);
  box-shadow:
    0 5px 14px rgba(147, 51, 234, 0.4),
    0 0 14px rgba(192, 132, 252, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.list-score .score-value {
  font-size: 19px;
  font-weight: 800;
  color: #f3e8ff;
  letter-spacing: -0.3px;
  text-shadow: 0 1px 6px rgba(147, 51, 234, 0.5), 0 0 8px rgba(192, 132, 252, 0.3);
}

.list-score-na {
  background: linear-gradient(135deg, rgba(63, 63, 70, 0.25), rgba(39, 39, 42, 0.15));
  border-color: rgba(113, 113, 122, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.list-score-na .score-value {
  font-size: 14px;
  font-weight: 700;
  color: #a1a1aa;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Icon row + buttons */
/* Icon row + buttons */
.list-card .icon-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  justify-items: center;
  width: fit-content;
}

.list-card .icon-btn {
  appearance: none;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.25), rgba(0, 0, 0, 0.35));
  border: 1.5px solid var(--border-color);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #c4b5fd;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.list-card .icon-btn:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.4), rgba(109, 40, 217, 0.3));
  border-color: var(--light-purple);
  color: #fff;
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 6px 16px rgba(147, 51, 234, 0.45), 0 0 12px rgba(192, 132, 252, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.list-card .icon-btn:active {
  transform: translateY(-1px) scale(1.05);
  transition-duration: 0.1s;
}

/* Pills / badges */
.list-card .pill {
  display: inline-block;
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(109, 40, 170, 0.25));
  border: 1.5px solid rgba(147, 51, 234, 0.4);
  border-radius: 20px;
  font-size: 11px;
  color: #e9d5ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 6px rgba(147, 51, 234, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.list-card .badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.list-card .badge-watch {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(52, 211, 153, 0.2));
  color: #a7f3d0;
  border: 1.5px solid rgba(52, 211, 153, 0.5);
  text-shadow: 0 1px 4px rgba(16, 185, 129, 0.4);
}

/* ---- Unified full-width comment (always present) ---- */
.list-card .list-comment {
  position: relative;
  width: 100%;
  margin-top: 6px;
  /* OPTIMIZED: was 10px */
  padding: 12px 16px;
  /* OPTIMIZED: was 14px 18px */

  font-size: 15px;
  line-height: 1.6;
  color: #e8e5f8;
  font-weight: 500;

  background: linear-gradient(135deg, rgba(88, 28, 135, 0.22), rgba(20, 20, 20, 0.50));
  border: 1.5px solid rgba(192, 132, 252, 0.25);
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);

  /* clamp to 3 lines with subtle fade */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  white-space: normal;
  word-break: break-word;

  /* XPost clickable */
  cursor: pointer;
  transition: all 0.2s ease;
}

.list-card .list-comment:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(20, 20, 20, 0.50));
  border-color: rgba(147, 51, 234, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(147, 51, 234, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.list-card .list-comment.is-empty {
  min-height: calc(1.6em * 3);
  /* keep height consistent when empty */
  color: transparent;
}

.list-card .list-comment::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  border-radius: 0 0 14px 14px;
  pointer-events: none;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.20) 55%,
      rgba(0, 0, 0, 0.50) 100%);
}

/* Avatars & user link */
.list-card .avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(147, 51, 234, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 6px rgba(147, 51, 234, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.list-card:hover .avatar-sm {
  transform: scale(1.1);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5), 0 0 10px rgba(147, 51, 234, 0.4);
}

.list-card .rec-user {
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.list-card .rec-user:hover {
  color: #fff;
  text-shadow: 0 0 8px rgba(192, 132, 252, 0.4);
  text-decoration: underline;
}

/* Animations */
@keyframes progressGlow {

  0%,
  100% {
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  }

  50% {
    box-shadow: 0 0 20px rgba(192, 132, 252, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */
@media (max-width: 420px) {
  .list-card {
    padding: 12px;
  }

  /* OPTIMIZED: was 14px, now matches tighter spacing */
  .list-card-top {
    gap: 10px;
  }

  /* OPTIMIZED: was 12px */
  .list-card .poster {
    width: 75px;
    height: 112px;
  }

  .list-card .rec-title {
    font-size: 17px;
  }

  .list-card .list-comment {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* OPTIMIZED: was 12px 14px */

  .list-card .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .list-score {
    min-width: 60px;
    padding: 10px;
  }

  .list-score .score-value {
    font-size: 22px;
  }
}

/* END FIX LIST-VIEW-04 */

/* =========================
   Modals (Universal)
   ========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none !important;
  /* Force hidden by default */
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 3000;
  opacity: 0;
  transition: opacity 160ms ease;
}

.modal-overlay.visible {
  display: flex !important;
  /* Force visible when class is added */
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  width: min(680px, 92vw);
  max-height: 80vh;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  background: #2b225a;
  color: #f3e8ff;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.modal-content::-webkit-scrollbar { width: 0px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: transparent; }

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #e5e7eb;
  z-index: 5;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, .6);
  color: #fff;
}

.modal-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .6);
}

.modal-header {
  position: relative;
  padding-bottom: 50%;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200%;
  object-fit: fill;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

@media (max-width: 768px) {
  .modal-backdrop {
    height: 220%;
    mask-image: linear-gradient(to bottom, black 35%, transparent 90%);
    -webkit-mask-image: linear-gradient(to bottom, black 35%, transparent 90%);
  }
}

.modal-poster {
  position: absolute;
  bottom: -50px;
  left: 20px;
  width: 120px;
  height: 180px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  object-fit: cover;
}

.modal-body {
  padding: 80px 20px 20px;
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-meta {
  font-size: 0.9rem;
  color: #a1a1aa;
  margin: 5px 0 20px;
}

.modal-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.genre-tag {
  background: var(--subtle-purple);
  color: var(--light-purple);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.modal-action-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  flex-wrap: nowrap;
}

#modal-save-btn {
  margin-left: auto;
  order: 99;
}

/* Friend recommendation box */
.friend-rec-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
}

/* Friend scores section */
.friend-scores-section {
  margin: 30px 0;
  padding: 20px;
  background: rgba(147, 51, 234, .05);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

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

.avg-score {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-purple);
}

.friend-scores-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.friend-score-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, .2);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}

.friend-score-row:hover {
  background: rgba(147, 51, 234, .1);
  transform: translateX(5px);
}

.friend-score-row.is-pre {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.friend-score-row.is-post {
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.friend-info {
  flex: 1;
}

.friend-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.friend-comment {
  font-size: 13px;
  color: #a1a1aa;
  font-style: italic;
}

.friend-score {
  font-size: 14px;
  font-weight: 700;
  background: var(--primary-purple);
  color: #fff;
  min-width: 36px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--glow-color);
}

/* Trailer */
.trailer-container {
  margin-top: 20px;
}

.trailer-container iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: none;
}

/* Cast */
.cast-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.cast-member {
  text-align: center;
}

.cast-member img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 5px;
}

.cast-member .name {
  font-size: 14px;
  font-weight: 500;
}

.cast-member .character {
  font-size: 12px;
  color: #a1a1aa;
}

/* Friends Modal */
#friends-modal.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(2px);
  z-index: 5000;
  overscroll-behavior: contain;
}

#friends-modal.modal-overlay.visible {
  display: flex;
}

#friends-modal .modal-content {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: min(520px, 92vw);
  max-height: 80vh;
  overflow: auto;
  margin: 0;
  border-radius: 16px;
  background: #2b225a;
  color: #f3e8ff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  padding: 0;
  max-width: 430px;
}

#friends-modal h2 {
  margin: 10px 0 16px;
  color: #e9d5ff;
}

#friends-modal-body {
  padding: 20px;
}

#friends-modal-body .friend-item {
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  gap: 12px;
  transition: transform .15s ease, background .15s ease;
}

#friends-modal-body .friend-item:hover {
  background: rgba(147, 51, 234, .12);
  transform: translateX(4px);
}

#friends-modal .friend-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

#friends-modal .friend-name {
  color: #e4e4e7;
  font-weight: 600;
}

/* Connections modal (Followers/Following) — override the TMDB backdrop padding */
#friends-modal .modal-content .modal-header {
  padding: 16px 20px 0 20px !important;
  padding-bottom: 0 !important;
  position: relative;
  flex-shrink: 0;
}

#friends-modal .modal-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Edit name modal */
#edit-name-modal .modal-body {
  padding: 20px;
}

#edit-name-input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: #141414;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 14px;
}

#edit-name-error {
  color: #fecaca;
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}

/* Progress editor modal */
#progress-modal .modal-content {
  max-width: 360px;
}

#progress-modal .modal-body h2 {
  margin: 0 0 6px;
}

#progress-modal input[type="number"] {
  width: 100%;
  background: #111014;
  border: 1px solid #2a2236;
  color: #e9d5ff;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

#progress-modal input[type="number"]::placeholder {
  color: #6b617b;
}

#progress-modal input[type="number"]::-webkit-outer-spin-button,
#progress-modal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#progress-modal input[type="number"] {
  -moz-appearance: textfield;
}

#progress-modal .btn-primary {
  background: #7c3aed;
  border-color: #7c3aed;
}

#progress-modal .btn-primary:hover {
  filter: brightness(1.08);
}

#progress-modal .btn-secondary {
  background: #2a2236;
  border-color: #2a2236;
}

#progress-modal .btn-secondary:hover {
  filter: brightness(1.05);
}

/* Overlays should not trap clicks */
.modal-backdrop:not(.open),
.backdrop:not(.open),
.overlay:not(.open) {
  pointer-events: none !important;
}

/* =========================
   Search
   ========================= */
#search-results {
  margin-top: 15px;
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.search-result-item:hover {
  background-color: var(--subtle-purple);
}

.search-result-item img {
  width: 40px;
  height: 60px;
  border-radius: 4px;
  margin-right: 15px;
  object-fit: cover;
}

.search-result-item-info span {
  display: block;
  color: #a1a1aa;
  font-size: 12px;
}

/* =========================
   Notifications
   ========================= */
.notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-purple);
  color: white;
  padding: 15px 25px;
  border-radius: 30px;
  box-shadow: 0 5px 20px var(--glow-color);
  font-weight: 500;
  z-index: 1000;
  transition: bottom 0.5s ease-in-out;
}

.notification.show {
  bottom: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #a1a1aa;
}

/* =========================
   Chat V2
   ========================= */
.chat-home-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.chat-section-title {
  margin: 12px 0 8px;
  color: #e9d5ff;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all .2s ease;
}

.chat-row:hover {
  background: rgba(147, 51, 234, .12);
  border-color: rgba(147, 51, 234, .3);
  transform: translateX(4px);
}

/* Avatar Edit Badge */
.avatar-edit-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  background: #7c3aed;
  border-radius: 50%;
  border: 2px solid #000;
  /* Match background to create "cutout" effect */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  pointer-events: none;
  /* Let clicks pass through to container */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Header Avatar Fix */
#header-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  object-fit: cover;
  display: block !important;
  /* Removed background and border to restore original aesthetic */
}

.profile-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
}

.share-list-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.share-list-title-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-list-owner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #a1a1aa;
}

.share-owner-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

.share-list-arrow {
  color: #52525b;
  font-size: 16px;
}

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

.chat-row .title {
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row .preview {
  font-size: 13px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 260px);
  position: relative;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border-color);
}

.chat-back-btn {
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border-color);
  color: #c4b5fd;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-title {
  font-weight: 700;
  font-size: 16px;
}

.chat-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px;
  scroll-behavior: smooth;
}

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

.msg-row.self {
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

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

.msg-bubble {
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .06);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.msg-row.self .msg-bubble {
  background: rgba(147, 51, 234, .20);
  border-color: rgba(147, 51, 234, .35);
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 4px;
}

.msg-meta.right {
  justify-content: flex-end;
}

.msg-name {
  font-weight: 600;
  color: #ddd;
}

.msg-dot {
  opacity: .6;
}

.msg-delete {
  appearance: none;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--border-color);
  color: #c4b5fd;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.msg-delete:hover {
  background: rgba(147, 51, 234, .18);
  color: #fff;
  transform: translateY(-1px);
}

.msg-delete:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .6);
}

.day-sep {
  text-align: center;
  font-size: 12px;
  color: #a1a1aa;
  margin: 12px 0 6px;
  position: relative;
}

.day-sep::before,
.day-sep::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border-color);
}

.day-sep::before {
  left: 0;
}

.day-sep::after {
  right: 0;
}

.spoiler {
  position: relative;
}

.spoiler.is-blurred .msg-bubble {
  filter: blur(7px);
}

.spoiler .reveal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.spoiler.is-blurred .reveal {
  pointer-events: auto;
}

.spoiler .reveal button {
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.spoiler .reveal button:hover {
  background: rgba(147, 51, 234, .25);
}

.spoiler:not(.is-blurred) .reveal-btn {
  display: none;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.chat-input input[type="text"] {
  flex: 1;
  height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 14px;
}

.chat-input .btn {
  height: 44px;
}

.chat-ep {
  width: 90px;
  padding: 10px;
  border-radius: 10px;
  background: #141414;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 13px;
}

.chat-input .me-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-self: center;
  flex: 0 0 32px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

#emoji-toggle {
  width: 44px;
  height: 44px;
  padding: 0;
}

.emoji-popover {
  position: absolute;
  right: 12px;
  bottom: 70px;
  background: #101010;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* =========================
   Top-5 Editor
   ========================= */
.t5e-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t5e-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 12px;
}

.t5e-rank {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #e5e7eb;
  min-width: 78px;
}

.t5e-title {
  flex: 1;
  min-width: 0;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t5e-empty {
  opacity: .7;
  font-style: italic;
}

.t5e-trash {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: #e5e7eb;
  display: grid;
  place-items: center;
}

.t5e-row[draggable="true"] {
  cursor: grab;
}

.t5e-row.dragging {
  opacity: .6;
}

.t5e-row.drop-target {
  outline: 2px dashed #a78bfa;
  outline-offset: 3px;
}

.info-banner {
  background: rgba(167, 139, 250, .12);
  color: #d9d6ff;
  border: 1px solid rgba(167, 139, 250, .35);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 6px 10px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, .05);
}

.t5e-trophy {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.t5e-trophy.gold {
  filter: none;
}

/* =========================
   Reels & Camera (Explore)
   ========================= */
.reels {
  padding: 10px 12px 40px;
}

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

.reels__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ff-sub);
}

.reels__filters {
  display: flex;
  gap: 8px;
}

/* Unified button look for explore */
#explore .btn,
#explore .mode-btn,
#explore .camera-icon-btn,
#explore .camera-chip,
#explore .stack-btn,
#explore .file-input span {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--ff-border);
  background: linear-gradient(180deg, var(--ff-glass), rgba(0, 0, 0, .35));
  color: var(--ff-text);
  border-radius: 999px;
  padding: 10px 14px;
  font: 600 13px/1 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

#explore .btn:hover,
#explore .mode-btn:hover,
#explore .camera-icon-btn:hover,
#explore .camera-chip:hover,
#explore .stack-btn:hover,
#explore .file-input span:hover {
  transform: translateY(-1px);
  border-color: rgba(147, 51, 234, .45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .32);
}

#explore .btn:active,
#explore .mode-btn:active,
#explore .camera-icon-btn:active,
#explore .camera-chip:active,
#explore .stack-btn:active,
#explore .file-input span:active {
  transform: translateY(0);
}

#explore .btn.primary,
#explore .reels__filters .btn.active,
#explore .mode-btn.active,
#explore .file-input span {
  background: radial-gradient(80% 140% at 50% 0%, var(--ff-primary-2), var(--ff-primary));
  border-color: rgba(147, 51, 234, .6);
  color: #fff;
  box-shadow: 0 10px 30px rgba(147, 51, 234, .35);
}

#explore .btn:disabled {
  opacity: .6;
  cursor: default;
  transform: none;
}

#explore .camera-icon-btn,
#explore .stack-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.file-input {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.file-input input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Create (Upload) */
.reels__create-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.mode-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mode-btn {
  min-width: 92px;
  text-align: center;
}

.reels__preview {
  width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: var(--ff-radius);
}

.reels__caption-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reels__caption-label textarea {
  width: 100%;
  background: #0f0e14;
  color: #e5e7eb;
  border: 1px solid var(--ff-border-subtle);
  border-radius: var(--ff-radius);
  padding: 10px;
}

.reels__hint {
  color: var(--ff-muted);
  font-size: .85rem;
  margin-top: 4px;
}

.reels__progress {
  height: 8px;
  background: #1f1f1f;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
  position: relative;
}

.reels__progress::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--pct, 0)*1%);
  background: var(--ff-primary);
  box-shadow: 0 0 16px rgba(124, 58, 237, .6);
}

/* Vertical Feed */
.reels__feed {
  scroll-snap-type: y mandatory;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: auto;
}

.reel {
  position: relative;
  scroll-snap-align: start;
  border-radius: var(--ff-radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.reel__video {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  display: block;
}

.reel__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7));
}

.reel__meta {
  color: #fff;
  max-width: 88%;
}

.reel__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.reel__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.reel__name {
  font-weight: 700;
}

.reel__caption {
  color: #e7e7ee;
  font-size: .95rem;
  line-height: 1.25;
}

.reels__sentinel {
  height: 1px;
}

/* Reel tag/chip */
.reel-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(15, 15, 20, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #fff;
  text-decoration: none;
  max-width: min(62%, 300px);
  transform: translateZ(0);
  transition: transform .12s ease, opacity .12s ease;
  z-index: 3;
}

.reel-tag:hover {
  transform: translateY(-1px);
}

.reel-tag__poster {
  width: 36px;
  height: 54px;
  flex: 0 0 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
  display: block;
}

.reel-tag__title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.reel__mute {
  position: relative;
  z-index: 4;
}

@keyframes ffadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reel-tag--in {
  animation: ffadeIn .18s ease both;
}

/* Reels right-side rail */
.reel__rail {
  position: absolute;
  right: 8px;
  bottom: 14vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 2;
}

.rail-btn {
  appearance: none;
  border: 0;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .1s ease, box-shadow .2s ease;
}

.rail-btn:active {
  transform: scale(.96);
}

.rail-btn .count {
  display: block;
  font: 600 11px/1 Inter, system-ui;
  margin-top: 6px;
  text-align: center;
  opacity: .9;
}

.rail-btn.like.active {
  background: rgba(147, 51, 234, .15);
  box-shadow: 0 0 18px rgba(147, 51, 234, .35);
}

.reel__views {
  position: absolute;
  left: 10px;
  top: 10px;
  background: rgba(0, 0, 0, .45);
  padding: 6px 10px;
  border-radius: 999px;
  font: 600 12px/1 Inter;
}

/* Reel fallback card */
#explore .reel__fallback {
  position: relative;
  width: 100%;
  height: 70vh;
  border-radius: 20px;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

#explore .reel__fallback-msg {
  position: absolute;
  inset: 0 0 auto 0;
  margin: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
}

#explore .reel__fallback-msg a {
  color: #a78bfa;
  text-decoration: underline;
}

#explore .empty-state {
  margin: 24px 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(20, 18, 26, 0.55);
  color: #a1a1aa;
  text-align: center;
}

#explore .empty-state .empty-title {
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 6px;
}

#explore .empty-state .empty-sub {
  font-size: 14px;
  opacity: .9;
}

/* Title Picker */
.reels-title-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.rtp__label {
  font-weight: 700;
  color: #e9d5ff;
}

.rtp__input-wrap {
  position: relative;
}

.rtp__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0f0e14;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}

.rtp__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #0f0e14;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
  z-index: 20;
  max-height: 280px;
  overflow: auto;
}

.rtp__row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
}

.rtp__row:hover {
  background: rgba(255, 255, 255, .04);
}

.rtp__thumb {
  width: 46px;
  height: 69px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.rtp__row-title {
  font-weight: 700;
  color: #fff;
}

.rtp__row-meta {
  font-size: 12px;
  color: #a1a1aa;
}

.rtp__chosen {
  margin-top: 6px;
}

.rtp__chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(147, 51, 234, .35);
  background: linear-gradient(180deg, rgba(147, 51, 234, .10), rgba(0, 0, 0, .35));
  border-radius: 12px;
}

.rtp__chip img {
  width: 28px;
  height: 42px;
  border-radius: 6px;
  background: #111;
}

.rtp__text {
  min-width: 0;
}

.rtp__title {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.rtp__meta {
  font-size: 12px;
  color: #c4b5fd;
}

.rtp__clear {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

/* =========================
   Full-screen Camera Overlay
   ========================= */
.reels-capture {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: #000;
  color: var(--ff-text);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

.reels-capture.open {
  display: block;
}

#explore .reels-capture,
#explore .reels-capture * {
  font-family: var(--font-main);
  -webkit-appearance: none;
  appearance: none;
}

#explore .reels-capture :is(.btn, .camera-icon-btn, .camera-chip, .stack-btn) {
  border: 1px solid var(--border-color, rgba(147, 51, 234, 0.35));
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.12), rgba(0, 0, 0, .35));
  color: #e9d5ff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

#explore .reels-capture :is(.camera-icon-btn, .stack-btn) {
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

#explore .reels-capture :is(.btn.primary, .camera-chip[aria-pressed="true"]) {
  background: radial-gradient(80% 140% at 50% 0%, #a855f7, #7c3aed);
  border-color: rgba(147, 51, 234, 0.6);
  color: #fff;
  box-shadow: 0 10px 30px rgba(147, 51, 234, .35);
}

#explore .reels-capture :is(.btn, .camera-icon-btn, .camera-chip, .stack-btn):hover {
  transform: translateY(-1px);
  border-color: rgba(147, 51, 234, 0.5);
}

#explore .reels-capture :is(.btn, .camera-icon-btn, .camera-chip, .stack-btn):active {
  transform: translateY(0);
}

#explore .reels-capture .camera-chip.off {
  background: rgba(124, 58, 237, .25);
  border-color: rgba(147, 51, 234, .35);
  color: #e5e7eb;
}

#explore .reels-capture .camera-chip.off .dot {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
}

.camera-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform: translateZ(0);
}

.camera-safe {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.camera-viewport {
  width: min(100%, 520px);
  aspect-ratio: 9/16;
  border-radius: 20px;
  outline: 1px solid rgba(255, 255, 255, .04);
}

.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

.grid-overlay.on {
  opacity: .65;
  background:
    linear-gradient(to right, rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0/33.333% 100%,
    linear-gradient(to bottom, rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0/100% 33.333%;
}

.camera-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(10px + env(safe-area-inset-top));
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
  z-index: 3;
}

.camera-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ff-success);
  box-shadow: 0 0 12px var(--ff-success);
}

.hud {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(56px + env(safe-area-inset-top));
  display: flex;
  gap: 8px;
  z-index: 3;
}

.badge.rec {
  background: rgba(239, 68, 68, .2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, .35);
}

.camera-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  z-index: 3;
}

.record-wrap {
  position: relative;
  width: 96px;
  height: 96px;
}

.progress-ring {
  --p: 0%;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(var(--ff-primary) var(--p), rgba(255, 255, 255, .1) 0),
    radial-gradient(closest-side, transparent calc(50% - 6px), rgba(0, 0, 0, .7) calc(50% - 6px));
  filter: drop-shadow(0 4px 18px rgba(147, 51, 234, .5));
}

.record-btn {
  position: absolute;
  inset: 8px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: radial-gradient(120% 120% at 50% 10%, var(--ff-primary-2), var(--ff-primary));
  box-shadow: 0 14px 30px rgba(147, 51, 234, .45), inset 0 -8px 18px rgba(0, 0, 0, .35);
  transition: transform .12s ease, border-radius .25s ease, box-shadow .2s ease;
}

.record-btn.rec {
  border-radius: 22px;
}

.record-btn:active {
  transform: translateY(1px) scale(.98);
}

.side-stack {
  position: absolute;
  bottom: calc(120px + env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  z-index: 3;
}

.side-stack.left {
  left: 12px;
}

.side-stack.right {
  right: 12px;
}

.stack-btn.toggled {
  outline: 2px solid rgba(147, 51, 234, .6);
}

.countdown {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 4;
  pointer-events: none;
}

.countdown-num {
  font-size: clamp(48px, 12vw, 120px);
  color: #fff;
  text-shadow: 0 8px 40px rgba(0, 0, 0, .6), 0 0 60px rgba(147, 51, 234, .45);
}

.camera-permission {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 5;
  background: linear-gradient(180deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .6));
  backdrop-filter: blur(6px);
}

.permission-card {
  width: min(520px, 92%);
  padding: 20px;
  background: linear-gradient(180deg, rgba(20, 18, 26, .72), rgba(0, 0, 0, .6));
  border: 1px solid var(--ff-border);
  border-radius: 18px;
  text-align: center;
  color: var(--ff-text);
  box-shadow: var(--ff-shadow);
}

.permission-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.post-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 6;
  background: linear-gradient(180deg, rgba(20, 18, 26, .92), rgba(0, 0, 0, .92));
  border-top: 1px solid var(--ff-border);
  border-radius: 22px 22px 0 0;
  padding: 12px 14px 16px;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, .45);
}

.post-sheet .body {
  display: grid;
  gap: 12px;
}

.post-sheet .row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

#cameraToast.toast {
  position: absolute;
  left: 50%;
  bottom: calc(140px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: none;
  z-index: 7;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(239, 68, 68, .22), rgba(239, 68, 68, .13));
  border: 1px solid rgba(239, 68, 68, .45);
  color: #fecaca;
  box-shadow: 0 10px 30px rgba(239, 68, 68, .25);
}

/* =========================
   Hype Card (Mini Layout)
   ========================= */
.hype-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #111;
}

.hype-media .poster {
  width: 90px;
  height: 135px;
  object-fit: cover;
  border-radius: 10px;
}

.hype-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hype-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.hype-text {
  margin-top: 2px;
  opacity: .9;
}

#hype-skip {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 10px;
  background: #2a2236;
  border: 1px solid #2a2236;
  color: #e5e7eb;
}

/* =========================
   TMDB Grid
   ========================= */
.tmdb-row.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.tmdb-card {
  border-radius: 14px;
  overflow: hidden;
  background: #0f0d16;
}

.tmdb-card .poster {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
}

/* =========================
   Utility Classes
   ========================= */
.highlighted {
  animation: highlight-pulse 1s ease-in-out 3;
  border: 2px solid var(--primary-purple) !important;
  box-shadow: 0 0 30px var(--glow-color) !important;
}

/* =========================
   Responsive Breakpoints
   ========================= */
@media (min-width: 680px) {
  .profile-v2 .profile-v2-toggle {
    flex-wrap: nowrap;
  }
}

@media (max-width: 480px) {
  .profile-v2 .profile-v2-controls {
    gap: 8px;
    margin-top: 6px;
  }

  .reel-tag {
    gap: 8px;
    padding: 8px 9px;
    max-width: 80%;
  }

  .reel-tag__poster {
    width: 32px;
    height: 48px;
    flex-basis: 32px;
  }

  .reel-tag__title {
    max-width: 160px;
  }
}

@media (max-width: 420px) {
  .profile-v2 .profile-v2-toggle {
    gap: 6px;
  }

  .profile-v2 .profile-v2-toggle-btn {
    padding: 5px 9px;
    font-size: 11.5px;
    border-radius: 12px;
  }

  .modal-action-buttons {
    flex-wrap: wrap;
  }

  #modal-save-btn {
    margin-left: 0;
    order: 0;
  }

  .record-wrap {
    width: 88px;
    height: 88px;
  }

  .side-stack {
    bottom: calc(110px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .profile-v2 .profile-v2-toggle {
    gap: 5px;
  }

  .profile-v2 .profile-v2-toggle-btn {
    padding: 4px 8px;
    font-size: clamp(10px, 2.9vw, 11.5px);
    border-radius: 12px;
  }

  #saved-mode-switch .chip {
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .profile-v2 .profile-v2-toggle {
    gap: 5px;
  }

  .profile-v2 .profile-v2-toggle-btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 12px;
  }
}

@media (max-width: 330px) {
  .profile-v2 .profile-v2-toggle {
    gap: 4px;
  }

  .profile-v2 .profile-v2-toggle-btn {
    padding: 3px 7px;
    font-size: 10.5px;
    border-radius: 10px;
  }
}

/* =========================
   Accessibility & Motion
   ========================= */
:focus-visible {
  outline: 2px solid rgba(147, 51, 234, .75);
  outline-offset: 2px;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

#details-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

#details-modal.visible {
  display: flex;
  /* Centered when visible */
  align-items: center;
  justify-content: center;
}


/* Dead zone fix */
.list-comment,
.rec-comment {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 100 !important;
  position: relative !important;
}

.list-comment:hover,
.rec-comment:hover {
  background: rgba(168, 85, 247, 0.15) !important;
}




/* =====================================
   Start Watching visibility rules
   ===================================== */

/* Movies: never show inline "Start Watching" quick-action.
   We scope to cards whose root has data-type="movie",
   so shows keep their Start Watching button. */
[data-rec-id][data-tmdb-id][data-type="movie"] [data-act="watch"] {
  display: none !important;
}


/* =====================================
   Hide LOVES button for HYPE posts only
   ===================================== */

/* Any list or grid card that contains the hype badge (.badge-hype)
   should hide the Loves inline-action button (data-act="love").
   All non‑hype cards keep their Loves button. */

[data-rec-id][data-tmdb-id]:has(.badge-hype) [data-act="love"] {
  display: none !important;
}


/* =====================================
   Hype cards: no inline Start Watching (prediction-only)
   ===================================== */

/* Any hype-card rec-card (used for hype posts) should NOT show the
   inline Start Watching quick-action. These are prediction posts,
   not active watching logs. */
.hype-card.rec-card [data-act="watch"] {
  display: none !important;
}

/* XPost Clickable User Elements */
.xpost-user-clickable {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.xpost-user-clickable:hover {
  opacity: 0.8;
}

/* Reduced Motion */
body.reduced-motion::before {
  animation: none;
  opacity: 0.3;
}

/* =========================
   Settings Modal
   ========================= */
.settings-modal-content {
  background: #111016;
  border: 1px solid var(--ff-border);
  max-width: 400px;
  width: 90%;
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
}

.settings-section {
  padding: 20px;
  border-bottom: 1px solid var(--ff-border-subtle);
}

.settings-section h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ff-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.settings-row:hover {
  opacity: 0.8;
}

.settings-row.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-info {
  flex: 1;
  padding-right: 16px;
}

.settings-label {
  font-size: 16px;
  color: var(--ff-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-sublabel {
  font-size: 13px;
  color: var(--ff-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.settings-footer {
  padding: 20px;
  text-align: center;
  color: var(--ff-muted);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.text-danger .settings-label {
  color: var(--ff-danger);
}

.badge-coming-soon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ff-muted);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
}

/* Toggle Switch */
.toggle-switch {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.toggle-switch.checked {
  background: var(--ff-primary);
}

.toggle-knob {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.checked .toggle-knob {
  transform: translateX(20px);
}

/* Search Results */
.search-result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.search-result-row img,
.search-result-row .no-poster {
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background: #333;
  flex-shrink: 0;
}

.search-result-row .info {
  flex: 1;
  min-width: 0;
}

.search-result-row .title {
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-row .meta {
  font-size: 0.85rem;
  color: #aaa;
}

/* Profile Card Review Text */
.profile-card-review {
  font-size: 0.8rem;
  color: #ccc;
  margin-top: 6px;
  font-style: italic;
  line-height: 1.3;

  /* Truncation */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Interactive */
  cursor: pointer;
  pointer-events: auto;
  /* Ensure it catches clicks */
  transition: color 0.2s;

  /* Visual separation */
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 6px;
  border-radius: 4px;
}

.profile-card-review:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   TOP CHARTS MODAL
   ========================================= */
.top-charts-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.top-charts-modal.visible {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.top-charts-content {
  width: 100%;
  max-width: 500px;
  height: 80vh;
  background: linear-gradient(145deg, rgba(20, 18, 25, 0.95), rgba(10, 8, 12, 0.98));
  border: 1px solid var(--border-color);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(147, 51, 234, 0.15);
  overflow: hidden;
}

.top-charts-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(147, 51, 234, 0.05);
}

.top-charts-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.5px;
}

.top-charts-header h2 i {
  color: var(--primary-purple);
  filter: drop-shadow(0 0 8px var(--primary-purple));
}

.top-charts-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.top-charts-close:hover {
  color: #fff;
  background: rgba(147, 51, 234, 0.2);
  border-color: var(--primary-purple);
}

.top-charts-controls {
  padding: 16px 24px;
  display: flex;
  gap: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.tc-toggle-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-toggle-group label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--light-purple);
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.8;
}

.tc-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2px;
  width: fit-content;
  /* Don't stretch full width */
}

.tc-toggle button {
  background: none;
  border: none;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  /* Smaller padding */
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  /* Ensure click target isn't too small */
}

.tc-toggle button:hover {
  color: #ccc;
  background: rgba(255, 255, 255, 0.05);
}

.tc-toggle button.active {
  background: var(--primary-purple);
  color: #fff;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.25);
}

.top-charts-list {
  flex: 1;
  overflow-y: auto;
}

.top-charts-list::-webkit-scrollbar {
  width: 6px;
}

.top-charts-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.top-charts-list::-webkit-scrollbar-thumb {
  background: rgba(147, 51, 234, 0.3);
  border-radius: 10px;
}

.tc-loading,
.tc-empty,
.tc-error {
  padding: 60px 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(147, 51, 234, 0.2);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Chart Row */
.tc-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tc-row::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.tc-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(147, 51, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tc-row:hover::before {
  opacity: 1;
}

.tc-rank {
  font-size: 28px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.1);
  width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.tc-row:nth-child(1) .tc-rank {
  color: #ffd700;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  font-size: 32px;
}

.tc-row:nth-child(2) .tc-rank {
  color: #e0e0e0;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.tc-row:nth-child(3) .tc-rank {
  color: #cd7f32;
  text-shadow: 0 0 10px rgba(205, 127, 50, 0.2);
}

.tc-poster {
  width: 56px;
  height: 84px;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.tc-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.tc-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.tc-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-stat-badge {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  color: #ccc;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 500;
}

/* GENRE SELECTOR (Upload Screen) */
.genre-selector,
.rtp__genres {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  margin: 0px 0 8px;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.genre-selector::-webkit-scrollbar,
.rtp__genres::-webkit-scrollbar {
  display: none;
}

.genre-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 14px;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.genre-chip:hover {
  background: rgba(255, 255, 255, 0.15);
}

.genre-chip.active {
  background: #a855f7;
  color: #fff;
  border-color: #a855f7;
  font-weight: 600;
}

.tc-stat-badge i {
  font-size: 11px;
  color: var(--light-purple);
}

.tc-row:nth-child(1) .tc-stat-badge {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.2);
  color: #ffeebb;
}

.tc-row:nth-child(1) .tc-stat-badge i {
  color: #ffd700;
}

/* =========================================
   UNIVERSAL SHARE SHEET
   ========================================= */
.share-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 11000;
  /* Above everything */
  display: none;
  align-items: flex-end;
  /* Bottom sheet */
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-sheet-overlay.visible {
  display: flex;
  opacity: 1;
}

.share-sheet-panel {
  width: 100%;
  max-width: 600px;
  /* Desktop constraint */
  background: #13111a;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}

.share-sheet-overlay.visible .share-sheet-panel {
  transform: translateY(0);
}

.share-sheet-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.share-sheet-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.share-sheet-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  padding: 4px;
  cursor: pointer;
  border-radius: 50%;
}

.share-sheet-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Targets Row (Horizontal Scroll) */
.share-targets-row {
  display: flex;
  gap: 16px;
  padding: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Hide scrollbar */
  -ms-overflow-style: none;
}

.share-targets-row::-webkit-scrollbar {
  display: none;
}

.share-target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}

.share-target-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #222;
  object-fit: cover;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.share-target-name {
  font-size: 11px;
  color: #aaa;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.2;
}

/* Selected State */
.share-target.selected .share-target-avatar {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(147, 51, 234, 0.2);
  transform: scale(1.05);
}

.share-target.selected .share-target-name {
  color: #fff;
  font-weight: 600;
}

/* Checkmark badge */
.share-target.selected::after {
  content: '\F26E';
  /* Bootstrap check-circle-fill */
  font-family: 'bootstrap-icons';
  position: absolute;
  top: 0;
  right: 4px;
  background: var(--primary-purple);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #13111a;
}

.share-sheet-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: flex-end;
}

#share-send-btn {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 12px;
  border-radius: 12px;
}

/* User Search Results */
.search-result-row.user-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-row.user-result:hover {
  background: rgba(255, 255, 255, 0.08);
}

.search-result-row.user-result .friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.search-result-row.user-result .info {
  flex: 1;
}

.search-result-row.user-result .title {
  font-weight: 600;
  color: #fff;
  font-size: 15px;
}

.search-result-row.user-result .meta {
  font-size: 12px;
  color: #a1a1aa;
}

.search-result-row.user-result .action {
  color: #a1a1aa;
}

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Modal Header Image (New Structure) */
.modal-header-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
}

/* Gradient Fade Overlay */
.modal-header-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(20, 18, 26, 0.2) 60%, #14121a 100%);
  pointer-events: none;
}

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

.modal-poster-row {
  display: flex;
  gap: 16px;
  margin-top: -60px;
  /* Pull up more into the fade */
  position: relative;
  z-index: 2;
  padding: 0 16px;
  min-height: 150px;
  /* Ensure row is at least as tall as poster */
  margin-bottom: 24px;
  /* Push overview down */
}

.modal-poster {
  width: 100px;
  height: 150px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-main-info {
  flex: 1;
  padding-top: 62px;
  /* Push down to clear backdrop overlap */
}

.modal-body-content {
  padding-bottom: 24px;
  background: #14121a;
  /* Match gradient end */
}

/* Cast Section */
.modal-credits-section {
  margin-top: 24px;
}

.modal-credits-section h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #fff;
}

.credits-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  /* Firefox */
}

.credits-scroll::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.credit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 70px;
  flex-shrink: 0;
}

.credit-item img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.credit-item span {
  font-size: 11px;
  text-align: center;
  color: #a1a1aa;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inbox Badge */
.badge-counter {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #a78bfa;
  /* Purple */
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #000;
  /* Contrast against dark header */
}

/* Inbox Header */
.inbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.activity-log-toggle {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #a78bfa;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}
.activity-log-toggle:active {
  transform: scale(0.92);
  background: rgba(139, 92, 246, 0.2);
}

/* Inbox List */
.inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Activity Log View */
.activity-log-view {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.activity-log-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.activity-log-back {
  background: none;
  border: none;
  color: #a78bfa;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.activity-log-back:active { color: #c4b5fd; }
.activity-log-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
}
.activity-log-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.activity-log-filters::-webkit-scrollbar { display: none; }
.activity-log-chip {
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Outfit', sans-serif;
}
.activity-log-chip.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}
.activity-log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  cursor: pointer;
  transition: background 0.15s;
}
.activity-log-item:active {
  background: rgba(255,255,255,0.02);
}
.activity-log-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.activity-log-icon.like { background: rgba(239,68,68,0.12); }
.activity-log-icon.comment { background: rgba(59,130,246,0.12); }
.activity-log-icon.follow { background: rgba(139,92,246,0.12); }
.activity-log-icon.rating { background: rgba(251,191,36,0.12); }
.activity-log-icon.save { background: rgba(34,197,94,0.12); }
.activity-log-icon.watch { background: rgba(168,85,247,0.12); }
.activity-log-icon.post { background: rgba(236,72,153,0.12); }
.activity-log-text {
  flex: 1;
  min-width: 0;
}
.activity-log-text .al-main {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.35;
}
.activity-log-text .al-time {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
}
.activity-log-empty {
  text-align: center;
  color: #64748b;
  font-size: 13px;
  padding: 40px 20px;
}

.request-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.request-row .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.request-row .info {
  flex: 1;
}

.request-row .name {
  font-weight: 600;
  color: #fff;
  font-size: 15px;
}

.request-row .sub {
  font-size: 12px;
  color: #a1a1aa;
}

.request-actions {
  display: flex;
  gap: 8px;
}

.btn-accept,
.btn-deny {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.btn-accept {
  background: #a78bfa;
  color: #fff;
}

.btn-deny {
  color: #d4d4d8;
}

/* Watch Providers */
.watch-providers-container {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.providers-label {
  font-size: 12px;
  color: #a1a1aa;
  font-weight: 500;
}

.providers-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.provider-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.provider-bubble:hover {
  transform: scale(1.1);
}

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

.providers-attribution {
  font-size: 10px;
  color: #71717a;
  text-align: right;
  margin-top: 4px;
}

.providers-attribution a {
  color: #71717a;
  text-decoration: none;
}

.providers-attribution a:hover {
  text-decoration: underline;
}

/* =========================
   Friend Request & UI Polish
   ========================= */

/* Notification Badge (Purple) */
#inbox-badge {
  background-color: var(--primary-purple);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  position: absolute;
  top: -5px;
  right: -5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: none;
  /* Hidden by default */
}

/* Friend Request Buttons */
.btn-accept {
  background-color: var(--primary-purple);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-accept:hover {
  background-color: var(--light-purple);
}

.btn-deny {
  background-color: rgba(255, 255, 255, 0.1);
  color: #d1d5db;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-deny:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Small Icon Button (Search Results Add) */
.btn-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: var(--primary-purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-icon-small:hover {
  background-color: var(--light-purple);
  transform: scale(1.1);
}

/* Small Primary Button (Profile Add) */
.btn-primary-small {
  background-color: var(--primary-purple);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  /* Pill shape */
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}

.btn-primary-small:hover {
  background-color: var(--light-purple);
  transform: translateY(-1px);
}

/* ========================
   REEL CHIPS (New System)
   ======================== */
.chip {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #fff;
  text-decoration: none;
  max-width: 70%;
  transform: translateZ(0);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.chip.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chip:hover {
  background: rgba(30, 30, 35, 0.8);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.chip__img {
  width: 24px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background: #000;
}

.chip__text {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  color: #f3f4f6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Modifiers */
.chip--genre {
  border-color: rgba(168, 85, 247, 0.3);
  /* Purple tint */
}

.chip--genre .bi {
  color: #a855f7;
  font-size: 14px;
}

.chip--director .bi {
  color: #fbbf24;
  /* Amber */
  font-size: 14px;
}

/* =========================================
   VISUAL TIERS (HYPE SYSTEM)
   ========================================= */

/* BADGE BASE STYLES - Enforce single line */
.badge-hype,
.badge-watch,
.badge-neg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  padding: 3px 6px;
  font-size: 10px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge-hype {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.2);
}

.badge-watch {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.2);
}

.badge-neg {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}


/* 1. NEGATIVE (RED ZONE) */
.card-negative {
  background: linear-gradient(135deg, rgba(60, 10, 10, 0.9), rgba(30, 10, 10, 0.95));
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-negative .poster {
  filter: none;
}

.card-negative .list-score {
  background: #7f1d1d;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.card-negative .badge-neg {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
}

/* 2. POSITIVE (GREEN ZONE) */
.card-positive {
  background: linear-gradient(135deg, rgba(6, 50, 20, 0.9), rgba(5, 30, 15, 0.95));
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.card-positive .list-score {
  background: #14532d;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.card-positive .badge-watch {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #fff;
}


/* 3. HYPE LV1 (SUBTLE YELLOW) */
.card-hype-1 {
  background: linear-gradient(135deg, rgba(50, 40, 10, 0.8), rgba(30, 25, 10, 0.9));
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.card-hype-1 .list-score {
  background: #713f12;
  color: #fef08a;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.2);
}

.card-hype-1 .badge-hype {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fff;
}


/* 4. HYPE LV2 (STRONG GOLD) */
.card-hype-2 {
  background: linear-gradient(135deg, rgba(80, 60, 10, 0.9), rgba(40, 30, 5, 0.95));
  border: 1px solid rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 25px rgba(234, 179, 8, 0.15);
}

.card-hype-2 .list-score {
  background: linear-gradient(135deg, #ca8a04, #854d0e);
  color: #fff;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
}

.card-hype-2 .badge-hype {
  background: rgba(250, 204, 21, 0.3);
  border-color: #facc15;
  color: #fff;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


/* 5. HYPE KING (REVERSED: GOLD DOMINANT, PURPLE GLOW) */
@keyframes radiantPulseReversed {
  0% {
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.4), inset 0 0 10px rgba(234, 179, 8, 0.2);
    border-color: #facc15;
  }

  50% {
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.5), inset 0 0 30px rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
  }

  100% {
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.4), inset 0 0 10px rgba(234, 179, 8, 0.2);
    border-color: #facc15;
  }
}

@keyframes glassSheen {
  0% {
    transform: translateX(-150%) skewX(-25deg);
    opacity: 0;
  }

  20% {
    opacity: 0.5;
  }

  80% {
    opacity: 0.5;
  }

  100% {
    transform: translateX(250%) skewX(-25deg);
    opacity: 0;
  }
}

@keyframes textGlowReversed {
  0% {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  }

  50% {
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.8), 0 0 40px rgba(234, 179, 8, 0.6);
  }

  100% {
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
  }
}

.card-hype-3 {
  background: linear-gradient(125deg, rgba(80, 50, 0, 0.9), rgba(120, 80, 20, 0.85), rgba(70, 20, 100, 0.8));
  background-size: 200% 200%;
  animation: radiantPulseReversed 3s infinite ease-in-out;
  border: 2px solid #eab308;
}

/* Strong Glass Reflection */
.card-hype-3::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.0) 30%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.0) 70%, transparent 100%);
  transform: skewX(-25deg);
  animation: glassSheen 3.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
  composite-mode: overlay;
}

.card-hype-3 .poster {
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.card-hype-3 .list-score {
  background: linear-gradient(135deg, #eab308, #a855f7);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.6);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.card-hype-3 .rec-title {
  animation: textGlowReversed 3s infinite;
  color: #fff;
}

.card-hype-3 .list-comment {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 20px rgba(234, 179, 8, 0.2);
}

.card-hype-3 .badge-hype {
  background: linear-gradient(90deg, #eab308, #9333ea);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* =========================================
   PROFILE COMPACT MODE (Micro Cards)
   ========================================= */
.profile-compact {
  padding: 8px !important;
  gap: 0 !important;
  min-height: auto !important;
  align-items: center;
  position: relative;
  /* Context for absolute menu */
}

/* Remove Redundant Profile clutter */
.profile-compact .byline {
  display: none !important;
}

.profile-compact .list-card-bottom {
  display: block !important;
  margin-top: 4px !important;
  width: 100% !important;
  /* Fix: prevent shrink-wrapping */
}

.profile-compact .list-card-bottom .list-comment {
  font-size: 13px !important;
  padding: 8px 10px !important;
  -webkit-line-clamp: 2 !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
  /* Fix: Ensure standard full width */
  box-sizing: border-box !important;
  text-align: left;
  /* Optional: ensure text isn't weirdly centered */
}

/* Shrink Poster */
.profile-compact .list-card-top .poster {
  width: 60px !important;
  height: 90px !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

/* Tighten Layout */
.profile-compact .list-card-top {
  gap: 12px !important;
  align-items: flex-start !important;
  /* Move text up */
  width: 100%;
}

/* Text Scaling */
.profile-compact .rec-title {
  font-size: 15px !important;
  margin-top: 4px !important;
  /* Slight buffer from top */
  margin-bottom: 4px !important;
  max-width: 80%;
  /* Leave room for score */
}

/* Micro Right Column - Centered Far Right */
.profile-compact .list-card-right {
  margin-left: auto;
  align-self: center !important;
  /* Fix: Restore vertical centering independently */
  /* Push to far right */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
  padding-right: 36px;
  /* Space for Menu */
  transform: none !important;
  /* Reset scale */
}

/* Score Centering */
.profile-compact .list-score {
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
}

.profile-compact .list-score .score-value {
  font-size: 18px !important;
}

/* 3-Dot Menu Positioning */
.profile-compact .rec-options {
  top: 50% !important;
  transform: translateY(-50%) !important;
  right: 8px !important;
}

.profile-compact .rec-options-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4) !important;
  transition: all 0.2s;
}

.profile-compact .rec-options-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
}

/* FIX: Menu Position for Profile Compact */
.profile-compact .options-menu {
  top: 0 !important;
  right: 100% !important;
  /* Move to the left of the button */
  margin-right: 8px !important;
  /* Space between button and menu */
  margin-top: -10px !important;
  /* Slight vertical adjust to align with center */
  transform-origin: top right !important;
  z-index: 9999 !important;
  /* Force high z-index locally */
}

/* =========================================
   PROFILE 'PILL UNDER POSTER' LAYOUT
   ========================================= */
.profile-compact .poster-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.profile-compact .poster-col .pill {
  /* Style the pill when it lives under the poster */
  font-size: 8px !important;
  padding: 2px 6px !important;
  white-space: nowrap;
  opacity: 0.9;
  border-color: rgba(147, 51, 234, 0.3);
}

/* ============================================================================
   HYPE ROW GLOWS (5 TIERS)
   Distinct border/shadow tints for the poster area
   ============================================================================ */

/* 1. EXTREME HYPE (9.0 - 10.0) -> Purple/Pink Neon */
.card-glow-extreme .poster {
  border: 2px solid rgba(216, 180, 254, 0.8) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.7), 0 0 40px rgba(168, 85, 247, 0.3) !important;
}

/* 2. HIGH HYPE (7.0 - 8.9) -> Blue/Cyan */
.card-glow-high .poster {
  border: 2px solid rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.6) !important;
}

/* 3. MEDIUM HYPE (5.0 - 6.9) -> Green */
.card-glow-medium .poster {
  border: 2px solid rgba(74, 222, 128, 0.8) !important;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.5) !important;
}

/* 4. LOW HYPE (3.0 - 4.9) -> Yellow/Orange */
.card-glow-low .poster {
  border: 2px solid rgba(250, 204, 21, 0.8) !important;
  box-shadow: 0 0 15px rgba(234, 179, 8, 0.5) !important;
}

/* 5. NEUTRAL (5.0 - 6.9) -> Grey (Zinc) */
.card-neutral .poster {
  border: 2px solid rgba(161, 161, 170, 0.6) !important;
  box-shadow: 0 0 10px rgba(113, 113, 122, 0.3) !important;
}

/* 6. NEGATIVE HYPE (0.0 - 4.9) -> Red */
.card-glow-negative .poster,
.card-negative .poster {
  border: 2px solid rgba(248, 113, 113, 0.8) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
}

/* BADGE STYLES Upgrade */
.badge-neutral {
  background: rgba(82, 82, 91, 0.9);
  color: #fff;
  border: 1px solid rgba(161, 161, 170, 0.5);
}

/* ============================================================================
   ROW MANAGER MODAL (Mobile Optimized DnD)
   ============================================================================ */
.row-manager-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease-out;
}

.row-manager-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.row-manager-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row-sort-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  touch-action: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

.row-sort-item.dragging {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.row-handle {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.4);
  cursor: grab;
  padding: 0 10px;
}

/* DIRECT DRAG STYLES (Phase 3) */
.sortable-row {
  touch-action: none;
  /* Critical for mobile drag */
  user-select: none;
  -webkit-user-select: none;
  /* Safari fix */
  -webkit-touch-callout: none;
}

.interactive-title {
  user-select: none;
  -webkit-user-select: none;
}

.dragging-ghost {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.is-dragging {
  opacity: 0 !important;
  pointer-events: none;
}

/* Visual Indicators for Rows */
.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 12px;
}

.dot-extreme {
  background: #d8b4fe;
  box-shadow: 0 0 5px #a855f7;
}

.dot-high {
  background: #facc15;
}

/* Yellow */
.dot-medium {
  background: #facc15;
  opacity: 0.7;
}

/* Yellow Dim */
.dot-positive {
  background: #4ade80;
}

/* Green */
.dot-default {
  background: #94a3b8;
}

/* Reel Grid Item (Fixed for Profile V2) */
.reel-grid-item {
  position: relative !important;
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.reel-grid-item:hover {
  transform: scale(1.02);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* =========================
   TV Season Architecture Styles
   ========================= */

/* Modal Tabs (Override/Variation of main tabs) */
.modal-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.modal-tab {
  background: transparent;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: #a1a1aa;
  cursor: pointer;
  position: relative;
  padding: 8px 12px;
  transition: color 0.2s ease;
}

.modal-tab:hover {
  color: #fff;
}

.modal-tab.active {
  color: var(--primary-purple);
}

.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: -11px;
  /* aligns with border-bottom of container */
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-purple);
  box-shadow: 0 0 8px var(--primary-purple);
}

/* Tab Content Areas */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Season Grid (Grid of Season Posters) */
.season-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.season-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.season-card:hover {
  transform: translateY(-4px);
}

.season-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  object-fit: cover;
  background: #222;
  margin-bottom: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.season-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.season-meta {
  font-size: 11px;
  color: #a1a1aa;
  text-align: center;
}
.season-view-synopsis {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.55;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(147, 51, 234, 0.08);
  border: 1px solid rgba(147, 51, 234, 0.15);
  border-radius: 12px;
}

/* Key Metrics Box for Season Header */
.season-header-metrics {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  align-items: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 10px;
  text-transform: uppercase;
  color: #71717a;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* Episode List */
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.episode-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.episode-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.episode-still {
  width: 120px;
  height: 68px;
  /* 16:9 approx */
  border-radius: 6px;
  object-fit: cover;
  background: #111;
  flex-shrink: 0;
}

.episode-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.episode-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.episode-number {
  font-size: 11px;
  color: var(--primary-purple);
  font-weight: 700;
  margin-right: 6px;
}

.episode-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.episode-date {
  font-size: 11px;
  color: #71717a;
}

.episode-overview {
  font-size: 12px;
  color: #a1a1aa;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.episode-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.episode-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.episode-action-btn:hover {
  background: rgba(147, 51, 234, 0.15);
  color: #fff;
  border-color: var(--primary-purple);
}

.episode-action-btn.active {
  background: var(--primary-purple);
  color: white;
  border-color: transparent;
  box-shadow: 0 0 10px var(--glow-color);
}

.ep-score {
  font-size: 10px;
  font-weight: 700;
  margin-left: 2px;
}

/* Episode Score Box */
.ep-score-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ep-score-box:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.score-val {
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #ffd700;
  /* Gold */
}

/* Toggle Logic: Show Global by Default */
.ep-score-box .score-val.friend {
  display: none;
  color: #a855f7;
  /* Purple for Friends */
}

/* Friend Mode */
.ep-score-box.friend-mode .score-val.global {
  display: none;
}

.ep-score-box.friend-mode .score-val.friend {
  display: block;
}

.score-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

/* ========================================= */
/* EPISODE DETAIL MODAL (V2)                 */
/* ========================================= */

/* Overlay */
.episode-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.episode-modal-overlay.open { opacity: 1; }

/* Modal Container */
.episode-modal {
  width: 100%;
  max-width: 480px;
  max-height: 94vh;
  background: #2b225a;
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: 0 -12px 60px rgba(147, 51, 234, 0.25), 0 -4px 20px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  scrollbar-width: none;
}
.episode-modal::-webkit-scrollbar { display: none; }
.episode-modal-overlay.open .episode-modal { transform: translateY(0); }

.episode-modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}

/* ─── Hero ─── */
.epm-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: #231c4d;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}
.epm-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(43, 34, 90, 0.3) 50%, #2b225a 100%);
  pointer-events: none;
}
.epm-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s;
}
.epm-close:hover { background: rgba(147, 51, 234, 0.4); }
.epm-hero-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary-purple);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(147, 51, 234, 0.4);
}

/* ─── Title Block ─── */
.epm-title-block {
  padding: 0 20px;
  margin-top: -4px;
  position: relative;
  z-index: 2;
}
.epm-title {
  font-size: 22px;
  font-weight: 700;
  color: #f3e8ff;
  margin: 0 0 6px;
  line-height: 1.2;
}
.epm-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  color: var(--ff-muted);
}
.epm-meta-dot {
  margin: 0 6px;
  opacity: 0.4;
}

/* ─── Actions ─── */
.epm-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 12px;
}
/* ─── Unified Score Box in action row ─── */
.epm-score-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.epm-score-label {
  font-size: 12px;
  font-weight: 600;
  color: #f3e8ff;
  white-space: nowrap;
}
.epm-score-sub {
  font-size: 10px;
  color: rgba(243, 232, 255, 0.55);
  white-space: nowrap;
}

/* ─── Body ─── */
.epm-body {
  padding: 0 20px 16px;
}

/* Section styling */
.epm-section {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.epm-section:first-child { border-top: none; }
.epm-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #f3e8ff;
  margin-bottom: 12px;
}
.epm-section-title i {
  font-size: 15px;
  color: var(--light-purple);
}
.epm-count {
  background: var(--subtle-purple);
  color: var(--light-purple);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Overview */
.epm-overview {
  font-size: 14px;
  color: rgba(243, 232, 255, 0.8);
  line-height: 1.6;
  margin: 0;
}

/* Crew Grid */
.epm-crew-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.epm-crew-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.epm-crew-role {
  font-size: 10px;
  font-weight: 600;
  color: var(--light-purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.epm-crew-name {
  font-size: 13px;
  color: rgba(243, 232, 255, 0.8);
}

/* Collapsible */
.epm-collapsible .epm-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}
.epm-chevron {
  transition: transform 0.25s ease;
  font-size: 14px;
  color: var(--ff-muted);
}
.epm-collapsible.collapsed .epm-chevron {
  transform: rotate(-90deg);
}
.epm-section-content {
  margin-top: 12px;
}
.epm-collapsible.collapsed .epm-section-content {
  display: none;
}

/* Gallery (masonry-lite) */
.epm-gallery {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.epm-gallery::-webkit-scrollbar { display: none; }
.epm-gallery-thumb {
  flex-shrink: 0;
  width: 140px;
  height: 80px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.epm-gallery-thumb:hover {
  transform: scale(1.04);
  border-color: var(--border-color);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.2);
}
.epm-gallery-featured {
  width: 200px;
  height: 112px;
}

/* Friend Activity Chips */
.epm-friend-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.epm-friend-list::-webkit-scrollbar { display: none; }
.epm-friend-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.epm-friend-chip:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--border-color);
}
.epm-friend-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.epm-friend-avatar-placeholder {
  background: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.epm-friend-detail {
  display: flex;
  align-items: center;
  gap: 6px;
}
.epm-friend-name {
  font-size: 12px;
  color: #f3e8ff;
  font-weight: 500;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epm-friend-score {
  font-size: 13px;
  font-weight: 700;
}
.epm-friend-watched {
  color: var(--accent-green);
  font-size: 12px;
}
.epm-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--ff-muted);
  font-size: 13px;
}

/* ─── Navigation ─── */
.epm-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(35, 28, 77, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  bottom: 0;
}
.epm-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  color: #f3e8ff;
  cursor: pointer;
  transition: all 0.2s;
  max-width: 42%;
}
.epm-nav-btn i {
  font-size: 16px;
  color: var(--light-purple);
  flex-shrink: 0;
}
.epm-nav-btn:hover {
  background: var(--subtle-purple);
  border-color: var(--border-color);
}
.epm-nav-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.epm-nav-label {
  font-size: 10px;
  color: var(--ff-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.epm-nav-title {
  font-size: 12px;
  font-weight: 500;
  color: #f3e8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.epm-nav-indicator {
  font-size: 11px;
  color: var(--ff-muted);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ─── Reviews ─── */
.epm-review-form {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.epm-review-form-header {
  margin-bottom: 10px;
  font-size: 13px;
}
.epm-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.epm-review-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}
.epm-review-card.epm-review-mine {
  border-color: var(--border-color);
  background: rgba(147, 51, 234, 0.12);
}
.epm-review-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.epm-review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.epm-review-avatar-placeholder {
  background: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.epm-review-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.epm-review-author {
  font-size: 13px;
  font-weight: 600;
  color: #f3e8ff;
}
.epm-review-score-tag {
  font-size: 13px;
  font-weight: 800;
  margin-left: auto;
}
.epm-review-text {
  font-size: 13px;
  color: rgba(243, 232, 255, 0.8);
  line-height: 1.5;
  margin: 0;
}

/* ─── Season Context ─── */
.epm-season-context {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.epm-season-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 70px;
  flex: 1;
}
.epm-season-stat-val {
  font-size: 15px;
  font-weight: 700;
  color: #f3e8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}
.epm-season-stat-label {
  font-size: 10px;
  color: var(--ff-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Episode Photo Lightbox Carousel ─── */
.ep-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.ep-lb-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.ep-lb-close:hover { background: rgba(147, 51, 234, 0.4); }
.ep-lb-counter {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}
.ep-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.ep-lb-arrow:hover { background: rgba(147, 51, 234, 0.35); }
.ep-lb-prev { left: 12px; }
.ep-lb-next { right: 12px; }
.ep-lb-img-wrap {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ep-lb-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  user-select: none;
}

/* ========================================= */
/* PROFILE V2 — COMPACT METRICS + BADGES    */
/* ========================================= */

/* --- BADGE STRIP (rich visual) --- */
.profile-badge-strip-wrap {
  padding: 0 12px;
  margin-top: 4px;
  margin-bottom: 2px;
}
.profile-badge-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0 4px;
}
.profile-badge-strip::-webkit-scrollbar { display: none; }

.badge-strip-empty {
  color: #64748b;
  font-size: 11px;
  padding: 6px 0;
}

/* Badge items with SVG shields */
.badge-strip-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 48px;
}

.badge-strip-shield {
  width: 44px;
  height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.badge-strip-shield:active { transform: scale(0.9); }
.badge-strip-shield svg {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 44px;
}
.badge-strip-emoji {
  position: relative;
  z-index: 2;
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
  margin-top: -2px;
}

.badge-strip-title {
  font-size: 7px;
  font-weight: 600;
  color: #a1a1aa;
  text-align: center;
  line-height: 1.15;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.2px;
}

.badge-rank-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  z-index: 3;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #111014;
  font-family: 'Outfit', sans-serif;
}

.badge-strip-item[data-tier="competitive"] .badge-strip-shield {
  animation: comp-shield-glow 2s ease-in-out infinite alternate;
}
@keyframes comp-shield-glow {
  0% { filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.3)); }
  100% { filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6)); }
}

.badge-strip-viewall {
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #c084fc;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: background 0.2s;
  align-self: center;
}
.badge-strip-viewall:active { background: rgba(124, 58, 237, 0.2); }
.badge-strip-viewall i { font-size: 9px; }

/* --- BADGE MODAL (full-screen overlay) --- */
.badge-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}
.badge-modal-container {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: #111016;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.badge-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.badge-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.badge-modal-title i { color: #fbbf24; }
.badge-modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.badge-modal-body {
  overflow-y: auto;
  padding: 12px 16px 32px;
  scrollbar-width: none;
}
.badge-modal-body::-webkit-scrollbar { display: none; }

/* --- Modal Sections --- */
.badge-modal-section {
  margin-bottom: 20px;
}
.badge-modal-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.badge-modal-section-header i {
  color: #a855f7;
  font-size: 14px;
}
.badge-modal-section-count {
  margin-left: auto;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.badge-modal-section-sub {
  margin-left: auto;
  font-size: 10px;
  color: #fbbf24;
  font-weight: 600;
}

/* --- Modal Grid (wrapping) --- */
.badge-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* --- Modal Badge Item --- */
.badge-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.badge-modal-item:active { background: rgba(255, 255, 255, 0.03); }

.badge-modal-item.locked { opacity: 0.4; }
.badge-modal-item.locked .badge-modal-shield { opacity: 0.35; filter: grayscale(1); }

.badge-modal-shield {
  width: 48px;
  height: 48px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.badge-modal-shield svg {
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 48px;
}

.badge-modal-emoji {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  font-size: 18px;
  line-height: 1;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.badge-modal-item.competitive-badge .badge-modal-shield {
  animation: comp-shield-glow 2s ease-in-out infinite alternate;
}

.badge-rank-pill {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #111014;
  font-family: 'Outfit', sans-serif;
}

.badge-modal-name {
  font-size: 10px;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.2;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-modal-item.locked .badge-modal-name { color: #475569; }

.badge-modal-desc {
  font-size: 8px;
  color: #64748b;
  line-height: 1.2;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-modal-locked-label {
  font-size: 8px;
  color: #475569;
  font-weight: 600;
}
.badge-modal-rank-label {
  font-size: 9px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
}

/* --- Progress Bar (on locked badges) --- */
.badge-progress-bar {
  width: 100%;
  max-width: 56px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}
.badge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  border-radius: 2px;
  transition: width 0.5s ease;
}
.badge-progress-text {
  font-size: 8px;
  color: #64748b;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

/* --- DEEP METRICS BUTTON --- */
.deep-metrics-btn {
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
  margin-left: auto;
}
.deep-metrics-btn:active { background: rgba(139, 92, 246, 0.2); }
.deep-metrics-btn i { font-size: 12px; }

/* --- DEEP METRICS MODAL --- */
.metrics-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  animation: fadeIn 0.2s ease;
}
.metrics-modal-container {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  background: #111016;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
.metrics-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.metrics-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.metrics-modal-title i { color: #a855f7; }
.metrics-modal-body {
  overflow-y: auto;
  padding: 14px 16px 32px;
  scrollbar-width: none;
}
.metrics-modal-body::-webkit-scrollbar { display: none; }

.metrics-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.metrics-modal-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.metrics-modal-val {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.metrics-modal-unit {
  font-size: 10px;
  color: #71717a;
  font-weight: 600;
  margin-left: 2px;
}
.metrics-modal-label {
  font-size: 9px;
  color: #71717a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.metrics-modal-section { margin-top: 4px; }
.metrics-modal-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.metrics-genre-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.metrics-genre-name {
  font-size: 12px;
  color: #d4d4d8;
  font-weight: 600;
  width: 80px;
  flex-shrink: 0;
}
.metrics-genre-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  overflow: hidden;
}
.metrics-genre-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.metrics-genre-count {
  font-size: 11px;
  color: #a1a1aa;
  font-weight: 700;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* ========================================= */
/* MENTIONS DROPDOWN UI                      */
/* ========================================= */

.mentions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-width: 300px;
  background: #18171d;
  border: 1px solid rgba(168, 85, 247, 0.4);
  /* Purple glow border */
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10005;
  overflow: hidden;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 4px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.mention-item:hover,
.mention-item.active {
  background: rgba(168, 85, 247, 0.15);
  /* Purple hover state */
  color: #fff;
}

.mention-item img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #2a2a2a;
}

.mention-highlight {
  color: #a855f7;
  font-weight: 700;
  cursor: pointer;
}
/* =======================================================
   home-list-feed padding is controlled via JS inline style
   (setHomeViewMode sets paddingTop: '50px' to clear the
   ~40px absolute header buttons). CSS rule removed to avoid
   conflicts.
   ======================================================= */

/* =======================================================
   FIX Issue 4b: Consistent glassmorphism + neon borders
   for text-post cards (matches the premium brand feel).
   ======================================================= */
.text-post-card {
  border: 1px solid rgba(147, 51, 234, 0.35) !important;
  box-shadow:
    0 0 0 1px rgba(147, 51, 234, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.text-post-card:hover {
  border-color: rgba(167, 139, 250, 0.6) !important;
  box-shadow:
    0 0 24px rgba(147, 51, 234, 0.18),
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.text-post-action:hover {
  color: #a78bfa !important;
  transform: translateY(-1px);
}

/* =====================================================================
   DESKTOP RESPONSIVE LAYOUT — Full Adaptive (768px+)
   Transforms mobile-first PWA into a full desktop experience
   with sidebar nav, multi-column feeds, split-pane chat, etc.
   ===================================================================== */

/* ---- Tablet Breakpoint (768px - 1023px) ---- */
@media (min-width: 768px) {

  /* Expand the app container */
  #app-container {
    max-width: 100% !important;
    border-left: none;
    border-right: none;
  }

  /* Convert bottom tabs to a left sidebar */
  .tabs {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    width: 72px;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px 0;
    gap: 8px;
    border-bottom: none;
    border-right: 1px solid var(--border-color);
    background: rgba(12, 10, 9, 0.95);
    backdrop-filter: blur(24px);
    overflow-x: visible;
    overflow-y: auto;
    z-index: 200;
  }

  /* Brand mark at top of sidebar */
  .tabs::before {
    content: "🦖";
    display: block;
    text-align: center;
    font-size: 28px;
    padding: 8px 0 16px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
  }

  /* Hide the horizontal sliding indicator — not needed in sidebar */
  .tabs .indicator {
    display: none !important;
  }

  .tab {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 14px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .tab:hover {
    background: rgba(147, 51, 234, 0.15);
  }

  .tab.active {
    background: rgba(147, 51, 234, 0.2);
  }

  /* Offset everything to the right of the sidebar */
  header {
    margin-left: 72px;
  }

  .content {
    margin-left: 72px;
  }

  /* Header gets wider */
  header {
    padding: 16px 24px;
  }

  .content {
    padding: 24px;
  }

  /* Modals scale up */
  .modal-content {
    width: min(720px, 90vw);
  }

  /* Settings modal wider */
  .settings-modal-content {
    max-width: 520px;
    width: 90%;
  }

  /* Chat thread uses more height */
  .chat-thread {
    height: calc(100vh - 160px);
  }

  /* Profile layout — wider stat row */
  .profile-v2-stats {
    gap: 24px;
  }

  .profile-v2-header {
    gap: 20px;
  }

  /* Onboarding — keep overlay full-width, constrain children only */
  #onboarding-screen {
    max-width: none !important;
  }
}

/* ---- Desktop Breakpoint (1024px+) ---- */
@media (min-width: 1024px) {

  /* Sidebar gets labels */
  .tabs {
    width: 220px;
    padding: 20px 12px;
    align-items: stretch;
  }

  .tab {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    justify-content: flex-start;
    gap: 12px;
    font-size: 15px;
  }

  .tab i {
    font-size: 20px;
    width: 24px;
    text-align: center;
  }

  /* Brand text in wider sidebar */
  .tabs::before {
    content: "🦖 FriendRex";
    font-size: 18px;
    font-weight: 700;
    color: #e9d5ff;
    text-align: left;
    padding: 8px 16px 16px;
  }

  /* Show text labels on desktop tabs via CSS */
  .tab::after {
    font-weight: 600;
    color: inherit;
  }
  .tab[data-tab="home"]::after { content: "Home"; }
  .tab[data-tab="search"]::after { content: "Search"; }
  .tab[data-tab="chat"]::after { content: "Chat"; }
  .tab[data-tab="shop"]::after { content: "Shop"; }
  .tab[data-tab="explore"]::after { content: "Reels"; }

  /* Fix "NEW" badge on Shop tab in sidebar layout */
  .tab[data-tab="shop"] span {
    position: static !important;
    margin-left: 6px;
    vertical-align: middle;
  }

  /* Offset content for wider sidebar */
  header {
    margin-left: 220px;
    padding: 16px 32px;
  }

  .content {
    margin-left: 220px;
    padding: 24px 32px;
    max-width: 1200px;
  }

  /* Home feed — 2 column grid for list view */
  #home .home-list-feed,
  #home .home-grid-feed {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Keep full-width for certain elements inside home feed */
  #home .home-list-feed > .section-header,
  #home .home-list-feed > h2,
  #home .home-grid-feed > .section-header,
  #home .home-grid-feed > h2 {
    grid-column: 1 / -1;
  }

  /* Chat — split pane layout (only when active) */
  #chat.active {
    display: grid !important;
    grid-template-columns: 340px 1fr;
    gap: 0;
    height: calc(100vh - 80px);
    overflow: hidden;
  }

  /* Chat list pane (left side) */
  #chat .chat-list-pane {
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    height: 100%;
    padding: 16px;
  }

  /* Chat thread pane (right side) */
  #chat .chat-thread-pane {
    overflow-y: auto;
    height: 100%;
  }

  /* Chat thread fills right pane */
  .chat-thread {
    height: 100% !important;
    padding: 0 16px;
  }

  /* Hide back button on desktop — list is always visible */
  .chat-back-btn {
    display: none;
  }

  /* Profile — wider layout */
  .profile-v2 {
    max-width: 800px;
    margin: 0 auto;
  }

  .profile-v2-header {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

  .profile-v2-avatar {
    width: 120px !important;
    height: 120px !important;
  }

  .profile-v2-stats {
    gap: 32px;
  }

  .profile-v2-controls {
    flex-direction: row;
    gap: 12px;
  }

  /* Settings modal wider with 2-column sections */
  .settings-modal-content {
    max-width: 640px;
  }

  /* Onboarding — keep overlay full-width, constrain children only */
  #onboarding-screen {
    max-width: none !important;
  }

  /* Modals wider on desktop */
  .modal-content {
    width: min(800px, 85vw);
    max-height: 85vh;
  }

  /* Posts feed — cards have more room */
  .text-post-card {
    max-width: 100%;
  }

  /* Search section */
  #search {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Shop section */
  #shop {
    max-width: 900px;
    margin: 0 auto;
  }
}

/* ---- Wide Desktop (1440px+) ---- */
@media (min-width: 1440px) {

  .content {
    max-width: 1400px;
    padding: 28px 48px;
  }

  /* Home feed — 3 columns */
  #home .home-list-feed,
  #home .home-grid-feed {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px;
  }

  /* Chat — wider list pane */
  #chat.active {
    grid-template-columns: 400px 1fr !important;
  }

  /* Profile uses full width better */
  .profile-v2 {
    max-width: 1000px;
  }

  /* Settings 2-column layout */
  .settings-modal-content {
    max-width: 750px;
  }

  /* Wider modals */
  .modal-content {
    width: min(900px, 80vw);
  }
}

/* ---- Ultra-wide (1920px+) ---- */
@media (min-width: 1920px) {

  /* Sidebar grows a bit */
  .tabs {
    width: 260px;
  }

  header {
    margin-left: 260px;
  }

  .content {
    margin-left: 260px;
    max-width: 1600px;
  }

  /* Home — 4 columns for ultra-wide */
  #home .home-list-feed,
  #home .home-grid-feed {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Chat wider list */
  #chat.active {
    grid-template-columns: 460px 1fr !important;
  }
}

/* ---- Reels section — always full-screen mobile layout ---- */
@media (min-width: 768px) {
  #explore {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Reels should use full available height */
  #explore .reels,
  #explore .reels-container {
    height: calc(100vh - 80px);
  }
}

/* ---- Desktop hover states (mouse users) ---- */
@media (hover: hover) {
  .chat-row:hover {
    background: rgba(147, 51, 234, 0.08);
    cursor: pointer;
  }

  .btn:hover {
    transform: translateY(-1px);
  }

  .text-post-card:hover {
    transform: translateY(-2px);
  }
}

/* ---- Legal/Static pages desktop ---- */
@media (min-width: 768px) {
  /* community-guidelines.html, privacy.html, terms.html */
  /* These already have max-width:800px and auto margin,
     but ensure comfortable reading width */
  body:has(> h1:first-of-type) {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
  }
}

/* ---- Creator Studio desktop ---- */
@media (min-width: 1024px) {
  #creator-dashboard {
    max-width: 900px;
    margin: 0 auto;
  }

  /* Admin panel wider */
  #admin-panel,
  .admin-panel {
    max-width: 1000px;
    margin: 0 auto;
  }
}

/* ---- Onboarding desktop centering ---- */
@media (min-width: 768px) {
  #onboarding-screen {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px !important;
    /* Never constrain the overlay itself — it must cover the full viewport */
    max-width: none !important;
    width: 100% !important;
  }

  #onboarding-screen > div {
    max-width: 520px;
    width: 100%;
  }
}

/* ---- Friends panel desktop ---- */
@media (min-width: 1024px) {
  #friends-panel-wrap {
    max-width: 700px;
    margin: 0 auto;
  }
}

/* ---- Rex AI panel desktop ---- */
@media (min-width: 768px) {
  .rex-overlay,
  #rex-modal {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 20px;
    height: auto;
    max-height: 85vh;
  }
}

/* ---- Notification panel desktop ---- */
@media (min-width: 768px) {
  #inbox,
  .notifications-panel {
    max-width: 600px;
    margin: 0 auto;
  }
}

/* ---- Community Mod Panel desktop ---- */
@media (min-width: 1024px) {
  #mod-panel-modal > div {
    max-width: 800px;
    border-radius: 16px;
    margin: 40px auto;
    overflow: hidden;
  }
}

/* ---- Scrollbar styling for desktop ---- */
@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
  }

  ::-webkit-scrollbar-thumb {
    background: rgba(147, 51, 234, 0.3);
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: rgba(147, 51, 234, 0.5);
  }
}
