/* ==============================================================================
   JACK PIRATES // OFFICIAL CLAN & ESPORTS WEB APP
   Design System: Pure Solid OLED Black (#000000) Dashboard Standard
   Executive Monochrome Aesthetic • 100% Circular Avatars • Zero AI Badges
   Matches apps/dashboard/frontend/src/styles/design-system.css exactly
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ─── GLOBAL COMPLETE SCROLLBAR HIDE (all platforms, WebKit, Gecko, Blink) ─── */
/* Hide scrollbar indicators everywhere — touch/wheel/swipe scrolling remains 100% functional */
html,
body,
*,
*::before,
*::after {
  scrollbar-width: none !important;          /* Firefox & modern Chromium */
  -ms-overflow-style: none !important;       /* IE / Edge legacy */
}

::-webkit-scrollbar,
*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;                  /* Chrome, Safari, WebKit WebView (APK) */
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button,
*::-webkit-scrollbar-button,
::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  display: none !important;
  background: transparent !important;
  border: none !important;
  width: 0 !important;
  height: 0 !important;
}

:root {
  /* ⬛ Pure Solid OLED Palette */
  --bg-base: #000000;
  --bg-surface: #0A0A0A;
  --bg-surface-elevated: #111111;
  --bg-surface-hover: #171717;
  --bg-surface-active: #202020;

  /* ⚡ Hairline Zinc Borders */
  --border-subtle: #1F1F1F;
  --border-default: #2A2A2A;
  --border-strong: #383838;
  --border-focus: #FFFFFF;

  /* 🔤 Strict Optical Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --text-disabled: #52525B;

  /* 💎 Monochrome Standard & Functional Accents */
  --primary: #FFFFFF;
  --primary-fg: #000000;
  --primary-hover: #E4E4E7;
  --primary-subtle: rgba(255, 255, 255, 0.08);

  --emerald: #10B981;
  --amber: #F59E0B;
  --crimson: #EF4444;

  /* 📐 Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-round: 50%;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.8);
  --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.95);

  --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
}

/* Universal Scrollbar Elimination (No side indicators, natural scrolling) */
::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  display: none !important;
  background: transparent !important;
  border: none !important;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* ==============================================================================
   AVATARS & PROFILE FRAMES (100% CIRCULAR EVERYWHERE)
   ============================================================================== */
.avatar-round,
.user-avatar-wrap,
.user-avatar-wrap img,
.dm-thread-avatar,
.chat-sender-avatar,
.roster-player-avatar,
.dm-recipient-avatar,
.picker-member-avatar,
.chat-header-avatar {
  border-radius: 50% !important;
  object-fit: cover !important;
  aspect-ratio: 1 / 1 !important;
}

/* ==============================================================================
   MASTER APP SHELL (Sliding Drawer Navigation + Content Viewport)
   ============================================================================== */

#app-root {
  display: flex;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  position: relative;
  background-color: var(--bg-base);
  overflow: hidden;
}

/* ─── 1. SLIDING NAVIGATION DRAWER (260px) ─── */
.app-nav-drawer {
  width: 260px;
  min-width: 260px;
  height: 100%;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform var(--transition-normal);
}

.drawer-header {
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: #000000;
}

.drawer-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-default);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

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

.brand-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Nav Items Container (ZERO colored bandages/badges) */
.drawer-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 10px 4px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-surface-elevated);
  color: #ffffff;
}

.nav-item:active {
  transform: scale(0.99);
}

.nav-item.active {
  background: var(--bg-surface-active);
  color: #ffffff;
  border-left: 3px solid #ffffff;
  font-weight: 700;
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.nav-item.active .nav-item-icon {
  color: #ffffff;
}

/* User Dock at Bottom of Drawer */
.drawer-user-dock {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #000000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.user-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

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

.user-dock-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dock-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ─── 2. MAIN APPLICATION PANE ─── */
.app-main-pane {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
}

/* Top App Bar Header (Quiet, Executive Monochrome) */
.app-top-header {
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  z-index: 20;
}

/* Hide top app header completely when a DM conversation is active */
body.dm-conversation-active .app-top-header {
  display: none !important;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.drawer-hamburger-btn:hover {
  background: var(--bg-surface-elevated);
}

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

.header-section-title {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-section-title svg {
  width: 18px;
  height: 18px;
  color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Header Icon Button (Search / Action) - Completely borderless, no box */
.header-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.header-icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.12);
}

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

/* In-place Animated Search Overlay (Smoothly replaces header on DM tab) */
.header-search-overlay {
  position: absolute;
  inset: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.24s;
  z-index: 25;
}

/* Completely borderless back button, no box */
.header-search-back-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.header-search-back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.header-search-back-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.12);
}

.header-search-back-btn svg {
  width: 20px;
  height: 20px;
}

/* Completely seamless search input area - no box / no border */
.header-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  height: 100%;
  gap: 10px;
}

.header-search-lens-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-search-lens-icon svg {
  width: 17px;
  height: 17px;
}

.header-search-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  min-width: 0;
  padding: 0;
}

.header-search-input-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.header-search-clear-cross {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.header-search-clear-cross:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* State when DM Search is active */
.app-top-header.dm-search-active .header-left {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.app-top-header.dm-search-active .header-right {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
}

.app-top-header.dm-search-active .header-search-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ─── 3. VIEW CONTAINER ─── */
.app-view-viewport {
  flex: 1;
  width: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view-page-slide {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: viewFadeIn var(--transition-normal) forwards;
}

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

/* ─── 4. CARDS & SECTIONS (SOLID OLED BLACK DASHBOARD STYLE) ─── */
.card-enterprise {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  transition: border-color var(--transition-fast);
}

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

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

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Metrics 4-Col Grid */
.metrics-quad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.metric-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.metric-val {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

/* ==============================================================================
   4B. MOBILE HOME / OVERVIEW OPERATIONS SYSTEM
   ============================================================================== */
.overview-operator-hero {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(9, 9, 12, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  min-height: fit-content;
}

.overview-operator-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.overview-operator-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.overview-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.overview-avatar-img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.overview-operator-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.overview-operator-role {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #FACC15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.3;
}

.overview-operator-name {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.overview-operator-uid {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.overview-profile-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.overview-profile-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Quick Actions 4-Column Dock */
.overview-quick-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.quick-dock-btn {
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.quick-dock-btn:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.quick-dock-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quick-dock-btn.cart .quick-dock-icon {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.quick-dock-btn.battles .quick-dock-icon {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.quick-dock-btn.synergy .quick-dock-icon {
  color: #FACC15;
  background: rgba(250, 204, 21, 0.1);
  border-color: rgba(250, 204, 21, 0.25);
}

.quick-dock-btn.chat .quick-dock-icon {
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
}

.quick-dock-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #E4E4E7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}



/* ==============================================================================
   Overview: 24-Hour Discord Announcements Feed (#clan-updates & #announcements)
   ============================================================================== */
.overview-announcements-section {
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-announcements-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.announcements-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.announcements-live-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.announcements-sync-indicator {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #71717A;
  display: flex;
  align-items: center;
  gap: 4px;
}

.overview-announcements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcement-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.2s ease;
}

.announcement-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.announcement-card.clan-updates {
  border-left: 3px solid #8B5CF6;
}

.announcement-card.announcements {
  border-left: 3px solid #F59E0B;
}

.announcement-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.announcement-channel-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.announcement-channel-pill.clan-updates {
  background: rgba(139, 92, 246, 0.14);
  color: #C4B5FD;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.announcement-channel-pill.announcements {
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.announcement-expiry-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #A1A1AA;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.announcement-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.announcement-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.announcement-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.announcement-posted-time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #71717A;
}

.announcement-content-text {
  font-size: 13px;
  line-height: 1.55;
  color: #E4E4E7;
  word-break: break-word;
}

.announcement-content-text strong {
  color: #FFFFFF;
}

.announcement-content-text a {
  color: #38BDF8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ann-mention-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #818CF8;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.ann-discord-emoji {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  display: inline-block;
}

.announcement-media-preview {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0A0A0A;
  cursor: pointer;
}

.announcement-media-img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  display: block;
}

.announcement-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
}

.announcement-seen-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.announcement-seen-badge.pulse-view {
  transform: scale(1.08);
  background: rgba(16, 185, 129, 0.25);
}

.announcement-discord-link {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #71717A;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.announcement-discord-link:hover {
  color: #A1A1AA;
}

.announcements-refresh-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #A1A1AA;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.announcements-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.announcements-refresh-btn.rotating svg {
  animation: spin 0.8s linear infinite;
}

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

.announcements-empty-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.announcements-empty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.announcements-empty-tags {
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcements-active-status {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #10B981;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.announcements-empty-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #A1A1AA;
}

.announcements-empty-desc strong {
  color: #FFFFFF;
}

.announcements-empty-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.announcements-tracker-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #71717A;
}

.announcements-empty-box {
  padding: 16px;
  text-align: center;
  color: #71717A;
  font-size: 12px;
  border-radius: 10px;
  background: #000000;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.announcements-empty-box.compact {
  padding: 10px 14px;
  flex-direction: row;
  justify-content: space-between;
  text-align: left;
}

/* Active Clan Battle Mission Radar */
.overview-mission-radar {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06) 0%, rgba(9, 9, 12, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-mission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overview-mission-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-mission-title-wrap svg {
  width: 18px;
  height: 18px;
  color: #EF4444;
  flex-shrink: 0;
}

.overview-progress-track {
  height: 8px;
  background: #18181B;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.overview-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #EF4444, #F59E0B);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.overview-mission-stats-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Top Pirate Leaderboard Rows */
.overview-top-pirate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.overview-top-pirate-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

/* Store Spotlight Quick Gateway */
.overview-store-spotlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(9, 9, 12, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.overview-store-spotlight:hover {
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}


/* ==============================================================================
   5. DIRECT MESSAGES (DMs) & 2-PERSON CHAT LAYOUT (LEFT / RIGHT)
   ============================================================================== */
.dm-layout-shell {
  flex: 1;
  display: flex;
  height: 100%;
  overflow: hidden;
  background: #000000;
}

.dm-sidebar-threads {
  width: 280px;
  min-width: 280px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

.dm-threads-header {
  height: 52px;
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  background: #000000;
}

.dm-threads-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-thread-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  position: relative;
  transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, background-color;
  -webkit-tap-highlight-color: transparent;
}

/* Smooth Tap / Press Animation */
.dm-thread-item:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.05);
}

.dm-thread-item:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Minimalist Single-Color Active Highlight (Smooth, elegant, zero bloat) */
.dm-thread-item.active {
  background: rgba(255, 255, 255, 0.07);
}

.dm-thread-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  object-fit: cover;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: transform 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.dm-thread-item:active .dm-thread-avatar {
  transform: scale(0.96);
}

.dm-thread-meta {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dm-thread-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dm-thread-preview {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* DM Active Conversation Pane */
.dm-conversation-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #000000;
  overflow: hidden;
}

.dm-chat-header {
  height: 54px;
  min-height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.dm-recipient-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dm-recipient-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.dm-recipient-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

/* 2-Person Chat Stream - COMPACT, MINIMAL, MAXIMUM CONTENT CONTEXT */
.dm-messages-stream {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior-x: none !important;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Full-width row block: Entire screen width is touchable & swipeable on phones */
.dm-row-block {
  width: 100%;
  max-width: 100%;
  position: relative;
  display: flex;
  padding: 1px 4px;
  box-sizing: border-box;
  touch-action: pan-y;
  user-select: none;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
}

.dm-row-block.sent {
  justify-content: flex-end;
}

.dm-row-block.received {
  justify-content: flex-start;
}

/* Message Bubble Wrapper - BUBBLE-FREE MINIMAL LAYOUT */
.dm-bubble-row {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 86%;
  margin: 0;
  will-change: transform;
  z-index: 2;
  box-sizing: border-box;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
  background: transparent !important;
  border: none !important;
}

/* ME (Current User) - Aligned to the RIGHT */
.dm-bubble-row.sent {
  align-items: flex-end;
  text-align: right;
}

/* OTHER PERSON - Aligned to the LEFT */
.dm-bubble-row.received {
  align-items: flex-start;
  text-align: left;
}

/* Ultra-Clean, Bubble-Free Minimal Text */
.dm-bubble-body {
  padding: 2px 2px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.44;
  word-break: break-word;
  position: relative;
  min-height: fit-content !important;
  box-sizing: border-box;
  display: inline-block;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.dm-bubble-row.sent .dm-bubble-body {
  color: #FFFFFF;
}

.dm-bubble-row.received .dm-bubble-body {
  color: #D4D4D8;
}

/* Reply quote snippet in bubble-free layout */
.dm-bubble-row .reply-quote-snippet {
  background: transparent;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  padding: 1px 0 2px 8px;
  margin-bottom: 3px;
  font-size: 11px;
  color: #71717A;
  text-align: left;
}

.dm-bubble-row.sent .reply-quote-snippet {
  border-left-color: rgba(255, 255, 255, 0.35);
}

/* DM Option 1: Clean text receipt ONLY on the very last sent message */
.dm-last-status-label {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  margin-top: 3px;
  margin-right: 2px;
  user-select: none;
  letter-spacing: 0.15px;
  line-height: 1.2;
  color: #E4E4E7;
}

.dm-last-status-label.status-sent,
.dm-last-status-label.status-delivered {
  color: #E4E4E7;
}

.dm-last-status-label.status-seen {
  color: #FFFFFF;
  font-weight: 600;
}

/* Completely eliminate separate legacy bottom status row and inline dots */
.dm-bubble-status,
.dm-inline-status {
  display: none !important;
}

/* DM Date/Time Conversation Cluster Dividers */
.dm-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 12px 0 6px 0;
  position: relative;
  user-select: none;
  pointer-events: none;
}

.dm-date-pill {
  display: block;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #71717A;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1.2;
}

.dm-bubble-time {
  display: none;
}

/* ============================================================================
   DISCORD-STYLE RIGHT-CLICK CONTEXT MENU (ON ANY DM OR ANY MSG)
   ============================================================================ */
#chat-context-menu {
  position: fixed;
  display: none;
  z-index: 99999;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.92);
  min-width: 210px;
  max-width: 260px;
  padding: 6px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: ctxMenuIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@keyframes ctxMenuIn {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Context Menu Timestamp Header */
.ctx-timestamp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 8px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #A1A1AA;
}

.ctx-timestamp-header svg {
  color: #71717A;
  flex-shrink: 0;
}

/* Quick Reaction Emojis Row (Top of Menu) */
.ctx-reaction-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px;
  background: #18191C;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  margin-bottom: 6px;
}

.ctx-reaction-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ctx-reaction-btn:hover {
  background: #27272A;
  transform: scale(1.2);
}

/* Menu Action Row Items */
.ctx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #E4E4E7;
  border-radius: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.ctx-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctx-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #A1A1AA;
  stroke-width: 2;
  transition: color var(--transition-fast);
}

.ctx-item:hover {
  background: #27272A;
  color: #FFFFFF;
}

.ctx-item:hover svg {
  color: #FFFFFF;
}

.ctx-item.danger {
  color: #F87171;
}

.ctx-item.danger svg {
  color: #F87171;
}

.ctx-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #FF6B6B;
}

.ctx-item.danger:hover svg {
  color: #FF6B6B;
}

.ctx-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 4px;
}

/* 3-Dots Button Eliminated (Gestures: Long-Press on Mobile & Right-Click on PC) */
.msg-more-btn {
  display: none !important;
}

/* Inline Message Editor */
.msg-inline-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin: 4px 0;
}

.msg-inline-edit-input {
  background: #111111;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: #FFFFFF;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  width: 100%;
}

.msg-inline-edit-input:focus {
  border-color: #52525B;
}

.msg-inline-edit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.msg-edited-tag {
  font-size: 10px;
  color: #71717A;
  margin-left: 6px;
  font-style: italic;
  font-family: var(--font-mono);
}

/* Reactions Display Pills Under Bubble */
.msg-reactions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.reaction-pill {
  background: #111111;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2px 7px;
  font-size: 11px;
  color: #D4D4D8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.reaction-pill:hover {
  border-color: var(--border-default);
  background: #171717;
}

.reaction-pill.reacted {
  background: rgba(255, 255, 255, 0.12);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* Reply Quote Snippet Inside Bubble */
.reply-quote-snippet {
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid #71717A;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #A1A1AA;
}

.reply-quote-author {
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

/* ============================================================================
   ULTRA-COMPACT REPLY PREVIEW BAR (DISCORD / TELEGRAM STYLE)
   ============================================================================ */
.reply-preview-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #111113;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #5865F2;
  padding: 4px 12px;
  min-height: 26px;
  font-size: 11px;
  color: #A1A1AA;
  box-sizing: border-box;
  animation: replyBarIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reply-preview-bar.active {
  display: flex;
}

.reply-preview-left {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.reply-preview-bar svg {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0;
  color: #5865F2;
  stroke-width: 2.2;
}

.reply-preview-text {
  font-size: 11px;
  color: #D4D4D8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-preview-text strong {
  color: #FFFFFF;
  font-weight: 600;
}

.reply-preview-cancel {
  background: transparent;
  border: none;
  color: #71717A;
  cursor: pointer;
  font-size: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.reply-preview-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* ============================================================================
   SWIPE-TO-REPLY STYLES (FULL CHAT BLOCK SLIDE RIGHT-TO-LEFT)
   ============================================================================ */
.dm-row-block,
.chat-bubble-card {
  position: relative;
  touch-action: pan-y;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
}

.swipe-reply-indicator {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%) scale(0.6);
  opacity: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #27272A;
  color: #A1A1AA;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  z-index: 1;
}

.swipe-reply-indicator svg {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.2;
}

.swipe-reply-indicator.ready {
  background: #5865F2;
  color: #FFFFFF;
  transform: translateY(-50%) scale(1.15);
  box-shadow: none;
}

/* Explicitly disable all scrollbar indicators globally in chat & DMs */
.dm-messages-stream,
.chat-messages-area,
.chat-container-layout,
.dm-layout-shell,
.dm-conversation-pane,
.dm-threads-scroll {
  overflow-x: hidden !important;
  overscroll-behavior-x: none !important;
  max-width: 100% !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.dm-messages-stream::-webkit-scrollbar,
.chat-messages-area::-webkit-scrollbar,
.chat-container-layout::-webkit-scrollbar,
.dm-layout-shell::-webkit-scrollbar,
.dm-conversation-pane::-webkit-scrollbar,
.dm-threads-scroll::-webkit-scrollbar,
#app-root::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
  height: 0px !important;
  width: 0px !important;
}

/* DM Input Dock - Pure OLED Black & Crisp Border */
.dm-input-dock {
  border-top: 1px solid #27272A;
  background: #000000;
  display: flex;
  flex-direction: column;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
}

.dm-input-form {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.dm-input-box-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #141416;
  border: 1px solid #3F3F46;
  border-radius: 22px;
  padding: 4px 8px 4px 14px;
  min-height: 42px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dm-input-box-wrap:focus-within {
  border-color: #71717A;
  background: #18181C;
}

.dm-input-box {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF !important;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 0;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  overflow-y: auto;
  box-sizing: border-box;
  caret-color: #FFFFFF;
}

.dm-input-box::placeholder {
  color: #A1A1AA !important;
  font-weight: 400;
}

/* ─── 6. CLAN LIVE CHAT & JACK AI ─── */
.chat-container-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #000000;
  overflow: hidden;
}

.chat-messages-area {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.chat-stream-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 8px;
}

/* Discord Stream Row: Clean, no card/box, no speech bubble */
.chat-bubble-card {
  display: flex;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transition: background 0.12s ease;
  position: relative;
  flex-shrink: 0 !important;
  min-height: fit-content !important;
  box-sizing: border-box;
}

.chat-bubble-card:hover {
  background: rgba(255, 255, 255, 0.035) !important;
}

.chat-sender-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50% !important;
  object-fit: cover;
  background: #18181B;
  border: none !important;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.chat-meta-bar {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.2;
}

.chat-sender-name {
  font-size: 14px;
  font-weight: 600;
  color: #F2F3F5;
  cursor: pointer;
}

.chat-sender-name:hover {
  text-decoration: underline;
}

.chat-bot-badge {
  background: #5865F2;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  margin-left: 2px;
  letter-spacing: 0.02em;
  display: inline-block;
  line-height: 1.2;
  vertical-align: middle;
}

.chat-timestamp {
  font-size: 11px;
  font-weight: 400;
  color: #71717A;
  font-family: inherit;
}

.chat-message-text {
  font-size: 14px;
  color: #DBDEE1;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble-card .reply-quote-snippet {
  background: transparent;
  border-left: 2px solid #4E5058;
  padding: 2px 8px;
  border-radius: 0;
  margin-bottom: 3px;
  font-size: 12px;
  color: #949BA4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-bubble-card .reply-quote-author {
  font-weight: 600;
  color: #E4E4E7;
  margin-bottom: 0;
}

.chat-bubble-card .msg-more-btn {
  right: 12px;
  top: 4px;
  background: #27272A;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.chat-input-bar-dock {
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
  border-top: 1px solid #27272A;
  background: #000000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  z-index: 20;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  gap: 8px;
  width: 100%;
}

.chat-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF !important;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 0;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  overflow-y: auto;
  box-sizing: border-box;
  caret-color: #FFFFFF;
}

.chat-input-field::placeholder {
  color: #A1A1AA !important;
  font-weight: 400;
}

.chat-send-action-btn {
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background-color var(--transition-fast);
}

.chat-send-action-btn:hover {
  background: #E4E4E7;
}

.chat-send-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ─── ENTERPRISE CARDS & HEADERS ─── */
.card-enterprise {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

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

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.card-subtext {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── 7. CLAN ROSTER & LEADERBOARD TABLE ─── */
.table-wrapper-enterprise {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

.table-header-bar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000000;
}

.roster-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.roster-row-item:last-child {
  border-bottom: none;
}

.roster-row-item:hover {
  background: var(--bg-surface-elevated);
}

.roster-rank-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  color: var(--text-muted);
}

.rank-gold { color: var(--amber); }
.rank-silver { color: #E4E4E7; }
.rank-bronze { color: #D97706; }

.roster-player-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.roster-player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  object-fit: cover;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  flex-shrink: 0;
}

.roster-ign {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
}

.roster-uid {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.roster-score {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

/* ─── 8. BUTTONS & CONTROLS ─── */
.btn-zinc {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-zinc:hover {
  background: var(--bg-surface-active);
  border-color: var(--border-strong);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: #E4E4E7;
}

/* ─── 9. STORE CARDS (MINIMALIST OLED AESTHETIC) ─── */

.store-category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 14px;
  scrollbar-width: none;
}
.store-category-bar::-webkit-scrollbar {
  display: none;
}

.store-cat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.store-cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.store-cat-pill.active {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
}

.store-packs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

@media (max-width: 440px) {
  .store-packs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.pack-card {
  position: relative;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.pack-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.8);
}

.pack-card.pack-oos {
  opacity: 0.55;
}

/* Pack Badge */
.pack-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border-radius: 99px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  z-index: 2;
  text-transform: uppercase;
}

/* Pack Visual Area */
.pack-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  margin: 6px 0 10px 0;
  position: relative;
}

.pack-visual img {
  max-height: 82px;
  max-width: 110px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.85));
  transition: transform 0.3s ease;
}

.pack-card:hover .pack-visual img {
  transform: scale(1.06);
}

/* UC Amount Row */
.pack-uc-total {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.uc-currency-icon {
  width: 17px;
  height: 17px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.pack-uc-amount {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.pack-bonus-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pack-bonus-chip {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 9px;
}

/* Price & Button Footer */
.pack-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pack-pricing {
  display: flex;
  flex-direction: column;
}

.pack-price-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
}

.pack-rate-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
}

.pack-buy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pack-card:hover .pack-buy-btn {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
}

.pack-buy-btn.oos {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

/* Store Checkout Dialog */
.store-checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.store-checkout-overlay.active {
  opacity: 1;
  visibility: visible;
}

.store-checkout-modal {
  width: 100%;
  max-width: 440px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px 20px 0 0;
  padding: 22px 18px 30px 18px;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

@media (min-width: 600px) {
  .store-checkout-overlay {
    align-items: center;
    padding: 20px;
  }
  .store-checkout-modal {
    border-radius: 20px;
    transform: scale(0.95);
  }
  .store-checkout-overlay.active .store-checkout-modal {
    transform: scale(1);
  }
}

.store-checkout-overlay.active .store-checkout-modal {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.95);
}

/* ─── 10. MOBILE OVERLAY & BOTTOM NAV DOCK ─── */
.mobile-backdrop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 35;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal) ease, visibility var(--transition-normal) ease;
}

.mobile-backdrop-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ─── CLAN ACTIVITY TOP PILL TOGGLE ─── */
.clan-activity-pill-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #09090b;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 25;
}

.clan-activity-pill-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #71717a;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.clan-activity-pill-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}

.clan-activity-pill-btn:hover {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.03);
}

.clan-activity-pill-btn:active {
  transform: scale(0.98);
}

.clan-activity-pill-btn.active {
  color: #ffffff;
  background: #18181b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.mobile-bottom-dock {
  display: none;
  height: 56px;
  background: #000000;
  border-top: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  padding: 0 4px;
}

.bottom-dock-tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}

.bottom-dock-tab:hover {
  color: #d4d4d8;
}

.bottom-dock-tab:active {
  transform: scale(0.94);
}

.bottom-dock-tab.active {
  color: #ffffff;
}

.bottom-dock-tab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.bottom-dock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Responsive Media Queries */
@media (max-width: 860px) {
  .app-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    height: 100dvh;
    z-index: 105;
    transform: translateX(-100%);
    box-shadow: 16px 0 36px rgba(0, 0, 0, 0.95);
  }

  .app-nav-drawer.open {
    transform: translateX(0);
  }

  .mobile-backdrop-overlay {
    z-index: 102;
  }

  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    z-index: 100;
    flex-shrink: 0;
    background: #000000;
    border-top: 1px solid var(--border-subtle);
    padding-left: 2px;
    padding-right: 2px;
    align-items: center;
    justify-content: space-around;
  }

  .view-page-slide {
    padding: 14px;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .chat-container-layout {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .dm-layout-shell {
    position: relative;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  body.dm-conversation-active .mobile-bottom-dock {
    display: none !important;
  }

  body.dm-conversation-active .dm-layout-shell {
    padding-bottom: 0 !important;
  }

  .dm-sidebar-threads {
    width: 100%;
    min-width: 100%;
  }

  .dm-layout-shell.chat-open .dm-sidebar-threads {
    display: none;
  }

  .dm-layout-shell.chat-open .dm-conversation-pane {
    display: flex;
  }

  .dm-conversation-pane {
    display: none;
    width: 100%;
  }

  .dm-mobile-back-btn {
    display: flex !important;
  }
}

@media (max-width: 420px) {
  .overview-operator-hero {
    padding: 12px;
    gap: 10px;
  }

  .overview-avatar-img {
    width: 42px;
    height: 42px;
  }

  .overview-operator-name {
    font-size: 14px;
  }

  .overview-profile-trigger-btn {
    padding: 5px 8px;
    font-size: 10px;
  }
}

.dm-mobile-back-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50% !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 6px;
}

/* Toast Alert Notification */
#jack-toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all var(--transition-fast);
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Custom Emoji / Stickers Rendered in Chat */
.chat-custom-emoji {
  max-width: 220px;
  max-height: 160px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  margin: 4px 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   DISCORD-STYLE RICH TEXT & MARKDOWN FORMATTING
   ============================================================================ */

/* 1. Spoilers (||secret||) */
.chat-spoiler {
  background: #27272A;
  color: transparent !important;
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  display: inline-block;
  vertical-align: baseline;
  position: relative;
}

.chat-spoiler:hover {
  background: #3F3F46;
}

.chat-spoiler.revealed {
  background: rgba(255, 255, 255, 0.08);
  color: inherit !important;
  user-select: text;
}

/* 2. Headings (#, ##, ###) */
.chat-h1 {
  font-size: 1.4em;
  font-weight: 800;
  color: #FFFFFF;
  margin: 4px 0 2px 0;
  line-height: 1.25;
}

.chat-h2 {
  font-size: 1.22em;
  font-weight: 700;
  color: #FFFFFF;
  margin: 3px 0 2px 0;
  line-height: 1.3;
}

.chat-h3 {
  font-size: 1.08em;
  font-weight: 700;
  color: #E4E4E7;
  margin: 2px 0 1px 0;
  line-height: 1.35;
}

/* 3. Inline Code (`code`) */
.chat-inline-code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11.5px;
  background: #18181B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
  color: #F4F4F5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 4. Multiline Code Block (```lang ... ```) */
.chat-code-block {
  background: #0B0B0C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin: 6px 0;
  overflow: hidden;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  display: flex;
  flex-direction: column;
}

.chat-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  background: #18181B;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chat-code-copy-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #A1A1AA;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.chat-code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.chat-code-block pre {
  margin: 0;
  padding: 8px 10px;
  overflow-x: auto;
  color: #E4E4E7;
  line-height: 1.45;
  tab-size: 2;
}

/* 5. Blockquotes (> text) */
.chat-blockquote {
  margin: 4px 0;
  padding: 2px 0 2px 10px;
  border-left: 3px solid #52525B;
  color: #A1A1AA;
  font-style: italic;
  display: block;
}

/* 6. User Mention Pills (@user) */
.chat-mention {
  background: rgba(88, 101, 242, 0.18);
  color: #C9CDFB;
  border-radius: 4px;
  padding: 1px 6px;
  font-weight: 600;
  display: inline-block;
  cursor: pointer;
  transition: background 0.15s ease;
}

.chat-mention:hover {
  background: rgba(88, 101, 242, 0.35);
}

.chat-mention.mention-me {
  background: rgba(250, 166, 26, 0.22);
  color: #FFE79A;
  font-weight: 700;
}

.chat-mention.mention-jack {
  background: rgba(59, 130, 246, 0.22);
  color: #93C5FD;
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-weight: 700;
}

.chat-mention.mention-jack:hover {
  background: rgba(59, 130, 246, 0.38);
}

.dm-bubble-row.has-mention-me .dm-bubble-body {
  border-left: 2px solid #FAA61A !important;
  background: rgba(250, 166, 26, 0.04) !important;
}

.chat-bubble-card.has-mention-me {
  background: rgba(250, 166, 26, 0.08) !important;
  border-left: 2px solid #FAA61A !important;
  border-radius: 0 4px 4px 0;
  padding-left: 10px !important;
}

.chat-bubble-card.has-mention-me:hover {
  background: rgba(250, 166, 26, 0.12) !important;
}

.dm-row-block.bot-message .dm-bubble-row {
  border-left: 2px solid #3B82F6 !important;
  background: rgba(59, 130, 246, 0.06) !important;
}

.chat-typing-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  padding: 6px 12px;
  animation: fadeIn 0.15s ease;
}

/* 7. Auto Links */
.chat-link {
  color: #60A5FA;
  text-decoration: none;
  word-break: break-all;
}

.chat-link:hover {
  text-decoration: underline;
}

/* ============================================================================
   EMOJI SLOT & POPULAR EMOJI PICKER POPOVER
   ============================================================================ */
.chat-input-tool-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.chat-input-tool-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

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

#chat-emoji-picker-popover {
  position: fixed;
  z-index: 99999;
  width: 300px;
  max-width: 92vw;
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: emojiPopIn 0.14s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

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

.emoji-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #18181B;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.emoji-picker-tabs {
  display: flex;
  gap: 4px;
}

.emoji-tab-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.emoji-tab-btn.active,
.emoji-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.emoji-picker-grid {
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.emoji-item-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s ease, transform 0.1s ease;
}

.emoji-item-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.18);
}

/* ============================================================================
   @USER MENTION AUTOCOMPLETE POPOVER (CLEAN: ONLY PFP + DISPLAY NAME)
   ============================================================================ */
#chat-mention-popover {
  position: fixed;
  z-index: 99999;
  width: 230px;
  max-width: 85vw;
  background: #0f1012;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  animation: mentionPopIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.mention-items-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.mention-item:hover,
.mention-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.mention-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50% !important;
  object-fit: cover;
  flex-shrink: 0;
}

.mention-item-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==============================================================================
   MANDATORY DISCORD GATEWAY & ACCESS CONTROL
   Pure OLED Black • Executive Console • Discord Blurple CTA
   ============================================================================== */
.discord-gateway-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.discord-gateway-card {
  width: 100%;
  max-width: 440px;
  background: #0A0A0A;
  border: 1px solid #24242B;
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.95);
  animation: gatewayFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gateway-crest-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.gateway-crest-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: 1px solid #333333;
  background: #000000;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.gateway-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #A1A1AA;
  margin-bottom: 12px;
}

.gateway-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 8px;
}

.gateway-subtitle {
  font-size: 13px;
  color: #A1A1AA;
  line-height: 1.5;
  margin-bottom: 24px;
  max-width: 340px;
}

.gateway-features-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  text-align: left;
}

.gateway-feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #111111;
  border: 1px solid #1E1E1E;
  border-radius: 10px;
  font-size: 12px;
  color: #D4D4D8;
}

.gateway-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #18181B;
  color: #FFFFFF;
  flex-shrink: 0;
}

.btn-discord-login {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: #5865F2;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.btn-discord-login:hover {
  background-color: #4752C4;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.btn-discord-login:active {
  transform: translateY(0);
}

.gateway-footer-text {
  font-size: 11px;
  color: #71717A;
  margin-top: 16px;
  line-height: 1.4;
}

.gateway-footer-text a {
  color: #5865F2;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Access Denied Card */
.access-denied-card {
  border-color: rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.7) !important;
}

.access-denied-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF4444;
  margin-bottom: 16px;
}

.btn-join-discord {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #10B981;
  color: #000000;
  border: none;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 10px;
}

.btn-join-discord:hover {
  background-color: #059669;
}

.btn-retry-login {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #18181B;
  color: #FFFFFF;
  border: 1px solid #27272A;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-retry-login:hover {
  background-color: #27272A;
}

/* ──────────────────────────────────────────────────────────────────────────────
   OFFICIAL DISCORD CLAN & MANAGEMENT ROLE BADGES
   ────────────────────────────────────────────────────────────────────────────── */
.clan-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1;
}

/* Main Roles */
.badge-clan-leader {
  background: rgba(255, 215, 0, 0.12);
  color: #FFD700;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.badge-clan-co-leader {
  background: rgba(54, 152, 118, 0.15);
  color: #369876;
  border: 1px solid rgba(54, 152, 118, 0.35);
}

.badge-clan-elite {
  background: rgba(168, 190, 59, 0.15);
  color: #A8BE3B;
  border: 1px solid rgba(168, 190, 59, 0.35);
}

.badge-clan-member {
  background: rgba(46, 160, 252, 0.12);
  color: #2EA0FC;
  border: 1px solid rgba(46, 160, 252, 0.35);
}

.badge-discord-member {
  background: rgba(130, 107, 194, 0.12);
  color: #A797D8;
  border: 1px solid rgba(130, 107, 194, 0.3);
}

/* Addon Management Roles */
.badge-owner {
  background: rgba(255, 125, 0, 0.15);
  color: #FF7D00;
  border: 1px solid rgba(255, 125, 0, 0.4);
}

.badge-manager {
  background: rgba(186, 61, 212, 0.15);
  color: #BA3DD4;
  border: 1px solid rgba(186, 61, 212, 0.4);
}

.badge-staff {
  background: rgba(99, 187, 177, 0.15);
  color: #63BBB1;
  border: 1px solid rgba(99, 187, 177, 0.35);
}

/* ============================================================================
   REAL-TIME NOTIFICATION & PING BADGES (RED NUMBER PILLS)
   ============================================================================ */
.nav-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  box-sizing: border-box;
  text-align: center;
}

.nav-badge-pill.red-badge {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: none;
}

.nav-badge-pill.ping-badge {
  background: #DC2626;
  color: #FFFFFF;
  font-weight: 800;
  box-shadow: none;
  animation: pulse-ping 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.nav-badge-pill.unread-badge {
  background: #27272A;
  color: #E4E4E7;
  border: 1px solid #3F3F46;
}

.dock-badge-pill {
  position: absolute;
  top: 3px;
  right: calc(50% - 19px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 999px;
  min-width: 15px;
  height: 15px;
  background: #EF4444;
  color: #FFFFFF;
  border: 1.5px solid #000000;
  box-shadow: none;
  z-index: 10;
  pointer-events: none;
}

.dock-badge-pill.ping-badge {
  background: #DC2626;
  box-shadow: none;
  animation: pulse-ping 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.dock-badge-pill.unread-badge {
  background: #3F3F46;
  color: #FFFFFF;
  box-shadow: none;
}

.dm-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  background: #EF4444;
  color: #FFFFFF;
  min-width: 18px;
  height: 18px;
  margin-left: auto;
  box-shadow: none;
  box-sizing: border-box;
}

@keyframes pulse-ping {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}

/* ============================================================================
   MESSAGE MENTION / PING HIGHLIGHT
   ============================================================================ */
.chat-bubble-card.has-mention-me {
  border-left: 3px solid #EF4444 !important;
  background: rgba(239, 68, 68, 0.09) !important;
  box-shadow: none !important;
}

.mention-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* ============================================================================
   MESSAGE DELIVERY & READ STATUS TICKS (SENT / DELIVERED / SEEN)
   ============================================================================ */
.msg-status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1;
}

.msg-status-wrap svg {
  display: inline-block;
  vertical-align: middle;
}

.msg-status-wrap.status-sent svg path {
  stroke: #D4D4D8;
}

.msg-status-wrap.status-delivered svg path {
  stroke: #E4E4E7;
}

.msg-status-wrap.status-seen svg path {
  stroke: #FFFFFF;
}

.seen-count-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #FFFFFF;
  font-weight: 600;
  margin-left: 2px;
}

/* ============================================================================
   INTERACTIVE MEMBER PROFILE SLIDING DRAWER (PEEK TO FULL PAGE)
   ============================================================================ */

/* 1. Backdrop Overlay */
#profile-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}

#profile-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 2. Bottom Sliding Drawer Container (Default: opens from downside) */
#profile-sheet-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100001;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: #08080A;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px 24px 0 0;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(105%);
  height: 100vh;
  max-height: 100vh;
  box-sizing: border-box;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              border-radius 0.35s ease,
              visibility 0.42s;
  will-change: transform;
}

#profile-sheet-drawer.open {
  visibility: visible;
  pointer-events: auto;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.98), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(40vh); /* Peek mode: reveals 60vh from bottom */
}

#profile-sheet-drawer.open.full-page {
  transform: translateY(0); /* Full page mode: 100vh */
  border-radius: 0;
  border-top: none;
}

/* =========================================================================
   RIGHT-SLIDER MODE (ONLY when opened from the downside bottom dock Profile button)
   ========================================================================= */
#profile-sheet-drawer.right-slider-mode {
  inset: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  background: #08080A !important;
  border: none !important;
  border-radius: 0 !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  transform: translate3d(100%, 0, 0) !important;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.38s !important;
  will-change: transform !important;
}

#profile-sheet-drawer.right-slider-mode.open {
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate3d(0, 0, 0) !important;
  box-shadow: -16px 0 50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

/* In right-slider-mode: HIDE cross button and hover pulling button completely */
#profile-sheet-drawer.right-slider-mode .profile-corner-close-btn,
#profile-sheet-drawer.right-slider-mode .sheet-drag-handle-zone,
#profile-sheet-drawer.right-slider-mode .sheet-drag-pill {
  display: none !important;
}

/* In right-slider-mode: SHOW sleek slide back button */
#profile-sheet-drawer.right-slider-mode .profile-slide-back-btn {
  display: flex !important;
}

/* In normal downside mode: HIDE slide back button */
#profile-sheet-drawer:not(.right-slider-mode) .profile-slide-back-btn {
  display: none !important;
}

/* Sleek Circular Slide Back Button (Just Arrow Icon: ←) */
.profile-slide-back-btn {
  position: absolute;
  top: max(14px, env(safe-area-inset-top, 14px));
  left: 14px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(12, 12, 14, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease,
              border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.profile-slide-back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.profile-slide-back-btn:active {
  transform: scale(0.92);
}

.profile-slide-back-btn svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  display: block;
}

/* Floating Corner Close Button: Minimal Cross - Appears ONLY when in Full Page Mode */
.profile-corner-close-btn {
  position: absolute;
  top: max(4px, env(safe-area-inset-top, 4px));
  right: 6px;
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 120;
  box-shadow: none;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.65) rotate(-15deg);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.32s;
  -webkit-tap-highlight-color: transparent;
}

.profile-corner-close-btn svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
  transition: transform 0.15s ease, color 0.15s ease;
}

#profile-sheet-drawer.full-page .profile-corner-close-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1) rotate(0deg);
}

#profile-sheet-drawer.full-page .profile-corner-close-btn:hover {
  opacity: 0.85;
  transform: scale(1.12);
}

#profile-sheet-drawer.full-page .profile-corner-close-btn:active {
  opacity: 0.65;
  transform: scale(0.92);
}

/* Drag Grab Handle Bar - Full size in Half Mode, shrinks tiny and shifts up in Full Page Mode */
.sheet-drag-handle-zone {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: top 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-drag-handle-zone:active {
  cursor: grabbing;
}

.sheet-drag-pill {
  width: 48px;
  height: 4.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease,
              opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet-drag-handle-zone:hover .sheet-drag-pill {
  background: rgba(255, 255, 255, 0.75);
  width: 56px;
}

/* When pulled up completely to full-screen: pill becomes very tiny and shifts smoothly upward */
#profile-sheet-drawer.full-page .sheet-drag-handle-zone {
  top: max(4px, env(safe-area-inset-top, 4px));
  height: 14px;
  transform: translateY(-2px);
  background: transparent;
}

#profile-sheet-drawer.full-page .sheet-drag-pill {
  width: 22px;
  height: 2.5px;
  opacity: 0.35;
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

#profile-sheet-drawer.full-page .sheet-drag-handle-zone:hover .sheet-drag-pill {
  opacity: 0.85;
  width: 26px;
  background: rgba(255, 255, 255, 0.9);
}

/* 3. Banner Section (Animated GIF, Video or Static Image) - 5:2 Discord Standard */
.profile-sheet-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 2;
  min-height: 130px;
  max-height: 240px;
  background: #111113;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

#profile-sheet-drawer.full-page .profile-sheet-banner {
  aspect-ratio: 5 / 2;
  max-height: 280px;
}

.profile-banner-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(8, 8, 10, 0.4) 50%, #08080A 100%);
  pointer-events: none;
}

/* 4. Avatar & Identity Bar */
.profile-identity-bar {
  position: relative;
  padding: 0 20px;
  margin-top: -44px;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-shrink: 0;
}

.profile-avatar-container {
  position: relative;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
}

#profile-sheet-drawer.full-page .profile-avatar-container {
  width: 96px;
  height: 96px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3.5px solid #08080A;
  background: #000000;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  display: block;
}

/* 4. Avatar & Status Dot (22px Discord Standard with 4 States) */
.profile-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3.5px solid #08080A;
  background: #23A55A;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

#profile-sheet-drawer.full-page .profile-status-dot {
  width: 25px;
  height: 25px;
  bottom: 3px;
  right: 3px;
}

.profile-status-dot.status-online {
  background: #23A55A;
  box-shadow: none;
}

.profile-status-dot.status-dnd {
  background: #F23F43;
  box-shadow: none;
}

.status-dot-minus {
  width: 9px;
  height: 2.5px;
  background: #FFFFFF;
  border-radius: 1px;
  display: block;
}

.profile-status-dot.status-in-game {
  background: #F97316;
  box-shadow: none;
}

.profile-status-dot.status-invisible,
.profile-status-dot.status-offline {
  background: #08080A !important;
  border: 3.5px solid #80848E !important;
  box-shadow: none !important;
}

/* Interactive PFP for Self */
.profile-avatar-container.pfp-interactive-self {
  cursor: pointer;
}

.profile-avatar-container.pfp-interactive-self:hover .profile-avatar-img {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.profile-avatar-container.pfp-interactive-self:active {
  transform: scale(0.97);
}

/* PFP Slide-out Presence Status Picker */
.pfp-status-picker-slide {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 236px;
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transform-origin: top left;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.22s;
  pointer-events: none;
}

.pfp-status-picker-slide.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pfp-status-picker-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #949BA4;
  padding: 6px 10px 4px 10px;
}

.pfp-status-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
  -webkit-user-select: none;
}

.pfp-status-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pfp-status-option:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.98);
}

.pfp-status-option.selected {
  background: rgba(255, 255, 255, 0.06);
}

.pfp-status-option-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pfp-status-option-dot.status-online {
  background: #23A55A;
  box-shadow: none;
}

.pfp-status-option-dot.status-dnd {
  background: #F23F43;
  box-shadow: none;
}

.pfp-status-option-dot.status-dnd .status-dot-minus {
  width: 7px;
  height: 2px;
}

.pfp-status-option-dot.status-in-game {
  background: #F97316;
  box-shadow: none;
}

.pfp-status-option-dot.status-invisible {
  background: #08080A;
  border: 2.5px solid #80848E;
  box-shadow: none;
}

.pfp-status-option-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.pfp-status-option-name {
  font-size: 13px;
  font-weight: 600;
  color: #F2F3F5;
  line-height: 1.2;
}

.pfp-status-option-desc {
  font-size: 11px;
  color: #949BA4;
  line-height: 1.2;
}

.pfp-status-check {
  font-size: 13px;
  font-weight: 800;
  color: #5865F2;
  margin-left: auto;
}

/* Top Action Buttons (Edit Profile / Send DM) */
.profile-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.profile-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #E4E4E7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.16s ease;
  user-select: none;
}

.profile-action-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke-width: 2;
  color: #A1A1AA;
  transition: color 0.16s ease;
}

.profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.profile-action-btn:hover svg {
  color: #FFFFFF;
}

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

/* Edit Profile (Self) - Sleek Discord Zinc Glass Pill */
.profile-action-btn.btn-edit-profile {
  background: rgba(255, 255, 255, 0.08);
  color: #F4F4F5;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 500;
}

.profile-action-btn.btn-edit-profile svg {
  color: #D4D4D8;
}

.profile-action-btn.btn-edit-profile:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
}

.profile-action-btn.btn-edit-profile:hover svg {
  color: #FFFFFF;
}

/* Primary Action (Message, Submit) */
.profile-action-btn.btn-primary {
  background: #5865F2;
  color: #FFFFFF;
  border: 1px solid #5865F2;
  font-weight: 600;
}

.profile-action-btn.btn-primary svg {
  color: #FFFFFF;
}

.profile-action-btn.btn-primary:hover {
  background: #4752C4;
  border-color: #4752C4;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.profile-action-btn.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #A1A1AA;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-action-btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* 5. Names & Copyable Handle (Stacked Layout) */
.profile-details-bar {
  padding: 12px 20px 8px 20px;
  flex-shrink: 0;
}

.profile-identity-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.profile-display-name {
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.profile-username-text,
.profile-username-pill {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #949BA4;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color 0.15s ease, opacity 0.15s ease;
  line-height: 1.3;
  margin-top: 2px;
  display: inline-block;
  width: fit-content;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.profile-username-text:hover,
.profile-username-pill:hover {
  color: #FFFFFF;
  background: transparent !important;
  border: none !important;
}

.profile-username-text:active,
.profile-username-pill:active {
  opacity: 0.5;
  transform: none;
  background: transparent !important;
}

.profile-discord-tag {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #949BA4;
}

.profile-copy-hint-icon {
  display: none !important;
}

.profile-activity-badge {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: #38BDF8;
  font-weight: 600;
}

/* Dedicated Discord Roles & Clan Badges Area */
.profile-roles-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discord-roles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.discord-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #E4E4E7;
  letter-spacing: 0.2px;
  transition: all 0.18s ease;
}

.discord-role-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.discord-role-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.discord-role-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* 6. Profile Content Area (Unified Continuous Scrolling) */
.profile-sheet-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  position: relative;
}

.profile-sheet-content {
  flex: 1;
  overflow-y: visible !important;
  padding: 12px 20px 50px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Section Header */
.profile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #71717A;
  margin-bottom: 10px;
}

.profile-section-title .title-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Bio Text (Clean text without any box) */
.profile-bio-text,
.profile-bio-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 13.5px;
  line-height: 1.45;
  color: #D4D4D8;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: none !important;
}

/* Esports & Game Info Grid */
.profile-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .profile-game-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.profile-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}

.profile-stat-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.profile-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

.profile-copy-btn {
  background: none;
  border: none;
  color: #71717A;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}

.profile-copy-btn:hover {
  color: #FFFFFF;
}

.profile-copy-btn svg {
  width: 12px;
  height: 12px;
}

/* 7. FLEX SHOWCASE SECTION */
.profile-flex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.flex-filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.flex-tab-pill {
  padding: 5px 10px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #A1A1AA;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.flex-tab-pill.active {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-add-flex {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #10B981;
  color: #000000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-add-flex:hover {
  opacity: 0.9;
}

/* Flex Media Gallery Grid */
.profile-flex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 580px) {
  .profile-flex-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.flex-media-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #141416;
  border: 1px solid rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.flex-media-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.flex-media-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flex-media-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flex-media-type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flex-media-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0.9;
  transition: opacity 0.2s;
}

.flex-media-card:hover .flex-media-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.2);
}

.play-circle-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}

.flex-media-card:hover .play-circle-icon {
  transform: scale(1.1);
}

.flex-media-title-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.85) 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-media-title {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flex-media-del-btn {
  background: rgba(239, 68, 68, 0.8);
  border: none;
  color: #FFFFFF;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 6px;
}

.flex-media-del-btn:hover {
  background: #EF4444;
}

.flex-empty-state {
  text-align: center;
  padding: 28px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #71717A;
  font-size: 12px;
  line-height: 1.5;
}

/* 8. Lightbox / Media Viewer Modal */
#profile-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
  padding: 20px;
  box-sizing: border-box;
}

#profile-media-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content-box {
  position: relative;
  max-width: 900px;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95);
}

.lightbox-close-btn {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 9. Profile Edit & Flex Upload Dialogs */
.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100110;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}

.profile-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.profile-modal-card {
  width: 100%;
  max-width: 520px;
  background: #0E0E11;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

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

.profile-modal-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
}

.profile-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-input-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #A1A1AA;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-input-text,
.profile-input-select,
.profile-input-textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: #050506;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #FFFFFF;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-input-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  padding-right: 32px;
  cursor: pointer;
}

.profile-input-text:focus,
.profile-input-select:focus,
.profile-input-textarea:focus {
  border-color: #38BDF8;
  box-shadow: none;
}

.profile-input-textarea {
  resize: vertical;
  min-height: 80px;
}

.profile-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================================
   DEDICATED FULL-PAGE EDIT PROFILE SYSTEM (SEPARATE FULL PAGE, NOT POPUP)
   ============================================================================ */
.edit-profile-full-page {
  position: fixed;
  inset: 0;
  z-index: 100030;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease,
              visibility 0.38s;
  will-change: transform;
}

.edit-profile-full-page.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Edit Page Sticky Header */
.edit-page-header {
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  background: #0A0A0D;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.edit-page-close-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, transform 0.15s ease;
  outline: none;
  box-shadow: none;
}

.edit-page-close-btn:hover {
  color: #FFFFFF;
  transform: scale(1.12);
}

.edit-page-close-btn:active {
  transform: scale(0.95);
}

.edit-page-title-wrap {
  text-align: center;
  flex: 1;
  margin: 0 12px;
}

.edit-page-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  text-transform: uppercase;
}

.edit-page-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #71717A;
  letter-spacing: 0.04em;
}

.edit-page-save-text-btn {
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #5865F2;
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease, color 0.2s ease;
  outline: none;
  box-shadow: none;
}

.edit-page-save-text-btn.has-changes {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
  color: #5865F2;
  text-shadow: none;
}

.edit-page-save-text-btn.has-changes:hover {
  color: #7289DA;
  text-shadow: none;
  transform: scale(1.05);
}

.edit-page-save-text-btn.has-changes:active {
  transform: scale(0.96);
}

/* Discord-Style Unsaved Changes Modal */
.unsaved-modal-card {
  width: 100%;
  max-width: 420px;
  background: #18191C;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: gifModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.unsaved-modal-header {
  padding: 20px 20px 10px 20px;
}

.unsaved-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.unsaved-modal-body {
  padding: 0 20px 20px 20px;
}

.unsaved-modal-desc {
  font-size: 14px;
  color: #D4D4D8;
  line-height: 1.5;
  margin: 0;
}

.unsaved-modal-footer {
  background: #111214;
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.unsaved-btn-cancel {
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s;
}

.unsaved-btn-cancel:hover {
  text-decoration: underline;
}

.unsaved-btn-discard {
  background: #DA373C;
  border: 1px solid #DA373C;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.unsaved-btn-discard:hover {
  background: #BE2E32;
  transform: translateY(-1px);
}

/* Scrollable Form Body */
.edit-page-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 18px 80px 18px;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section Cards */
.edit-section-card {
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.edit-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.edit-section-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-section-icon {
  color: #38BDF8;
  display: flex;
  align-items: center;
}

.edit-section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.edit-section-desc {
  font-size: 11px;
  color: #71717A;
}

/* Banner Live Preview */
.edit-banner-preview-box {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: #141418;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-banner-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-banner-preset-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.edit-preset-pill {
  font-size: 11px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #D4D4D8;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.edit-preset-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

/* Avatar Live Preview */
.edit-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.edit-avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid #10B981;
  object-fit: cover;
  flex-shrink: 0;
  background: #000000;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.edit-avatar-preview:hover {
  border-color: #5865F2;
  transform: scale(1.02);
}



/* Preferred Game Mode Tag Chips */
.edit-mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.edit-mode-chip {
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #A1A1AA;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.edit-mode-chip.selected {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38BDF8;
  color: #38BDF8;
  box-shadow: none;
}

.edit-char-count {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #71717A;
  text-align: right;
  margin-top: 4px;
}

/* Responsive Form Grids for Edit Profile */
.edit-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.edit-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .edit-form-grid-2,
  .edit-form-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  
  .edit-page-header {
    height: 52px;
    min-height: 52px;
    padding: 0 10px;
  }
  
  .edit-page-back-btn,
  .edit-page-save-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .edit-page-title-wrap {
    margin: 0 4px;
    overflow: hidden;
  }

  .edit-page-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .edit-page-sub {
    display: none !important;
  }

  .edit-page-body {
    padding: 14px 12px 90px 12px;
    gap: 16px;
  }

  .edit-section-card {
    padding: 14px;
    border-radius: 12px;
  }
}

/* ============================================================================
   MINIMALIST OLED BGMI UC STORE SYSTEM
   ============================================================================ */
.store-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
  padding-bottom: 30px;
}

/* Minimalist Banner Card */
.store-hero-card {
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(9, 9, 12, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.store-hero-card::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.store-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.store-hero-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

.store-hero-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.store-hero-desc {
  font-size: 12px;
  color: #A1A1AA;
  line-height: 1.45;
}

.store-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.store-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #D4D4D8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
}

.store-trust-chip svg {
  color: #10B981;
}

/* Category Filter Bar */
.store-category-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 8px 8px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.store-category-bar::-webkit-scrollbar {
  display: none;
}

.store-cat-pill {
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #A1A1AA;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  user-select: none;
}

.store-cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.store-cat-pill.active {
  background: #FFFFFF;
  color: #000000;
  font-weight: 700;
  border-color: #FFFFFF;
  box-shadow: none;
}

/* Pack Cards Grid */
.store-packs-grid {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .store-packs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Individual Pack Card */
.pack-card {
  position: relative;
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
  overflow: hidden;
}

.pack-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.pack-card.popular-highlight {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, #09090C 100%);
}

/* Pack Badge Pill */
.pack-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  text-transform: uppercase;
  z-index: 2;
}

.pack-badge.gold {
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.pack-badge.emerald {
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
}

/* Pack 3D Image Graphic */
.pack-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  margin: 12px 0 10px 0;
  position: relative;
}

.pack-visual img {
  max-height: 98px;
  max-width: 130px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.pack-card:hover .pack-visual img {
  transform: scale(1.08) translateY(-2px);
}

/* Pack Details */
.pack-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 6px;
}

.pack-uc-total {
  display: flex;
  align-items: center;
  gap: 6px;
}

.uc-currency-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

.uc-total-number {
  font-family: var(--font-main);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1;
}

.uc-currency-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #FBBF24;
  letter-spacing: 0.04em;
}

/* Pack Footer & Button - Clean, Undistorted, Spaced */
.pack-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.pack-price-amount {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: left;
}

.store-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #FFFFFF;
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.store-buy-btn:hover {
  background: #E4E4E7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.store-buy-btn.oos {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #71717A;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Minimalist Bottom Sheet Checkout Modal */
.store-checkout-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.store-checkout-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.store-checkout-sheet {
  width: 100%;
  max-width: 520px;
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), visibility 0.3s;
  box-sizing: border-box;
}

.store-checkout-modal-backdrop.active .store-checkout-sheet {
  visibility: visible;
  pointer-events: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
  transform: translateY(0);
}

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

.store-sheet-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  text-transform: uppercase;
}

.store-sheet-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #D4D4D8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.store-sheet-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.store-sheet-pack-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px;
}

.store-sheet-pack-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
}

.store-sheet-pack-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.store-sheet-pack-uc {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.store-sheet-pack-price {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #10B981;
}

.store-sheet-uid-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.store-sheet-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #A1A1AA;
  text-transform: uppercase;
}

.store-sheet-input {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  outline: none;
  transition: border-color 0.15s;
}

.store-sheet-input:focus {
  border-color: #10B981;
  box-shadow: none;
}

.store-sheet-pay-btn {
  background: #10B981;
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.store-sheet-pay-btn:hover {
  background: #34D399;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  transform: translateY(-1px);
}

.store-sheet-safe-notice {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #71717A;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ============================================================================
   WHATSAPP-INSPIRED FLOATING ACTION BUTTON (FAB) & NEW DM FULL-PAGE DIRECTORY
   ============================================================================ */

/* Hide duplicate 2nd header in Direct Messages */
.dm-threads-header {
  display: none !important;
}

/* 1. Green WhatsApp-Style Floating Chat Button */
.whatsapp-fab-chat {
  position: fixed;
  right: 20px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #25D366; /* Vibrant WhatsApp Green */
  border: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 95;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.whatsapp-fab-chat:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

.whatsapp-fab-chat:active {
  transform: scale(0.92);
}

.whatsapp-fab-chat svg {
  width: 26px;
  height: 26px;
  color: #000000;
  stroke: #000000;
}

/* Hide FAB when inside an active conversation pane */
body.dm-conversation-active .whatsapp-fab-chat {
  display: none !important;
}

/* 2. Full-Page New DM Contact Screen */
.new-dm-full-page {
  position: fixed;
  inset: 0;
  z-index: 100030;
  background: #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.22s ease,
              visibility 0.32s;
  will-change: transform;
}

.new-dm-full-page.active {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* New DM Header */
.new-dm-page-header {
  height: 60px;
  min-height: 60px;
  padding: 0 16px;
  background: #0A0A0D;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.new-dm-back-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.new-dm-back-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

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

.new-dm-header-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.new-dm-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.new-dm-header-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Search Bar in Full Page */
.new-dm-search-area {
  padding: 10px 16px;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.new-dm-search-box {
  display: flex;
  align-items: center;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  gap: 8px;
  transition: border-color 0.18s ease;
}

.new-dm-search-box:focus-within {
  border-color: rgba(37, 211, 102, 0.6);
}

.new-dm-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 13px;
}

.new-dm-search-input::placeholder {
  color: #71717A;
}

/* Alphabetical Member Directory List */
.new-dm-list-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Alphabetical Letter Divider */
.new-dm-letter-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
  padding: 0 4px;
}

.new-dm-letter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  color: #25D366;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.new-dm-letter-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* Member Row Card */
.new-dm-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #09090C;
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.new-dm-member-card:hover {
  background: #141418;
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(2px);
}

.new-dm-member-card:active {
  transform: scale(0.98);
}

.new-dm-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.new-dm-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.new-dm-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: #18181B;
}

.new-dm-info-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.new-dm-member-name {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.new-dm-member-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.new-dm-role-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #A1A1AA;
}

.new-dm-chat-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #25D366;
  flex-shrink: 0;
  margin-left: 10px;
  transition: all 0.15s ease;
}

.new-dm-member-card:hover .new-dm-chat-icon {
  background: #25D366;
  color: #000000;
  transform: scale(1.06);
}

/* ============================================================================
   PROFILE DRAWER: SMOOTH TRANSITIONS, STICKY HEADER & MICRO-ANIMATIONS
   ============================================================================ */

.profile-sticky-navbar,
.sticky-nav-title,
.sticky-nav-user,
.sticky-nav-avatar,
.sticky-nav-info,
.sticky-nav-name,
.sticky-nav-role {
  display: none !important;
}

/* 2. Fluid Micro-Animations on Drawer Opening */
#profile-sheet-drawer.open {
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.98);
}

#profile-sheet-drawer.open .profile-sheet-banner {
  animation: profileBannerZoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes profileBannerZoomIn {
  0% { transform: scale(1.08); filter: brightness(0.65); }
  100% { transform: scale(1); filter: brightness(1); }
}

#profile-sheet-drawer.open .profile-avatar-container {
  animation: profileAvatarBounce 0.52s 0.12s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes profileAvatarBounce {
  0% { transform: scale(0.4) translateY(24px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

#profile-sheet-drawer.open .profile-details-bar {
  animation: profileStaggerIn 0.45s 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#profile-sheet-drawer.open .profile-bio-section,
#profile-sheet-drawer.open .profile-sheet-content > div:nth-child(1) {
  animation: profileStaggerIn 0.45s 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#profile-sheet-drawer.open .profile-sheet-content > div:nth-child(2) {
  animation: profileStaggerIn 0.45s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#profile-sheet-drawer.open .profile-sheet-content > div:nth-child(3) {
  animation: profileStaggerIn 0.45s 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes profileStaggerIn {
  0% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ============================================================================
   DISCORD-STYLE GIF & IMAGE BANNER PICKER SYSTEM
   ============================================================================ */

.btn-change-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-change-banner:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #38BDF8;
  color: #38BDF8;
}

.btn-crop-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.35);
  border-radius: 8px;
  color: #7983F5;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-crop-banner:hover {
  background: rgba(88, 101, 242, 0.28);
  border-color: #5865F2;
  color: #FFFFFF;
}

/* 5:2 Aspect Ratio Safety Guard for Edit Banner Preview Box */
.edit-banner-preview-box {
  width: 100%;
  aspect-ratio: 5 / 2;
  min-height: 120px;
  max-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #111113;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.edit-banner-preview-box:hover {
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.edit-banner-preview-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: filter 0.25s ease;
}

.edit-banner-preview-box:hover .edit-banner-preview-media {
  filter: brightness(1.06);
}

/* Minimal Banner Action Buttons (Pencil + Dustbin Cluster on Frame) */
.edit-banner-actions-cluster {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 5;
}

.edit-banner-badge-action {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.edit-banner-badge-action.edit-banner-badge-edit:hover {
  background: #5865F2;
  border-color: #5865F2;
  transform: scale(1.1);
  color: #FFFFFF;
}

.edit-banner-badge-action.edit-banner-badge-delete {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.edit-banner-badge-action.edit-banner-badge-delete:hover {
  background: #EF4444;
  border-color: #EF4444;
  transform: scale(1.1);
  color: #FFFFFF;
}

/* Minimal Avatar Action Badges (Pencil + Dustbin/Sync Cluster on Avatar Frame) */
.edit-avatar-preview-box {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  cursor: pointer;
}

.edit-avatar-actions-cluster {
  position: absolute;
  bottom: -4px;
  right: -12px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 5;
}

.edit-avatar-badge-action {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.edit-avatar-badge-action.edit-avatar-badge-edit {
  background: #5865F2;
  border-color: #141416;
}

.edit-avatar-badge-action.edit-avatar-badge-edit:hover {
  background: #4752C4;
  transform: scale(1.15);
}

.edit-avatar-badge-action.edit-avatar-badge-delete {
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(12, 12, 16, 0.92);
}

.edit-avatar-badge-action.edit-avatar-badge-delete:hover {
  background: #EF4444;
  border-color: #EF4444;
  color: #FFFFFF;
  transform: scale(1.15);
}

/* Backdrop */
.gif-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100110;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: gifBackdropFade 0.2s ease-out;
}

@keyframes gifBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal 1: Select an Image Card (Matches Screenshot 2) */
.select-image-modal-card {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: gifModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gifModalPop {
  0% { transform: scale(0.92) translateY(14px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.select-image-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px 20px;
}

.select-image-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.modal-close-icon-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.modal-close-icon-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

/* Two Cards in Select an Image modal */
.select-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 6px 20px 16px 20px;
}

.select-image-tile {
  position: relative;
  height: 140px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1E1F22;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  user-select: none;
}

.select-image-tile:hover {
  transform: translateY(-2px);
  border-color: #5865F2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.select-image-tile-upload {
  background: #232428;
  gap: 12px;
  color: #FFFFFF;
}

.select-image-tile-upload .tile-label {
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-image-tile-gif {
  background: #18191C;
  position: relative;
}

.tile-gif-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  opacity: 0.42;
}

.tile-gif-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-gif-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

.tile-gif-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 2;
}

.select-image-footer-text {
  padding: 0 20px 18px 20px;
  font-size: 11.5px;
  color: #949BA4;
  line-height: 1.45;
}

/* Modal 2: Choose GIF (Matches Screenshot 3) */
.choose-gif-modal-card {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  height: 84vh;
  max-height: 640px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  animation: gifModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.choose-gif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px 20px;
  flex-shrink: 0;
}

.choose-gif-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.choose-gif-back-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.choose-gif-back-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Search Bar (Screenshot 3: "Search Klipy") */
.gif-search-wrap {
  padding: 0 20px 12px 20px;
  flex-shrink: 0;
}

.gif-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #08080A;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gif-search-input-box:focus-within {
  border-color: #5865F2;
  box-shadow: none;
}

.gif-search-icon {
  color: #949BA4;
  margin-right: 8px;
  flex-shrink: 0;
}

.gif-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 13.5px;
  padding: 10px 0;
  font-family: var(--font-main);
}

.gif-search-input::placeholder {
  color: #71717A;
}

.gif-search-clear {
  background: transparent;
  border: none;
  color: #71717A;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}

.gif-search-clear:hover {
  color: #FFFFFF;
}

/* Scrollable GIF content body */
.choose-gif-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 20px 20px;
  -webkit-overflow-scrolling: touch;
}

/* Category Tiles Grid (Screenshot 3) */
.gif-categories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gif-category-tile {
  position: relative;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #18191C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s, border-color 0.15s;
}

.gif-category-tile:hover {
  transform: scale(1.02);
  border-color: #5865F2;
}

.gif-category-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48);
  transition: filter 0.15s, transform 0.2s;
}

.gif-category-tile:hover .gif-category-bg {
  filter: brightness(0.68);
  transform: scale(1.05);
}

.gif-category-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  padding: 4px 8px;
  text-align: center;
  user-select: none;
}

/* GIF Results Grid */
.gif-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gif-result-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1E1F22;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.gif-result-item:hover {
  transform: scale(1.03);
  border-color: #38BDF8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

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

/* Dialog Host for Modals */
#profile-dialog-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100100;
}
#profile-dialog-host > * {
  pointer-events: auto;
}

/* ============================================================================
   DISCORD-STYLE "EDIT IMAGE" 5:2 CROPPER MODAL SYSTEM
   ============================================================================ */
.cropper-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100120;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: gifBackdropFade 0.2s ease-out;
}

.image-cropper-modal-card {
  background: #111214;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  animation: gifModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.cropper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px 20px;
}

.cropper-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cropper-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.cropper-spec-tag {
  background: rgba(88, 101, 242, 0.15);
  border: 1px solid rgba(88, 101, 242, 0.3);
  color: #7983F5;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.cropper-viewport-wrap {
  padding: 0 20px;
}

.cropper-viewport {
  position: relative;
  width: 100%;
  height: 280px;
  background: #18191C;
  border-radius: 10px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.cropper-viewport:active {
  cursor: grabbing;
}

.cropper-target-img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  max-height: none;
  pointer-events: none;
  will-change: transform;
}

/* Aspect Ratio Crop Windows: 5:2 Banner & 1:1 Circular Avatar */
.cropper-crop-window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2.5px solid #FFFFFF;
  pointer-events: none;
  z-index: 2;
}

.cropper-crop-window.cropper-crop-window-banner,
.cropper-crop-window:not(.cropper-crop-window-avatar) {
  width: min(340px, calc(100% - 32px));
  aspect-ratio: 5 / 2;
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
}

.cropper-crop-window.cropper-crop-window-avatar {
  width: min(220px, calc(100% - 48px));
  height: min(220px, calc(100% - 48px));
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.78);
}

.cropper-btn-raw {
  background: rgba(255, 255, 255, 0.08);
  color: #E4E4E7;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-right: auto;
  margin-left: 10px;
}

.cropper-btn-raw:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.28);
}

/* Controls Toolbar (Screenshot: Zoom icons, slider, rotate button) */
.cropper-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 20px 10px 20px;
  color: #949BA4;
}

.cropper-zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  max-width: 240px;
  height: 6px;
  border-radius: 3px;
  background: #4E5058;
  outline: none;
  cursor: pointer;
}

.cropper-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.12s;
}

.cropper-zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.cropper-rotate-btn {
  background: transparent;
  border: none;
  color: #949BA4;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-left: 6px;
}

.cropper-rotate-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Footer Actions: Reset, Cancel, Apply */
.cropper-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 20px 20px;
}

.cropper-btn-reset {
  background: transparent;
  border: none;
  color: #949BA4;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.15s;
}

.cropper-btn-reset:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.cropper-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cropper-btn-cancel {
  background: #2B2D31;
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.cropper-btn-cancel:hover {
  background: #35373C;
}

.cropper-btn-apply {
  background: #5865F2;
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: background 0.15s, transform 0.15s;
}

.cropper-btn-apply:hover {
  background: #4752C4;
  transform: translateY(-1px);
}

/* ==============================================================================
   UNIVERSAL SCROLLBAR REMOVAL (FINAL OVERRIDE)
   Preserves 100% full touch, wheel, trackpad, and keyboard scrolling everywhere
   Strictly hides side scrollbar indicators in Home, DMs, Contacts, Profiles & All Screens
   ============================================================================== */
html,
body,
#app-root,
.view-page-slide,
.dm-messages-stream,
.dm-threads-scroll,
.new-dm-list-scroll,
.profile-sheet-inner,
#profile-sheet-drawer,
.edit-page-body,
.chat-messages-area,
.drawer-nav-list,
.emoji-picker-grid,
.mention-items-list,
.store-category-bar,
.choose-gif-body,
.profile-modal-body,
*,
*::before,
*::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  display: none !important;
  background: transparent !important;
  border: none !important;
}

/* ==============================================================================
   7. RICH MEDIA CHAT SYSTEM (Voice, Photo, Video, Sticker, GIF, Dynamic Dock)
   ============================================================================== */

/* ─── DOCK ATTACHMENT TRIGGER BUTTON ─── */
.chat-attach-btn,
.chat-dock-icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: #18181B;
  border: 1px solid #27272A;
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: all 0.15s ease;
  user-select: none;
}
.chat-attach-btn:hover,
.chat-attach-btn:active,
.chat-dock-icon-btn:hover {
  background: #27272A;
  border-color: #3F3F46;
  color: #FFFFFF;
}
.chat-attach-btn svg,
.chat-dock-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── DOCK INPUT WRAP & TEXTAREA ─── */
.chat-dock-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #141416;
  border: 1px solid #3F3F46;
  border-radius: 22px;
  padding: 4px 8px 4px 14px;
  min-height: 42px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chat-dock-input-wrap:focus-within {
  border-color: #71717A;
  background: #18181C;
}

.chat-dock-textarea {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #FFFFFF !important;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 0;
  resize: none;
  min-height: 22px;
  max-height: 120px;
  overflow-y: auto;
  box-sizing: border-box;
  caret-color: #FFFFFF;
}
.chat-dock-textarea::placeholder {
  color: #A1A1AA !important;
  font-weight: 400;
}

/* ─── EMOJI / MEDIA TRAY TRIGGER BUTTON ─── */
.chat-dock-tray-trigger {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #E4E4E7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
}
.chat-dock-tray-trigger:hover,
.chat-dock-tray-trigger:active {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  transform: scale(1.08);
}
.chat-dock-tray-trigger svg {
  width: 20px;
  height: 20px;
}

/* ─── DYNAMIC ACTION BUTTON (MIC VS. SEND) ─── */
.chat-dynamic-action-btn {
  background: #27272A;
  color: #FFFFFF;
  border: 1px solid #3F3F46;
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}
.chat-dynamic-action-btn .btn-icon-mic,
.chat-dynamic-action-btn .btn-icon-send {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}
.chat-dynamic-action-btn svg {
  width: 18px !important;
  height: 18px !important;
}
.chat-dynamic-action-btn.mode-mic {
  background: #27272A;
  color: #FFFFFF;
  border: 1px solid #3F3F46;
}
.chat-dynamic-action-btn.mode-mic:hover,
.chat-dynamic-action-btn.mode-mic:active {
  background: #3F3F46;
}
.chat-dynamic-action-btn.mode-mic .btn-icon-mic {
  display: flex;
}
.chat-dynamic-action-btn.mode-mic .btn-icon-send {
  display: none !important;
}

.chat-dynamic-action-btn.mode-send {
  background: #FFFFFF;
  color: #000000;
  border: none;
}
.chat-dynamic-action-btn.mode-send:hover,
.chat-dynamic-action-btn.mode-send:active {
  background: #E4E4E7;
  transform: scale(1.04);
}
.chat-dynamic-action-btn.mode-send .btn-icon-mic {
  display: none !important;
}
.chat-dynamic-action-btn.mode-send .btn-icon-send {
  display: flex;
}

/* ─── STAGED MEDIA PREVIEW BAR ─── */
.chat-staged-media-bar,
.staged-media-bar {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #101012;
  border-top: 1px solid #27272A;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.chat-staged-media-bar.active,
.staged-media-bar.active {
  display: flex;
}
.chat-staged-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.chat-staged-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #3F3F46;
}
.chat-staged-item .staged-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #EF4444;
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.staged-file-badge {
  background: #1C1C20;
  border: 1px solid #3F3F46;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.staged-file-badge svg {
  color: #A1A1AA;
}
.staged-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 8px;
  color: #FFFFFF;
  pointer-events: none;
}

/* ─── LIVE VOICE RECORDING DOCK OVERLAY ─── */
.chat-voice-record-bar,
.voice-record-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 14px;
  background: #141416;
  border: 1px solid #EF4444;
  border-radius: 24px;
  box-sizing: border-box;
}
.chat-voice-record-bar.active,
.voice-record-bar.active {
  display: flex !important;
}
.voice-rec-left,
.voice-recording-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-rec-dot,
.voice-rec-blinker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EF4444;
  animation: voicePulse 1s infinite alternate;
}
@keyframes voicePulse {
  from { opacity: 0.3; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.2); }
}
.voice-rec-timer {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}
.voice-rec-wave,
.voice-waveform-preview {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
}
.voice-rec-wave span,
.voice-waveform-preview span {
  width: 3px;
  background: #EF4444;
  border-radius: 2px;
  animation: waveAnim 0.8s infinite ease-in-out alternate;
}
.voice-rec-wave span:nth-child(1), .voice-waveform-preview span:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.voice-rec-wave span:nth-child(2), .voice-waveform-preview span:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.voice-rec-wave span:nth-child(3), .voice-waveform-preview span:nth-child(3) { height: 10px; animation-delay: 0.15s; }
.voice-rec-wave span:nth-child(4), .voice-waveform-preview span:nth-child(4) { height: 18px; animation-delay: 0.4s; }
.voice-rec-wave span:nth-child(5), .voice-waveform-preview span:nth-child(5) { height: 8px; animation-delay: 0.25s; }
@keyframes waveAnim {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.4); }
}

.voice-rec-cancel-btn,
.voice-cancel-btn {
  background: #27272A;
  border: 1px solid #3F3F46;
  color: #EF4444;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.voice-rec-cancel-btn:hover,
.voice-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #EF4444;
  color: #FFFFFF;
}
.voice-rec-send-btn,
.voice-send-btn {
  background: #FFFFFF;
  color: #000000;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.voice-rec-send-btn:active,
.voice-send-btn:active {
  transform: scale(0.92);
}
.voice-rec-send-btn svg,
.voice-send-btn svg {
  width: 16px;
  height: 16px;
  fill: #000000;
}

/* ─── IN-CHAT VOICE AUDIO PLAYER ─── */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #141416;
  border: 1px solid #27272A;
  border-radius: 16px;
  min-width: 220px;
  max-width: 280px;
  box-sizing: border-box;
  margin: 4px 0;
  user-select: none;
}
.voice-play-btn,
.voice-player-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.voice-play-btn:active,
.voice-player-btn:active {
  transform: scale(0.92);
}
.voice-play-btn svg,
.voice-player-btn svg {
  width: 14px;
  height: 14px;
  fill: #000000;
}
.voice-track-wrap,
.voice-player-track-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.voice-progress-bar,
.voice-player-scrub-bar {
  width: 100%;
  height: 5px;
  background: #2A2A2E;
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.voice-progress-fill,
.voice-player-progress {
  height: 100%;
  background: #FFFFFF;
  border-radius: 3px;
  width: 0%;
  transition: width 0.08s linear;
}
.voice-meta-row,
.voice-player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #A1A1AA;
}
.voice-player-time {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #A1A1AA;
}
.voice-speed-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #27272A;
  color: #E4E4E7;
  cursor: pointer;
  border: none;
  font-weight: 700;
  transition: background 0.15s ease;
}
.voice-speed-pill:hover {
  background: #3F3F46;
}

/* ─── IN-CHAT MEDIA RENDERING (IMAGE, VIDEO, GIF, STICKER) ─── */
.chat-image-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-width: 260px;
  max-height: 320px;
  position: relative;
  background: #0A0A0A;
  border: 1px solid var(--border-subtle);
  margin: 2px 0;
}
.chat-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.chat-image-wrap img:hover {
  opacity: 0.92;
}

.chat-video-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-width: 280px;
  max-height: 320px;
  background: #000000;
  border: 1px solid var(--border-subtle);
  margin: 2px 0;
}
.chat-video-wrap video {
  display: block;
  width: 100%;
  max-height: 320px;
  outline: none;
}

.chat-media-caption {
  padding: 4px 2px 2px 2px;
  font-size: 13px;
  line-height: 1.4;
  color: #FFFFFF;
  word-break: break-word;
}

/* Bubble-free large stickers */
.chat-sticker-wrap {
  display: inline-block;
  padding: 2px;
  background: transparent !important;
  border: none !important;
  margin: 2px 0;
}
.chat-sticker-wrap img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.chat-sticker-wrap img:hover {
  transform: scale(1.06);
}

.chat-gif-wrap {
  border-radius: 12px;
  overflow: hidden;
  max-width: 260px;
  max-height: 260px;
  border: 1px solid var(--border-subtle);
  background: #000000;
  margin: 2px 0;
}
.chat-gif-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  cursor: pointer;
}

/* ─── UNIFIED BOTTOM MEDIA TRAY SHEET (EMOJIS, STICKERS, GIFS) ─── */
.chat-media-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: none;
}
.chat-media-sheet-backdrop.active,
.chat-media-sheet-backdrop.show {
  display: block;
}

.chat-media-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 380px;
  max-height: 60vh;
  background: #0D0D0E;
  border-top: 1px solid var(--border-default);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(105%);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.24s;
}
.chat-media-sheet.active,
.chat-media-sheet.open {
  visibility: visible;
  pointer-events: auto;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.85);
  transform: translateY(0);
}

.chat-media-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 12px;
  background: #111113;
}

.chat-media-tabs {
  display: flex;
  gap: 4px;
}
.chat-media-tab-btn {
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #71717A;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-media-tab-btn.active {
  color: #FFFFFF;
}
.chat-media-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 1px;
}
.chat-media-sheet-close {
  background: transparent;
  border: none;
  color: #A1A1AA;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.chat-media-sheet-close:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.chat-media-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  position: relative;
}

/* Sticker Grid */
.sticker-packs-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sticker-pack-title {
  font-size: 11px;
  font-weight: 700;
  color: #A1A1AA;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sticker-item {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 6px;
  box-sizing: border-box;
}
.sticker-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}
.sticker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* GIF Search & Grid */
.gif-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 10px;
  gap: 8px;
}
.gif-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 13px;
}
.gif-search-bar input::placeholder {
  color: #71717A;
}
.gif-tags-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.gif-tag-pill {
  padding: 3px 10px;
  border-radius: 12px;
  background: #18181B;
  border: 1px solid #27272A;
  color: #A1A1AA;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.gif-tag-pill:hover,
.gif-tag-pill.active {
  background: #27272A;
  color: #FFFFFF;
  border-color: #3F3F46;
}
.gif-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gif-result-item {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #18181B;
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s ease;
}
.gif-result-item:hover {
  transform: scale(1.02);
  border-color: #52525B;
}
.gif-result-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── ATTACHMENT MENU BOTTOM SHEET ─── */
.chat-attach-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0E0E10;
  border-top: 1px solid var(--border-default);
  z-index: 1000;
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(105%);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
}
.chat-attach-sheet.active,
.chat-attach-sheet.open {
  visibility: visible;
  pointer-events: auto;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.85);
  transform: translateY(0);
}
.attach-sheet-title {
  font-size: 12px;
  font-weight: 700;
  color: #A1A1AA;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.attach-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.attach-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 10px;
  background: #141417;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
  color: #FFFFFF;
}
.attach-option-card:hover {
  background: #1C1C20;
  border-color: var(--border-default);
  transform: translateY(-2px);
}
.attach-option-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.attach-option-label {
  font-size: 12px;
  font-weight: 600;
  color: #E4E4E7;
}

/* ─── RICH MEDIA DRAWER INTERNAL STYLES ─── */
.rich-emoji-cat-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  border-bottom: 1px solid #202024;
  margin-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rich-emoji-cat-tabs::-webkit-scrollbar {
  display: none !important;
}
.rich-emoji-cat-pill {
  background: #18181B;
  border: 1px solid #27272A;
  color: #A1A1AA;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
}
.rich-emoji-cat-pill:hover,
.rich-emoji-cat-pill:active {
  background: #27272A;
  color: #FFFFFF;
  border-color: #3F3F46;
}
.rich-emoji-cat-pill.active {
  background: #FFFFFF;
  color: #000000;
  border-color: #FFFFFF;
  font-weight: 700;
}

.rich-emojis-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 4px 2px 16px 2px;
}
.rich-emoji-cell {
  background: transparent;
  border: none;
  font-size: 26px;
  height: 42px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
  user-select: none;
}
.rich-emoji-cell:hover,
.rich-emoji-cell:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.18);
}

.rich-stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 4px 2px 16px 2px;
}
.rich-sticker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  background: #141416;
  border: 1px solid #27272A;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.rich-sticker-card:hover,
.rich-sticker-card:active {
  background: #1C1C20;
  border-color: #3F3F46;
  transform: scale(1.05);
}
.rich-sticker-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.rich-sticker-label {
  font-size: 10px;
  color: #A1A1AA;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.rich-gif-search-bar {
  display: flex;
  align-items: center;
  background: #141417;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.rich-gif-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 13px;
}
.rich-gif-search-bar input::placeholder {
  color: #71717A;
}

.rich-gifs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 2px;
}
.rich-gif-card {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #141417;
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s ease;
}
.rich-gif-card:hover,
.rich-gif-card:active {
  transform: scale(1.02);
  border-color: #52525B;
}
.rich-gif-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── DISCORD-GRADE MEDIA SYSTEM UPGRADES ─── */

/* 1. Panel Search Bars */
.emoji-panel-search-wrap {
  display: flex;
  align-items: center;
  background: #141417;
  border: 1px solid #27272A;
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 10px;
  gap: 8px;
  color: #71717A;
}
.emoji-panel-search-wrap:focus-within {
  border-color: #5865F2;
  box-shadow: 0 0 0 1px #5865F2;
}
.emoji-panel-search-wrap svg {
  flex-shrink: 0;
  stroke: #71717A;
}
.emoji-panel-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 13px;
  min-width: 0;
}
.emoji-panel-search::placeholder {
  color: #71717A;
}

/* 2. Emoji Recents Row */
.rich-emoji-recents-wrap {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #202024;
}
.rich-emoji-recents-title {
  font-size: 11px;
  font-weight: 700;
  color: #71717A;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  padding-left: 2px;
}
.rich-emojis-recents-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* 3. Sticker Pack Grouping (Discord-style) */
.sticker-pack-section {
  margin-bottom: 16px;
}
.sticker-pack-title {
  font-size: 11px;
  font-weight: 700;
  color: #8E9297;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  padding-left: 2px;
}
.sticker-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sticker-item {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #202024;
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
  box-sizing: border-box;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.sticker-item:hover,
.sticker-item:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3F3F46;
  transform: scale(1.08);
}
.sticker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 4. GIF Category Tiles (Discord Klipy-style) */
.gif-category-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-bottom: 8px;
}
.gif-category-tile {
  position: relative;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #18181B;
  border: 1px solid #27272A;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.gif-category-tile:hover,
.gif-category-tile:active {
  transform: scale(1.02);
  border-color: #5865F2;
}
.gif-category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  transition: filter 0.15s ease;
}
.gif-category-tile:hover img {
  filter: brightness(0.8);
}
.gif-cat-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.5px;
  padding: 8px;
  text-align: center;
  pointer-events: none;
}
.gif-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1C1C20;
  border: 1px solid #27272A;
  color: #E4E4E7;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s ease;
}
.gif-back-btn:hover {
  background: #27272A;
  color: #FFFFFF;
  border-color: #3F3F46;
}
.gif-results-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-bottom: 8px;
}
.gif-masonry-item {
  width: 100%;
  height: 95px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #18181B;
  border: 1px solid #202024;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.gif-masonry-item:hover,
.gif-masonry-item:active {
  transform: scale(1.03);
  border-color: #5865F2;
}
.gif-masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gif-loading-state {
  text-align: center;
  padding: 30px 10px;
  color: #71717A;
  font-size: 12px;
}

/* 5. In-Chat Rendered GIF (Discord-Style with GIF Badge) */
.chat-gif-inline {
  position: relative;
  display: inline-block;
  max-width: 280px;
  max-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
  border: 1px solid #27272A;
  margin: 2px 0;
}
.chat-gif-inline img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}
.chat-gif-inline:hover img {
  opacity: 0.94;
}
.chat-gif-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* 6. In-Chat Standalone Sticker (Discord-Style 160px with Drop Shadow) */
.chat-sticker-standalone {
  display: inline-block;
  margin: 4px 0;
  background: transparent !important;
  border: none !important;
}
.chat-sticker-standalone img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}
.chat-sticker-standalone img:hover {
  transform: scale(1.08);
}

/* 7. Discord-Style Open Graph Link Embed Card */
.chat-link-embed-placeholder {
  display: none;
}
.chat-link-embed {
  display: flex;
  background: #111113;
  border: 1px solid #27272A;
  border-radius: 8px;
  overflow: hidden;
  max-width: 320px;
  margin-top: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.chat-link-embed:hover {
  border-color: #3F3F46;
  background: #141417;
}
.embed-accent-bar {
  width: 4px;
  background: #5865F2; /* Discord blurple */
  flex-shrink: 0;
}
.embed-body {
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.embed-site {
  font-size: 10px;
  font-weight: 700;
  color: #8E9297;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.embed-title {
  font-size: 13px;
  font-weight: 700;
  color: #00AFF4;
  line-height: 1.35;
  word-break: break-word;
}
.chat-link-embed:hover .embed-title {
  text-decoration: underline;
}
.embed-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: #A1A1AA;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.embed-thumb {
  margin-top: 6px;
  border-radius: 6px;
  max-width: 100%;
  max-height: 160px;
  object-fit: cover;
  border: 1px solid #27272A;
}

/* 8. Voice Playback Audio Waveform Simulation */
.voice-waveform-track {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 4px;
}
.waveform-bars-bg {
  display: flex;
  align-items: center;
  gap: 2.5px;
  width: 100%;
  height: 100%;
}
.waveform-bar {
  width: 2.5px;
  background: #3F3F46;
  border-radius: 2px;
  transition: background 0.1s ease;
}
.waveform-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
  transition: width 0.08s linear;
  border-radius: 4px;
}

/* 9. GIPHY Compliance Attribution */
.giphy-attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px 10px 12px;
  font-size: 10px;
  color: #71717A;
  letter-spacing: 0.5px;
}
.giphy-attribution span {
  font-weight: 600;
}

/* ==============================================================================
   JACK ESPORTS CLAN MUSIC & RADIO SYSTEM (PURE SOLID OLED BLACK AESTHETIC)
   ============================================================================== */

/* 1. Floating Mini-Player */
.music-mini-player {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 8px);
  height: 56px;
  background: #0D0D10;
  border: 1px solid #27272A;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 900;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.28s ease, bottom 0.25s ease;
  overflow: hidden;
}

body.dm-conversation-active .music-mini-player {
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
}

.mini-player-track-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.mini-player-cover-box {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
  background: #09090b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-cd-disc {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at center, transparent 38%, rgba(20, 20, 26, 0.88) 39%, rgba(25, 25, 34, 0.96) 100%),
    conic-gradient(from 180deg at 50% 50%, #171822 0deg, #3d4253 45deg, #171822 90deg, #533b61 140deg, #171822 180deg, #2d4c67 230deg, #171822 270deg, #613444 320deg, #171822 360deg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.music-mini-player.playing .mini-cd-disc {
  animation: cdRotate 12s linear infinite;
}

.music-mini-player:not(.playing) .mini-cd-disc {
  animation: cdRotate 12s linear infinite;
  animation-play-state: paused;
}

.mini-cd-holo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 45deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.15) 45deg, transparent 90deg, rgba(255, 255, 255, 0.15) 225deg, transparent 270deg);
  mix-blend-mode: screen;
  pointer-events: none;
}

.mini-cd-center-img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  z-index: 2;
}

.mini-cd-spindle {
  position: absolute;
  z-index: 3;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #09090b;
  border: 1px solid #d4d4d8;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}

.mini-player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.mini-player-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.mini-player-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.mini-player-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mini-player-artist {
  font-size: 11px;
  color: #A1A1AA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-player-dot {
  color: #52525B;
  font-size: 10px;
}

.mini-player-target-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.mini-player-target-badge.target-phone {
  background: rgba(255, 255, 255, 0.08);
  color: #D4D4D8;
  border: 1px solid #3F3F46;
}

.mini-player-target-badge.target-discord {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.mini-player-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 3-Bar Equalizer */
.mini-player-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 14px;
  margin-right: 4px;
}

.eq-bar {
  width: 3px;
  background: #10B981;
  border-radius: 1px;
  height: 4px;
  transition: height 0.15s ease;
}

.mini-player-equalizer:not(.paused) .eq-bar-1 {
  animation: eqBounce1 0.75s ease-in-out infinite alternate;
}

.mini-player-equalizer:not(.paused) .eq-bar-2 {
  animation: eqBounce2 0.55s ease-in-out infinite alternate;
}

.mini-player-equalizer:not(.paused) .eq-bar-3 {
  animation: eqBounce3 0.85s ease-in-out infinite alternate;
}

@keyframes eqBounce1 { 0% { height: 3px; } 100% { height: 14px; } }
@keyframes eqBounce2 { 0% { height: 12px; } 100% { height: 4px; } }
@keyframes eqBounce3 { 0% { height: 4px; } 100% { height: 13px; } }

.mini-player-btn {
  background: transparent;
  border: none;
  color: #D4D4D8;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-player-btn:active {
  transform: scale(0.92);
  color: #FFFFFF;
}

.mini-player-btn-play {
  background: #FFFFFF;
  color: #000000;
}

.mini-player-btn-play:active {
  background: #E4E4E7;
  color: #000000;
}

.mini-player-btn-dismiss {
  color: #71717A;
}

.mini-player-btn-dismiss:hover {
  color: #EF4444;
}

.mini-player-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #18181B;
}

.mini-player-progress-fill {
  height: 100%;
  background: #10B981;
  transition: width 0.15s linear;
}

/* 2. Full-Screen OLED Music Modal */
.music-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.music-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ==============================================================================
   NOIR STUDIO MUSIC ENGINE & RESPONSIVE DESIGN SYSTEM
   Optimized for Phone (Mobile Touch) & PC (Desktop Studio Console)
   ============================================================================== */
:root {
  --noir-bg: #000000;
  --noir-panel: #080808;
  --noir-card: #0d0d10;
  --noir-line: #242424;
  --noir-line-subtle: #191919;
  --noir-muted: #73736e;
  --noir-soft: #b7b7b2;
  --noir-accent: #10B981;
  --noir-accent-sage: #c6d5a2;
  --noir-mono: 'DM Mono', 'JetBrains Mono', monospace;
  --noir-head: 'Manrope', 'Inter', sans-serif;
  --range-progress: 0%;
}

.music-player-modal {
  background: var(--noir-bg);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* PC / Desktop (>= 768px): Centered Floating Studio Dashboard */
@media (min-width: 768px) {
  .music-player-modal {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(1040px, 94vw);
    height: min(880px, 90vh);
    max-height: 90vh;
    border-radius: 20px;
    border: 1px solid var(--noir-line);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.98), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.96) translateY(18px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  }

  .music-player-modal.open {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  .music-modal-handle-bar {
    display: none;
  }

  .music-modal-header {
    height: 72px;
    padding: 0 28px;
    border-bottom: 1px solid var(--noir-line);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    flex-shrink: 0;
  }

  .noir-brand-wrap {
    justify-self: start;
  }

  .music-output-selector {
    justify-self: center;
    margin: 0 auto;
    flex-basis: auto;
    width: auto;
  }

  .noir-header-actions {
    justify-self: end;
  }

  .music-modal-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 36px 32px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
}

/* Phone / Mobile (< 768px): Bottom Sliding Studio Drawer */
@media (max-width: 767px) {
  .music-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px 20px 0 0;
    border: 1px solid var(--noir-line);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.18, 0.9, 0.28, 1);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .music-player-modal.open {
    transform: translateY(0);
  }

  .music-modal-handle-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0 4px 0;
    cursor: pointer;
  }

  .music-modal-handle-pill {
    width: 36px;
    height: 4px;
    background: #3F3F46;
    border-radius: 9999px;
  }

  .music-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #18181B;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 8px;
  }

  .noir-brand-wrap {
    flex: 1;
    min-width: 0;
  }

  .music-modal-title {
    white-space: nowrap;
    font-size: 13px;
  }

  .noir-header-actions {
    flex-shrink: 0;
  }

  .music-output-selector {
    flex-basis: 100%;
    order: 3;
    width: 100%;
    display: flex;
    justify-content: stretch;
  }

  .output-tab-btn {
    flex: 1;
    justify-content: center;
  }

  .music-modal-scroll-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 24px 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
}

/* Header Elements */
.noir-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.noir-brand-mark {
  width: 18px;
  height: 18px;
  border: 1px solid #8e8e88;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.noir-brand-mark span {
  width: 5px;
  height: 5px;
  background: var(--noir-accent);
  border-radius: 50%;
}

.brand-dot {
  color: var(--noir-accent);
  margin-left: 2px;
}

.music-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.music-modal-title {
  font-family: var(--noir-head);
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.music-modal-subtitle {
  font-family: var(--noir-mono);
  font-size: 9px;
  color: var(--noir-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.music-modal-close-btn,
.music-modal-share-btn {
  background: #141416;
  border: 1px solid var(--noir-line);
  color: #D4D4D8;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-modal-close-btn:hover,
.music-modal-share-btn:hover {
  background: #1e1e22;
  color: #FFFFFF;
}

.music-modal-close-btn:active,
.music-modal-share-btn:active {
  transform: scale(0.92);
}

.music-output-selector {
  display: flex;
  gap: 4px;
  background: #09090C;
  border: 1px solid var(--noir-line);
  border-radius: 999px;
  padding: 3px;
}

.output-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--noir-muted);
  padding: 6px 12px;
  font-family: var(--noir-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.output-tab-btn.active {
  background: #18181B;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

#output-tab-discord.active {
  color: var(--noir-accent);
}

/* Sub-Nav Pills */
.music-sub-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--noir-line-subtle);
  padding: 10px 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.music-sub-nav::-webkit-scrollbar {
  display: none;
}

.music-sub-tab {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: #080808;
  border: 1px solid var(--noir-line);
  color: #888888;
  padding: 8px 14px;
  font-family: var(--noir-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.music-sub-tab:hover {
  background: #141414;
  color: #DDDDDD;
  border-color: #383838;
}

.music-sub-tab.active {
  background: #151515;
  color: #FFFFFF;
  border-color: var(--noir-accent);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.18);
}

.music-sub-tab.active svg {
  color: var(--noir-accent);
}

/* Hero Player Card */
.music-hero-card {
  background: #070709;
  border: 1px solid var(--noir-line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}

/* PC: 2-Column Split Layout */
@media (min-width: 768px) {
  .player-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(24px, 3.5vw, 48px);
    align-items: start;
    text-align: left;
  }

  .cover-column {
    width: 280px;
    flex-shrink: 0;
  }

  .cover-frame {
    width: 280px;
    height: 280px;
  }

  .player-details {
    padding-top: 4px;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
}

/* Phone: Ergonomic Vertical Flow */
@media (max-width: 767px) {
  .music-hero-card {
    padding: 16px 14px;
  }

  .player-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .cover-column {
    width: 180px;
    max-width: 180px;
    margin: 0 auto;
  }

  .cover-frame {
    width: 180px;
    height: 180px;
  }

  .player-details {
    width: 100%;
    min-width: 0;
  }

  .track-context {
    justify-content: center;
  }

  .volume-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 14px;
  }
}

/* ==============================================================================
   RETRO-FUTURISTIC CD TURNTABLE DECK & COMPACT DISC
   ============================================================================== */
.cover-column {
  width: 100%;
}

.cd-deck-chassis {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 50%, #17181c 0%, #0d0e12 85%, #08080a 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #272832;
  box-shadow: 
    0 24px 50px rgba(0, 0, 0, 0.95),
    inset 0 1px 1px rgba(255, 255, 255, 0.08),
    inset 0 -1px 2px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.cd-deck-chassis:hover {
  box-shadow: 
    0 28px 60px rgba(0, 0, 0, 0.98),
    inset 0 1px 2px rgba(255, 255, 255, 0.14);
}

.cd-deck-chassis:active {
  transform: scale(0.99);
}

/* Digital Audio Badge Top Left */
.cd-digital-audio-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--noir-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: #71717A;
  background: rgba(10, 10, 12, 0.78);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.cd-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3B82F6;
  box-shadow: 0 0 6px #3B82F6;
  animation: cdPulseDot 2s infinite ease-in-out;
}

.music-player-modal.playing .cd-badge-dot {
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
}

@keyframes cdPulseDot {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Recessed Turntable Bay */
.cd-turntable-bay {
  position: relative;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(circle at center, #09090b 30%, #111114 80%, #191a20 100%);
  box-shadow: 
    inset 0 6px 20px rgba(0, 0, 0, 0.95),
    inset 0 -2px 10px rgba(255, 255, 255, 0.03),
    0 1px 1px rgba(255, 255, 255, 0.06);
  border: 1px solid #202128;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Optical Laser Tonearm */
.cd-laser-arm {
  position: absolute;
  top: 12%;
  right: 12%;
  width: 32%;
  height: 3px;
  background: linear-gradient(90deg, #3f3f46 0%, #71717a 50%, #27272a 100%);
  transform-origin: 90% 50%;
  transform: rotate(38deg);
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.85);
  z-index: 4;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cd-laser-pivot {
  position: absolute;
  right: -8px;
  top: -6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #71717a 0%, #27272a 70%, #09090b 100%);
  border: 1px solid #52525b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.cd-laser-head {
  position: absolute;
  left: -4px;
  top: -5px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #18181b;
  border: 1px solid #52525b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-laser-diode {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #06b6d4;
  box-shadow: 0 0 6px #06b6d4;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.music-player-modal.playing .cd-laser-diode {
  opacity: 1;
  box-shadow: 0 0 8px #06b6d4, 0 0 16px #06b6d4;
  animation: laserPulse 1.2s infinite alternate ease-in-out;
}

@keyframes laserPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}

.cd-laser-beam {
  position: absolute;
  left: 2px;
  top: 6px;
  width: 1px;
  height: 25px;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.9) 0%, rgba(6, 182, 212, 0) 100%);
  opacity: 0;
  filter: blur(0.5px);
  pointer-events: none;
}

.music-player-modal.playing .cd-laser-beam {
  opacity: 0.75;
}

/* ==============================================================================
   PHYSICAL COMPACT DISC (CD) - POLYCARBONATE, DATA GROOVES, & ROTATION
   ============================================================================== */
.cd-disc {
  position: relative;
  width: 92%;
  height: 92%;
  border-radius: 50%;
  /* Polycarbonate reflective base */
  background: 
    radial-gradient(circle at center, transparent 36%, rgba(18, 18, 22, 0.86) 37%, rgba(24, 24, 30, 0.96) 68%, rgba(12, 12, 15, 0.99) 100%),
    conic-gradient(from 180deg at 50% 50%,
      #14151b 0deg,
      #232630 32deg,
      #474e5f 52deg,
      #1d1f27 76deg,
      #2f2038 118deg,
      #6a4f7e 142deg,
      #1b1f2d 168deg,
      #24374a 208deg,
      #446b8c 232deg,
      #191c25 258deg,
      #3f2330 302deg,
      #7d3f54 328deg,
      #14151b 360deg
    );
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 
    0 12px 35px rgba(0, 0, 0, 0.95),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 15px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
  will-change: transform;
}

/* Spinning Animation for Playing State */
.music-player-modal.playing .cd-disc {
  animation: cdRotate 14s linear infinite;
}

.music-player-modal:not(.playing) .cd-disc {
  animation: cdRotate 14s linear infinite;
  animation-play-state: paused;
}

@keyframes cdRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hologram Iridescent Specular Flares */
.cd-hologram-layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: 
    conic-gradient(from 45deg at 50% 50%,
      rgba(255, 255, 255, 0) 0deg,
      rgba(255, 255, 255, 0.14) 40deg,
      rgba(147, 197, 253, 0.15) 55deg,
      rgba(244, 114, 182, 0.12) 70deg,
      rgba(255, 255, 255, 0) 95deg,
      rgba(255, 255, 255, 0) 180deg,
      rgba(255, 255, 255, 0.14) 220deg,
      rgba(147, 197, 253, 0.15) 235deg,
      rgba(244, 114, 182, 0.12) 250deg,
      rgba(255, 255, 255, 0) 275deg
    );
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Concentric Audio Data Spiral Grooves */
.cd-grooves-layer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0px,
    transparent 2px,
    rgba(255, 255, 255, 0.016) 3px
  );
  pointer-events: none;
}

/* Clear Polycarbonate Clamping Ring Area */
.cd-clamping-ring {
  position: absolute;
  width: 48%;
  height: 48%;
  border-radius: 50%;
  background: radial-gradient(circle at center, transparent 72%, rgba(255, 255, 255, 0.08) 85%, transparent 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* ==============================================================================
   SONG THEME PHOTO AT SMALL ICON / CENTER LABEL IN MIDDLE
   ============================================================================== */
.cd-center-label {
  position: relative;
  z-index: 2;
  width: 36%;
  height: 36%;
  border-radius: 50%;
  overflow: hidden;
  background: #111114;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 
    0 4px 14px rgba(0, 0, 0, 0.9),
    inset 0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-center-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.cd-center-overlay-grain {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.35) 90%);
  pointer-events: none;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
}

/* Center Spindle Hole with Chrome Clamp Bevel */
.cd-spindle-hole {
  position: absolute;
  z-index: 3;
  width: 13%;
  height: 13%;
  border-radius: 50%;
  background: #09090b;
  border: 1.5px solid #a1a1aa;
  box-shadow: 
    inset 0 2px 5px rgba(0, 0, 0, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-spindle-hub {
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e4e4e7 0%, #71717a 60%, #18181b 100%);
  border: 0.5px solid #27272a;
}

.cover-number {
  position: absolute;
  top: 13px;
  right: 13px;
  font-family: var(--noir-mono);
  font-size: 10px;
  color: #D2D2CB;
  z-index: 5;
  background: rgba(10, 10, 12, 0.78);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.art-caption {
  position: absolute;
  z-index: 5;
  left: 13px;
  bottom: 13px;
  color: #DDDDDD;
  font-family: var(--noir-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: rgba(10, 10, 12, 0.78);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.cover-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-family: var(--noir-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--noir-muted);
  text-transform: uppercase;
}

/* Track Context, Titles, Scrubber */
.track-context {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--noir-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--noir-muted);
  text-transform: uppercase;
}

.context-line {
  width: 19px;
  height: 1px;
  background: var(--noir-accent-sage);
}

.track-tag-pill {
  font-family: var(--noir-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.14);
  color: var(--noir-accent);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.now-title {
  margin-top: 14px;
}

.now-title h2 {
  font-family: var(--noir-head);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.25;
  margin: 0;
  color: #F1F0EB;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.now-meta-row {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: #999999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-dot {
  color: #555555;
  margin: 0 4px;
}

/* Scrubber / Progress Slider */
.progress-area {
  margin-top: 20px;
  width: 100%;
}

.music-slider-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: #1F1F24;
  border-radius: 3px;
  cursor: pointer;
  overflow: visible;
}

.music-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--noir-accent);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.music-slider-thumb {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #FFFFFF;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: left 0.1s linear;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--noir-mono);
  font-size: 9px;
  color: #777777;
  margin-top: 8px;
}

/* Transport Controls */
.transport {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 330px;
  margin: 18px 0 0 0;
  width: 100%;
}

@media (max-width: 767px) {
  .transport {
    margin: 18px auto 0 auto;
  }
}

.music-control-btn {
  background: transparent;
  border: none;
  color: #A1A1AA;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.music-control-btn:hover {
  color: #FFFFFF;
}

.music-control-btn:active {
  transform: scale(0.9);
}

.music-control-btn.active {
  color: var(--noir-accent);
}

.music-control-btn.skip {
  color: #D8D8D1;
}

.play-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #EEEEEE;
  display: grid;
  place-items: center;
  color: #080808;
  border: none;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

.play-button:hover {
  background: var(--noir-accent-sage);
  transform: scale(1.05);
}

.play-button:active {
  transform: scale(0.94);
}

/* Volume Row */
.volume-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: #6E6E68;
}

.volume-row .music-volume-slider {
  width: 90px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: #27272A;
  border-radius: 2px;
  outline: none;
}

.volume-row .music-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: #D4D4D8;
  border-radius: 50%;
  cursor: pointer;
}

.music-volume-val {
  font-family: var(--noir-mono);
  font-size: 9px;
  color: var(--noir-muted);
  width: 25px;
}

.queue-count {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--noir-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #888888;
  background: transparent;
  border: 1px solid var(--noir-line);
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}

.queue-count:hover {
  color: #EEEEEE;
  border-color: #444444;
  background: #141414;
}

.queue-pill-count {
  background: rgba(16, 185, 129, 0.16);
  color: var(--noir-accent);
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 700;
}

/* Discord VC Status Banner */
.music-vc-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #09090C;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.vc-banner-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vc-banner-meta {
  flex: 1;
  min-width: 0;
}

.vc-banner-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--noir-accent);
}

.vc-banner-channel {
  font-size: 11px;
  color: #71717A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-section-heading {
  font-size: 10px;
  font-weight: 800;
  color: #71717A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* 24/7 Gamer Stations Grid */
.music-stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.music-station-card {
  position: relative;
  background: #0D0D10;
  border: 1px solid #27272A;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.music-station-card:hover {
  border-color: #3F3F46;
  transform: translateY(-2px);
}

.music-station-card:active {
  transform: scale(0.97);
}

.music-station-card.active {
  border-color: #10B981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.station-cover-wrap {
  position: relative;
  width: 100%;
  height: 90px;
  overflow: hidden;
  background: #18181B;
}

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

.station-tag-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.75);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 5px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.station-body {
  padding: 8px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.station-name {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-desc {
  font-size: 10px;
  color: #71717A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Featured Tracks List */
.music-featured-list,
.music-queue-list,
.music-search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* NOIR Studio Track Rows (PC Desktop Table & Phone Compact Grid) */
.music-track-row {
  background: #09090B;
  border-bottom: 1px solid #161618;
  padding: 10px 12px;
  align-items: center;
  transition: background 0.18s ease;
  cursor: pointer;
  border-radius: 6px;
}

.music-track-row:hover {
  background: #121215;
}

.music-track-row.is-active {
  background: #0e1411;
  border-left: 2px solid var(--noir-accent);
}

/* PC: 6-Column Studio Table */
@media (min-width: 768px) {
  .music-track-row {
    display: grid;
    grid-template-columns: 28px 44px minmax(0, 1.2fr) 26% 60px 105px;
    gap: 14px;
    min-height: 60px;
  }

  .track-mobile-meta {
    display: none;
  }

  .track-row-album {
    font-family: var(--noir-mono);
    font-size: 10px;
    color: #777777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
  }
}

/* Phone: 5-Column Compact Touch Grid */
@media (max-width: 767px) {
  .music-track-row {
    display: grid;
    grid-template-columns: 20px 38px minmax(0, 1fr) 36px auto;
    gap: 8px;
    padding: 8px 6px;
  }

  .track-row-album {
    display: none;
  }

  .track-mobile-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
  }

  .track-action-btn {
    padding: 4px 6px;
    font-size: 8px;
    gap: 3px;
  }

  .track-row-title {
    font-size: 12.5px;
  }
}

.track-index-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.track-index {
  font-family: var(--noir-mono);
  font-size: 10px;
  color: #62625D;
}

.is-active .track-index {
  color: var(--noir-accent);
}

.track-row-thumb {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  object-fit: cover;
  background: #18181B;
  border: 1px solid var(--noir-line);
}

.track-row-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.track-row-title {
  font-family: var(--noir-head);
  font-size: 12px;
  font-weight: 700;
  color: #D8D8D2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.is-active .track-row-title {
  color: var(--noir-accent);
}

.track-row-artist {
  font-size: 10px;
  color: #777777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row-time {
  font-family: var(--noir-mono);
  font-size: 10px;
  color: #777777;
  text-align: right;
}

/* Running Equalizer Bars */
.playing-bars {
  height: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.playing-bars i {
  width: 2px;
  background: var(--noir-accent);
  animation: equalize 0.7s ease-in-out infinite alternate;
  height: 45%;
  border-radius: 1px;
}

.playing-bars i:nth-child(2) {
  animation-delay: 0.2s;
  height: 100%;
}

.playing-bars i:nth-child(3) {
  animation-delay: 0.4s;
  height: 65%;
}

@keyframes equalize {
  to { height: 25%; }
}

.track-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.track-action-btn {
  background: #18181B;
  border: 1px solid #27272A;
  color: #D4D4D8;
  padding: 5px 8px;
  font-family: var(--noir-mono);
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.track-action-btn:hover {
  background: #27272A;
  color: #FFFFFF;
}

.track-action-btn.btn-emerald {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--noir-accent);
}

/* Search Box */
.music-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0D0D10;
  border: 1px solid #27272A;
  border-radius: 10px;
  padding: 4px 6px 4px 12px;
  margin-bottom: 14px;
}

.music-search-icon {
  color: #71717A;
  display: flex;
  align-items: center;
}

.music-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-size: 13px;
}

.music-search-input::placeholder {
  color: #52525B;
}

.music-search-submit-btn {
  background: #18181B;
  border: 1px solid #27272A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* Empty State */
.music-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  gap: 6px;
}

.music-empty-state .empty-title {
  font-size: 13px;
  font-weight: 700;
  color: #D4D4D8;
  margin-top: 6px;
}

.music-empty-state .empty-sub {
  font-size: 11px;
  color: #71717A;
  max-width: 260px;
}

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

.btn-zinc-sm {
  background: #18181B;
  border: 1px solid #27272A;
  color: #A1A1AA;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-zinc-sm:hover {
  color: #FFFFFF;
  border-color: #3F3F46;
}

/* ==============================================================================
   UNIVERSAL MUSIC SEARCH & 320KBPS LOSSLESS MASTER UI
   ============================================================================== */
.music-universal-search-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.music-universal-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0A0A0D;
  border: 1px solid #27272A;
  border-radius: 12px;
  padding: 6px 12px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.music-universal-search-bar:focus-within {
  border-color: #10B981;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.music-universal-search-icon {
  color: #71717A;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.music-universal-search-bar:focus-within .music-universal-search-icon {
  color: #10B981;
}

.music-global-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  padding: 4px 0;
}

.music-global-search-input::placeholder {
  color: #52525B;
  font-size: 12px;
}

.music-search-clear-btn {
  background: #18181B;
  border: 1px solid #27272A;
  color: #A1A1AA;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.music-search-clear-btn:hover {
  background: #27272A;
  color: #FFFFFF;
}

/* Trending Suggestion Chips Row */
.music-trending-chips-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.music-trending-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #52525B;
  flex-shrink: 0;
}

.music-trending-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}

.music-trending-chips::-webkit-scrollbar {
  display: none;
}

.music-chip {
  background: #0E0E12;
  border: 1px solid #27272A;
  color: #A1A1AA;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.music-chip:hover {
  background: #18181C;
  border-color: #3F3F46;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.music-chip:active {
  transform: scale(0.95);
}

/* Lossless Master Quality Guarantee Banner */
.music-lossless-callout {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  letter-spacing: 0.02em;
}

/* Live Search Results Container */
.music-live-search-container {
  background: #0A0A0D;
  border: 1px solid #27272A;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: musicFadeIn 0.2s ease-out;
}

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

.music-live-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #18181B;
}

/* Track Quality & Source Pills */
.track-lossless-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

.track-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  font-weight: 700;
  color: #71717A;
  background: #18181B;
  border: 1px solid #27272A;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
}

.track-source-badge.badge-vault {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.track-source-badge.badge-spotify {
  color: #1DB954;
  background: rgba(29, 185, 84, 0.12);
  border-color: rgba(29, 185, 84, 0.35);
}

.track-source-badge.badge-yt {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

.track-source-badge.badge-apple {
  color: #FA586A;
  background: rgba(250, 88, 106, 0.12);
  border-color: rgba(250, 88, 106, 0.35);
}

/* ==============================================================================
   CLAN VAULT (70+ STUDIO MASTERS)
   ============================================================================== */
.vault-header-wrap {
  margin-bottom: 12px;
}

.vault-cat-chips-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.vault-cat-chips-scroll::-webkit-scrollbar {
  display: none;
}

.vault-cat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #0E0E12;
  border: 1px solid #27272A;
  color: #A1A1AA;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.vault-cat-chip:hover {
  background: #18181C;
  border-color: #3F3F46;
  color: #FFFFFF;
}

.vault-cat-chip.active {
  background: #18181B;
  color: #10B981;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.vault-cat-chip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ==============================================================================
   SPOTIFY WEB EMBED PLAYER
   ============================================================================== */
.spotify-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.spotify-input-row .music-search-input {
  background: #0A0A0D;
  border: 1px solid #27272A;
  border-radius: 10px;
  padding: 8px 12px;
}

.spotify-presets-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.spotify-frame-container {
  background: #000000;
  border: 1px solid #27272A;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  min-height: 152px;
}

.spotify-frame-container iframe {
  display: block;
  border: none;
  width: 100%;
}

/* ==============================================================================
   SPOTIFY STUDIO MIRROR (FULL 320KBPS LOSSLESS)
   ============================================================================== */
.spotify-mirror-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0E0E12;
  border: 1px solid #27272A;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.spotify-mirror-artwork {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #1F1F24;
}

.spotify-mirror-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotify-mirror-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotify-pill-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(29, 185, 84, 0.15);
  color: #1DB954;
  border: 1px solid rgba(29, 185, 84, 0.35);
}

.spotify-pill-count {
  font-size: 10px;
  font-weight: 700;
  color: #71717A;
}

.spotify-mirror-title {
  font-size: 14px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-mirror-sub {
  font-size: 11px;
  font-weight: 600;
  color: #A1A1AA;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotify-mirror-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-spotify-play-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1DB954;
  color: #000000;
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-spotify-play-all:hover {
  background: #1ed760;
  transform: scale(1.02);
}

.btn-spotify-toggle-embed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #18181B;
  color: #A1A1AA;
  border: 1px solid #27272A;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

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

.spotify-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  background: #0A0A0D;
  border: 1px dashed #27272A;
  border-radius: 14px;
  gap: 8px;
  margin-bottom: 12px;
}




