/* ── Dollah-style global palette ── */
:root {
  --bg-canvas: #0D1117;       /* main body / canvas */
  --bg-shell: #151A23;        /* top header + left sidebar */
  --bg-card: #1E2532;         /* inner boxes, stats, offer rows */
  --bg-card-hover: #252D3C;   /* card hover */
  --bg-input: #161C27;        /* inputs / deeper wells */
  --border-subtle: #2A3344;   /* standard borders */
  --border-soft: #343E50;     /* slightly stronger borders */
  --text-primary: #F8FAFC;    /* bright off-white */
  --text-secondary: #94A3B8;  /* muted labels */
  --text-muted: #64748B;      /* quieter secondary */
  --accent: #00d672;          /* brand green (unchanged) */
  --accent-dark: #00b85c;
}

body {
      background-color: var(--bg-canvas);
      color: var(--text-secondary);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      user-select: none;
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
      letter-spacing: 0.01em;
    }
    /* Image load placeholder (dollah-style) — shows until image loads */
    img {
      background-color: var(--border-subtle);
    }
    .offer-img-placeholder,
    .img-placeholder {
      background-color: var(--border-subtle) !important;
    }

    .custom-scroll::-webkit-scrollbar { width: 5px; height: 5px; }
    .custom-scroll::-webkit-scrollbar-track { background: var(--bg-canvas); }
    .custom-scroll::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }
    .custom-scroll::-webkit-scrollbar-thumb:hover { background: var(--bg-card-hover); }
    /* ── Sidebar nav active states (restored) ── */
    .nav-active {
      background-color: #00d672 !important;
      color: #061910 !important;
      font-weight: 700 !important;
    }
    .nav-active i {
      color: #061910 !important;
    }
    .cat-active {
      background-color: #16202a !important;
      color: #00d672 !important;
      font-weight: 600 !important;
      border-left: 3px solid #00d672 !important;
    }
    .cat-active .cat-badge {
      background-color: #00d672 !important;
      color: #061910 !important;
    }
    @keyframes toastSlideIn {
      0% { opacity: 0; transform: translateY(25px) scale(0.95); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .toast-animate-in {
      animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    .modal-backdrop {
      background: rgba(4, 8, 12, 0.78);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    @keyframes modalIn {
      0% { opacity: 0; transform: translateY(16px) scale(0.97); }
      100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .modal-card {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      animation: modalIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      box-shadow:
        0 0 0 1px rgba(255,255,255,0.04),
        0 24px 64px rgba(0,0,0,0.55),
        0 0 80px rgba(0, 214, 114, 0.06);
    }
    /* Only TOP thin strip — moving colors (not 4 sides) */
    .modal-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: linear-gradient(
        90deg,
        #00d672,
        #34d399,
        #22d3ee,
        #a78bfa,
        #f472b6,
        #fbbf24,
        #00d672
      );
      background-size: 200% 100%;
      animation: topStripFlow 3s linear infinite;
      pointer-events: none;
      z-index: 6;
    }
    @keyframes topStripFlow {
      0% { background-position: 0% 50%; }
      100% { background-position: 200% 50%; }
    }
    .auth-input:focus {
      border-color: #00d672 !important;
      box-shadow: 0 0 0 3px rgba(0, 214, 114, 0.12);
    }
    .auth-submit-btn {
      background: linear-gradient(135deg, #00e67a 0%, #00d672 45%, #00b85c 100%);
      transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s;
    }
    .auth-submit-btn:hover {
      filter: brightness(1.05);
      box-shadow: 0 8px 28px rgba(0, 214, 114, 0.35);
      transform: translateY(-1px);
    }
    .auth-submit-btn:active { transform: translateY(0); }
    .notif-item {
      background-color: var(--border-subtle) !important;
      border: 1px solid rgba(255, 255, 255, 0.05) !important;
      transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
    }
    .notif-item:hover {
      background-color: var(--bg-card-hover) !important;
      transform: translateY(-1px);
      border-color: rgba(0, 214, 114, 0.35) !important;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

    /* Shared LARGE card / Wizard panel — identical fixed position + size (zero offset between views) */
    #profile-dropdown,
    #notifications-modal,
    #daily-claim-modal {
      position: fixed !important;
      top: 4.25rem !important;   /* under header */
      right: 0.75rem !important; /* same right edge */
      left: auto !important;
      margin: 0 !important;
      width: min(380px, calc(100vw - 1.5rem)) !important;
      height: min(80vh, calc(100vh - 5rem)) !important;
      max-height: min(80vh, calc(100vh - 5rem)) !important;
      background: var(--bg-card);
      border: 1px solid var(--border-soft);
      border-radius: 18px;
      box-shadow: 0 20px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.03);
      overflow: hidden;
      z-index: 9999 !important;
      flex-direction: column;
    }
    #notifications-modal,
    #daily-claim-modal {
      background-color: var(--bg-card) !important;
      display: none;
      opacity: 0;
      transform: translateY(-8px) scale(0.98);
      transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
    }
    #notifications-modal.notif-dropdown-open,
    #daily-claim-modal.wizard-panel-open,
    #daily-claim-modal.notif-dropdown-open {
      display: flex !important;
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }
    #notifications-modal::before,
    #daily-claim-modal::before {
      content: '';
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, #00d672, #34d399, #22d3ee, #a78bfa, #f472b6, #fbbf24, #00d672);
      background-size: 200% 100%;
      animation: topStripFlow 3s linear infinite;
      pointer-events: none;
      z-index: 6;
      border-radius: 18px 18px 0 0;
    }
    .notif-drawer-panel {
      display: flex;
      flex-direction: column;
      height: 100%;
      width: 100%;
      max-height: inherit;
      min-height: 0;
    }
    /* legacy class kept for safety */
    #notifications-modal.notif-drawer-open {
      display: flex !important;
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }

    /* Polished live-feed controls */
    .feed-toggle {
      display: inline-flex;
      align-items: center;
      background: var(--bg-shell);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 3px;
      gap: 2px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    }
    .feed-toggle-btn {
      font-size: 12px;
      font-weight: 700;
      padding: 7px 14px;
      border-radius: 9px;
      color: var(--text-secondary);
      transition: all 0.2s ease;
      letter-spacing: 0.02em;
    }
    .feed-toggle-btn:hover { color: #fff; }
    .feed-toggle-btn.active {
      background: linear-gradient(135deg, #00d672 0%, #00b85c 100%);
      color: #061910;
      box-shadow: 0 2px 10px rgba(0, 214, 114, 0.35);
    }
    .feed-dropdown-wrap {
      position: relative;
      width: 76px;
    }
    .feed-dropdown-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      width: 100%;
      height: 32px;
      background: var(--bg-shell);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      padding: 0 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-primary);
      cursor: pointer;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .feed-dropdown-btn:hover {
      border-color: var(--accent);
      box-shadow: 0 0 0 1px rgba(0, 214, 114, 0.15);
    }
    .feed-dropdown-btn .coin-icon-xs {
      display: inline-block;
      width: 11px;
      height: 11px;
      flex-shrink: 0;
      filter: drop-shadow(0 0 2px rgba(245, 197, 66, 0.5));
    }
    .feed-dropdown-btn .feed-dd-chevron {
      width: 11px;
      height: 11px;
      flex-shrink: 0;
      color: var(--text-muted);
    }
    .feed-dropdown-menu {
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% + 4px);
      z-index: 40;
      width: 100%;
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      padding: 2px;
      box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.03);
      display: none;
    }
    .feed-dropdown-menu.open { display: block; animation: toastSlideIn 0.2s ease; }
    .feed-dropdown-item {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      text-align: center;
      padding: 4px 2px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-secondary);
      transition: background 0.15s, color 0.15s;
      line-height: 1.25;
    }
    .feed-dropdown-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
    .feed-dropdown-item.selected {
      background: rgba(0, 214, 114, 0.12);
      color: #00d672;
    }
    .feed-row {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: 14px;
      padding: 11px 14px;
      transition: border-color 0.2s, transform 0.15s, background 0.2s;
    }
    .feed-row:hover {
      border-color: rgba(0, 214, 114, 0.4);
      background: var(--bg-card);
      transform: translateY(-1px);
    }
    .section-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
      letter-spacing: 0.01em;
    }
    .section-sub {
      font-size: 11px;
      color: var(--text-muted);
      font-weight: 500;
    }

    /* Live ticker — drag scroll + hover tooltip (shows BELOW chip) */
    #global-live-ticker {
      overflow: visible;
      z-index: 25;
      /* Kill the thin white/gray line under the ticker (above Providers) */
      border: none !important;
      border-bottom: none !important;
      box-shadow: none !important;
    }
    /* Also neutralize any residual divider above main content / Providers */
    #global-live-ticker + *,
    #app-content {
      border-top: none !important;
      box-shadow: none !important;
    }
    #global-live-ticker-track {
      cursor: grab;
      user-select: none;
      -webkit-user-select: none;
      overflow-x: auto;
      overflow-y: hidden;
      /* Hide scrollbar — mouse drag & touch swipe still work */
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    #global-live-ticker-track::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
      background: transparent;
    }
    #global-live-ticker-track.is-dragging {
      cursor: grabbing;
      scroll-behavior: auto;
    }
    #global-live-ticker-track.is-dragging * {
      pointer-events: none;
    }
    #providers-carousel::-webkit-scrollbar,
    #high-earning-carousel::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
      background: transparent;
    }
    #high-earning-carousel {
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    #high-earning-carousel.is-dragging {
      cursor: grabbing !important;
      scroll-behavior: auto;
    }
    #high-earning-carousel.is-dragging * {
      pointer-events: none;
    }

    #providers-carousel.is-dragging {
      cursor: grabbing !important;
      scroll-behavior: auto;
    }
    #providers-carousel.is-dragging * {
      pointer-events: none;
    }
    .ticker-chip {
      position: relative;
      cursor: pointer;
    }
    /* Floating tip is position:fixed via JS so it never gets clipped */
    #ticker-float-tip {
      display: none;
      position: fixed;
      z-index: 9999;
      min-width: 180px;
      max-width: 280px;
      background: var(--bg-card);
      border: 1px solid var(--border-soft);
      border-radius: 12px;
      padding: 10px 12px;
      box-shadow: 0 12px 32px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
      pointer-events: none;
      white-space: normal;
      animation: toastSlideIn 0.18s ease;
    }
    #ticker-float-tip::after {
      content: '';
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 6px solid transparent;
      border-bottom-color: var(--border-soft);
    }

    /* Float toast bottom timing bar — thin solid dark line only (no gray track) */
    .toast-with-timer {
      position: relative;
      overflow: hidden;
    }
    .toast-progress-track {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 3px;
      background: none !important;
      background-color: transparent !important;
      border: none;
      border-radius: 0 0 16px 16px;
      overflow: hidden;
      pointer-events: none;
      z-index: 5;
    }
    .toast-progress-bar {
      display: block;
      height: 100%;
      width: 100%;
      background: #000000;
      border-radius: 0 0 0 16px;
      transform-origin: left center;
      transform: scaleX(1);
      box-shadow: none;
    }
    .toast-progress-bar.run {
      animation: toastProgressShrink linear forwards;
    }
    @keyframes toastProgressShrink {
      from { transform: scaleX(1); }
      to { transform: scaleX(0); }
    }

    /* Daily Claim modal rows */
    .daily-claim-row {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: 14px;
      padding: 12px 14px 10px;
      transition: border-color 0.2s, background 0.2s;
    }
    .daily-claim-row:hover {
      border-color: rgba(0, 214, 114, 0.28);
      background: var(--bg-card-hover);
    }
    .daily-claim-progress-track {
      height: 4px;
      background: var(--bg-input);
      border-radius: 999px;
      overflow: hidden;
      margin-top: 10px;
    }
    .daily-claim-progress-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, #059669, #10b981, #34d399);
      box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
      transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
      width: 0%;
    }
    .daily-claim-btn {
      min-width: 72px;
      height: 30px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.02em;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      transition: transform 0.12s ease, filter 0.15s, background 0.2s, opacity 0.2s, box-shadow 0.2s;
      border: none;
      cursor: pointer;
      padding: 0 12px;
      white-space: nowrap;
    }
    .daily-claim-btn:disabled {
      cursor: not-allowed;
      opacity: 0.55;
      background: var(--border-subtle) !important;
      color: #64748b !important;
      box-shadow: none !important;
      filter: none !important;
    }
    .daily-claim-btn.enabled {
      background: linear-gradient(135deg, #00e67a 0%, #00d672 50%, #00b85c 100%);
      color: #061910;
      box-shadow: 0 4px 16px rgba(0, 214, 114, 0.35);
    }
    .daily-claim-btn.enabled:hover {
      filter: brightness(1.06);
      transform: translateY(-1px);
    }
    .daily-claim-btn.enabled:active {
      transform: translateY(0) scale(0.97);
    }
    .daily-claim-btn.claimed {
      background: rgba(16, 185, 129, 0.15) !important;
      color: #34d399 !important;
      opacity: 1 !important;
      cursor: default;
      box-shadow: none !important;
    }

    /* Coin amounts — white with ~10% gray (not yellow) */
    .coin-amt,
    #header-coins,
    #floating-offer-coins,
    #modal-offer-coins,
    #cashout-current-balance,
    #header-coins-btn {
      color: #e6e6e6 !important;
    }
    #header-coins-btn.text-emerald-400 #header-coins-unit {
      color: #34d399 !important;
    }
    #header-coins-btn:not(.text-emerald-400) #header-coins-unit {
      color: #64748b !important;
    }

    /* Small vibrant yellow coin icon */
    .coin-icon-sm {
      display: inline-block;
      width: 12px;
      height: 12px;
      flex-shrink: 0;
      vertical-align: middle;
      filter: drop-shadow(0 0 3px rgba(245, 197, 66, 0.55));
    }
    .coin-icon-md {
      display: inline-block;
      width: 18px;
      height: 18px;
      flex-shrink: 0;
      vertical-align: middle;
      filter: drop-shadow(0 0 4px rgba(245, 197, 66, 0.5));
    }

    /* Stacked float toasts — newest at bottom, older push up */
    #float-toast-stack {
      position: fixed;
      left: 1.5rem;
      bottom: 1.5rem;
      z-index: 50;
      display: flex;
      flex-direction: column-reverse;
      align-items: flex-start;
      gap: 10px;
      max-width: min(340px, calc(100vw - 2rem));
      pointer-events: none;
    }
    #float-toast-stack .float-toast-card {
      pointer-events: auto;
      position: relative;
      width: 340px;
      max-width: 90vw;
      min-width: 280px;
      background: rgba(36, 52, 71, 0.95);
      border: 1px solid var(--border-soft);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-radius: 16px;
      padding: 14px 16px 16px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.45);
      cursor: pointer;
      transition: border-color 0.2s;
      animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
      will-change: transform, opacity;
    }
    #float-toast-stack .float-toast-card:hover {
      border-color: rgba(0, 214, 114, 0.55);
    }
    /* Jump-up bounce then swipe left off-screen */
    @keyframes jumpAndSwipeLeft {
      0% {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
      }
      25% {
        /* Upward jump / bounce pop */
        transform: translateX(8px) translateY(-10px) scale(1.04);
        opacity: 1;
      }
      100% {
        /* Swift slide-out to the left */
        transform: translateX(-140%) translateY(-10px) scale(0.92);
        opacity: 0;
      }
    }
    #float-toast-stack .float-toast-card.toast-jump-exit {
      animation: jumpAndSwipeLeft 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
      pointer-events: none !important;
    }
    @media (max-width: 640px) {
      #float-toast-stack {
        left: 0.75rem;
        bottom: 0.75rem;
        right: 0.75rem;
        max-width: none;
      }
      #float-toast-stack .float-toast-card {
        width: 100%;
        min-width: 0;
        max-width: none;
      }
    }

/* ── Offer completed earnings toast (realtime postbacks) ── */
.earn-success-toast {
  border-color: rgba(16, 185, 129, 0.45) !important;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(15, 23, 42, 0.96) 55%, rgba(17, 24, 39, 0.98) 100%) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(16, 185, 129, 0.2), 0 0 32px rgba(16, 185, 129, 0.12) !important;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.earn-success-toast.earn-toast-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.earn-success-toast.earn-toast-out {
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.earn-toast-check {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.earn-toast-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.earn-toast-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}


/* Structural shells — force Dollah palette even if Tailwind classes lag */
header,
#left-sidebar,
#header-logo-zone {
  background-color: var(--bg-shell) !important;
}
body,
#main-content,
.main-canvas {
  background-color: var(--bg-canvas) !important;
}
/* Inner cards / stats / offer rows */
.daily-claim-row,
.feed-row,
.notif-item,
.modal-card,
.float-toast-card {
  background-color: var(--bg-card);
}


/* Profile page — centered content column */
.profile-page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .profile-page-wrap {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}


/* LEFT */
.uas-left {
  width: 240px;
  flex-shrink: 0;
  background: #0B1017;
  border-right: 1px solid #1c2533;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}
.uas-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
}
.uas-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #111827;
  border: 2px solid #1e2a38;
  box-shadow: 0 0 0 3px rgba(0, 214, 114, 0.15);
}
.uas-flag {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #111827;
  border: 2px solid #0B1017;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.uas-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.uas-username {
  font-size: 16px;
  font-weight: 800;
  color: #F8FAFC;
  text-align: center;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  max-width: 100%;
  truncate;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.uas-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}
.uas-level-ico {
  font-size: 12px;
  flex-shrink: 0;
  line-height: 1;
}
.uas-level-star { color: #FFC107; }
.uas-level-dstar { color: #60A5FA; font-size: 11px; }
.uas-level-track {
  flex: 1;
  height: 6px;
  background: #111827;
  border-radius: 999px;
  overflow: hidden;
}
.uas-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #00b85c, #00d672, #34d399);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(0, 214, 114, 0.45);
}
.uas-level-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin: 0 0 8px;
}
.uas-joined {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin: 0 0 auto;
  padding-bottom: 16px;
}
.uas-mute-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid #1e2a38;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  margin-top: 12px;
}
.uas-mute-btn:hover {
  background: #1a2230;
  color: #F8FAFC;
  border-color: #2A3344;
}
.uas-mute-btn.is-muted {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

/* RIGHT */
.uas-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0B1017;
  min-height: 0;
  overflow: hidden;
}
.uas-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1c2533;
  flex-shrink: 0;
}
.uas-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #111827;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #1e2a38;
}
.uas-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.uas-pill:hover { color: #F8FAFC; }
.uas-pill-active {
  background: #FFC107 !important;
  color: #0B1017 !important;
  box-shadow: 0 0 16px rgba(255, 193, 7, 0.35);
}
.uas-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #111827;
  border: 1px solid #1e2a38;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.uas-close:hover {
  background: #1a2230;
  color: #F8FAFC;
}
.uas-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 0;
}
.uas-panel.hidden { display: none !important; }

/* Stats 2x2 */
.uas-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.uas-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #111827;
  border: 1px solid #1c2533;
  border-radius: 14px;
  padding: 14px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.uas-stat-card:hover {
  border-color: rgba(0, 214, 114, 0.28);
  background: #131c2b;
}
.uas-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid #1e2a38;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}
.uas-stat-icon.uas-ico-coin { color: #FFC107; }
.uas-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.uas-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.uas-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 2px;
}

/* Sections / tables */
.uas-section {
  margin-bottom: 16px;
}
.uas-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0 0 10px;
}
.uas-table-wrap {
  background: #111827;
  border: 1px solid #1c2533;
  border-radius: 14px;
  overflow: hidden;
}
.uas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.uas-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 10px 12px;
  border-bottom: 1px solid #1c2533;
  background: rgba(0,0,0,0.2);
}
.uas-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(28, 37, 51, 0.7);
  color: #cbd5e1;
  vertical-align: middle;
}
.uas-table tbody tr:last-child td { border-bottom: none; }
.uas-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.uas-offer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #F8FAFC;
  max-width: 160px;
}
.uas-offer-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uas-offer-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #1e2a38;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.uas-reward {
  font-weight: 800 !important;
  color: #FFC107 !important;
  font-variant-numeric: tabular-nums;
}
.uas-provider {
  color: #94a3b8;
  font-size: 11px;
}
.uas-time {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}
.uas-status {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.uas-status-pending {
  background: rgba(255, 193, 7, 0.15);
  color: #FFC107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
.uas-status-paid,
.uas-status-completed,
.uas-status-sent {
  background: rgba(0, 214, 114, 0.12);
  color: #34d399;
  border: 1px solid rgba(0, 214, 114, 0.28);
}
.uas-status-other {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.uas-empty-cell {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  padding: 20px 12px !important;
}
.uas-skeleton-row .uas-skel {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #111827 0%, #1a2230 50%, #111827 100%);
  background-size: 200% 100%;
  animation: uasShimmer 1.2s ease infinite;
}
@keyframes uasShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.uas-badges-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}
.uas-row-enter {
  animation: uasRowIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes uasRowIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .uas-shell {
    flex-direction: column;
    max-height: 92vh;
    width: 100%;
  }
  .uas-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #1c2533;
    padding: 20px 16px 16px;
  }
  .uas-joined { margin-bottom: 8px; padding-bottom: 0; }
  .uas-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .uas-stat-value { font-size: 16px; }
  .uas-table thead th:nth-child(2),
  .uas-table tbody td:nth-child(2) {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   ZXEARN-STYLE Advanced User Statistics Modal
   ═══════════════════════════════════════════════════════════ */
.uas-backdrop {
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.uas-shell {
  display: flex;
  width: min(940px, 100%);
  max-height: min(88vh, 740px);
  background: #0B1017;
  border: 1px solid #1a2332;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── LEFT PROFILE ── */
.uas-left {
  width: 248px;
  flex-shrink: 0;
  background: #0B1017;
  border-right: 1px solid #1a2332;
  padding: 32px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}
.uas-avatar-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
}
.uas-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  background: #111827;
  border: 2.5px solid #1e2a38;
  box-shadow: 0 0 0 4px rgba(0, 214, 114, 0.12);
}
.uas-flag {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #111827;
  border: 2.5px solid #0B1017;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  line-height: 1;
}
.uas-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.uas-username {
  width: 100%;
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 800;
  color: #F8FAFC;
  text-align: center;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uas-level-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}
.uas-level-star {
  color: #FFC107;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}
.uas-level-dstar {
  color: #60A5FA;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.uas-level-track {
  flex: 1;
  height: 7px;
  background: #111827;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #1a2332;
}
.uas-level-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00b85c, #00d672 50%, #34d399);
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(0, 214, 114, 0.5);
}
.uas-level-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}
.uas-joined {
  margin: 0 0 auto;
  padding-bottom: 18px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}
.uas-mute-btn {
  width: 100%;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #111827;
  border: 1px solid #1e2a38;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.uas-mute-btn:hover {
  background: #151c2a;
  color: #F8FAFC;
  border-color: #2A3344;
}
.uas-mute-btn.is-muted {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

/* ── RIGHT HUB ── */
.uas-right {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0B1017;
  overflow: hidden;
}
.uas-right-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #1a2332;
  flex-shrink: 0;
}
.uas-pills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #111827;
  border: 1px solid #1e2a38;
}
.uas-pill {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.uas-pill:hover { color: #F8FAFC; }
.uas-pill-active {
  background: #FFC107 !important;
  color: #0B1017 !important;
  box-shadow: 0 0 18px rgba(255, 193, 7, 0.4);
}
.uas-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #1e2a38;
  background: #111827;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.uas-close:hover {
  background: #151c2a;
  color: #F8FAFC;
}
.uas-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}
.uas-panel.hidden { display: none !important; }

/* Stats 2×2 */
.uas-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.uas-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #111827;
  border: 1px solid #1a2332;
  border-radius: 14px;
  transition: border-color 0.15s, background 0.15s;
}
.uas-stat-card:hover {
  border-color: rgba(0, 214, 114, 0.28);
  background: #121a28;
}
.uas-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #1e2a38;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  flex-shrink: 0;
}
.uas-stat-icon.uas-ico-gold { color: #FFC107; }
.uas-stat-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.uas-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.uas-stat-label {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
}

/* Tables */
.uas-section { margin-bottom: 16px; }
.uas-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #F8FAFC;
}
.uas-table-wrap {
  background: #111827;
  border: 1px solid #1a2332;
  border-radius: 14px;
  overflow: hidden;
}
.uas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.uas-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid #1a2332;
}
.uas-table tbody td {
  padding: 11px 12px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(26, 35, 50, 0.85);
  vertical-align: middle;
}
.uas-table tbody tr:last-child td { border-bottom: none; }
.uas-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.uas-offer-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #F8FAFC;
  max-width: 170px;
}
.uas-offer-name > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.uas-offer-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.uas-reward {
  font-weight: 800 !important;
  color: #FFC107 !important;
  font-variant-numeric: tabular-nums;
}
.uas-provider { color: #94a3b8; font-size: 11px; }
.uas-time { color: #64748b; font-size: 11px; white-space: nowrap; }
.uas-status {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.uas-status-pending {
  background: rgba(255, 193, 7, 0.14);
  color: #FFC107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
.uas-status-paid,
.uas-status-completed,
.uas-status-sent {
  background: rgba(0, 214, 114, 0.12);
  color: #34d399;
  border: 1px solid rgba(0, 214, 114, 0.28);
}
.uas-status-other {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.uas-empty-cell {
  text-align: center !important;
  color: #64748b;
  font-size: 12px;
  padding: 22px 12px !important;
}
.uas-skel-row .uas-skel {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #111827 0%, #1a2433 50%, #111827 100%);
  background-size: 200% 100%;
  animation: uasShimmer 1.2s ease infinite;
}
@keyframes uasShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.uas-row-enter {
  animation: uasRowIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes uasRowIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.uas-badges-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px;
}

@media (max-width: 720px) {
  .uas-shell {
    flex-direction: column;
    max-height: 92vh;
  }
  .uas-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #1a2332;
    padding: 22px 16px 16px;
  }
  .uas-joined { margin-bottom: 4px; padding-bottom: 0; }
  .uas-table thead th:nth-child(2),
  .uas-table tbody td:nth-child(2) { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   UNIFIED Coin Balance + Wallet header block (pixel-perfect)
   ═══════════════════════════════════════════════════════════ */
.header-balance-wallet-wrap {
  display: flex;
  align-items: center;
  height: 40px;
  background-color: #232B38;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2A3344;
  flex-shrink: 0;
}

/* Left side: Coin icon + balance + chevron */
.header-coin-area {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease;
}
.header-coin-area:hover {
  background: rgba(255, 255, 255, 0.04);
}

.header-coin-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(245, 197, 66, 0.55));
}

.header-coin-balance {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  tabular-nums: true;
  line-height: 1;
}

.header-coin-chevron {
  width: 14px;
  height: 14px;
  color: #94A3B8;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Right side: Purple wallet button — attached flush to the dark wrapper */
.header-wallet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #7259F0 !important;
  border: none;
  border-radius: 0 11px 11px 0; /* matches wrapper radius on the right edge only */
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, filter 0.15s ease;
  box-shadow: none;
}
.header-wallet-btn:hover {
  background: #6349e0 !important;
  filter: brightness(1.06);
}
.header-wallet-btn:active {
  filter: brightness(0.96);
}

.header-wallet-icon {
  width: 18px;
  height: 18px;
  color: #FFFFFF;
  stroke-width: 2;
}

/* Dynamic notification badge on avatar (unchanged) */
.header-notif-badge {
  position: absolute !important;
  top: -4px !important;
  right: -4px !important;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #FF3B5C !important;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  border-radius: 9999px;
  border: 2px solid #0e1620;
  box-shadow: 0 2px 6px rgba(255, 59, 92, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50 !important;
  pointer-events: none;
}
.header-notif-badge:not(.hidden) {
  display: flex !important;
}

/* Uniform gap between unified block and avatar */
#header-user-actions {
  gap: 12px !important;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL ANNOUNCEMENT BANNER  (.global-announcement-banner)
   ═══════════════════════════════════════════════════════════ */
.global-announcement-banner {
  width: 100%;
  background: #12171f;
  border-bottom: 1px solid #1e2a38;
  flex-shrink: 0;
  position: relative;
  z-index: 10; /* must stay BELOW profile dropdown (z-9999) and header */
  transition: opacity 0.45s ease, max-height 0.45s ease, padding 0.45s ease, border 0.45s ease;
  max-height: 56px;
  overflow: hidden;
}
.global-announcement-banner.gab-hiding {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  pointer-events: none;
}
.gab-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.gab-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.gab-shield {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.gab-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gab-text strong {
  color: #ffffff;
  font-weight: 700;
}
.gab-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: #00d672;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.gab-link:hover {
  color: #34d399;
  text-decoration: underline;
}
@media (max-width: 640px) {
  .gab-inner {
    padding: 9px 12px;
    gap: 10px;
  }
  .gab-text {
    font-size: 12px;
    white-space: normal;
  }
  .gab-link {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════
   LEFT SIDEBAR NAV — unified typography + green hover
   ═══════════════════════════════════════════════════════════ */
#left-sidebar {
  position: relative;
  z-index: 30;
}
/* Extra vertical breathing room between sidebar groups */
#left-sidebar > div.flex.flex-col.gap-5 {
  gap: 1.5rem !important;
}
#left-sidebar > div.flex.flex-col.gap-5 > div.flex.flex-col.gap-1 {
  gap: 0.35rem !important;
}

/* Main nav items (Home, Premium, Shop, Profile) — thicker + more breathing room */
#left-sidebar button[id^="nav-"] {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
#left-sidebar button[id^="nav-"] i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
  transition: color 0.2s ease;
}
#left-sidebar button[id^="nav-"]:hover {
  background-color: #00d672 !important;
  color: #FFFFFF !important;
  font-weight: 600;
}
#left-sidebar button[id^="nav-"]:hover i {
  color: #FFFFFF !important;
}

/* Active main nav (green solid) */
#left-sidebar button[id^="nav-"].nav-active {
  background-color: #00d672 !important;
  color: #061910 !important;
  font-weight: 700 !important;
}
#left-sidebar button[id^="nav-"].nav-active i {
  color: #061910 !important;
}

/* Category items — thicker + more breathing room */
#left-sidebar button[id^="cat-"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
#left-sidebar button[id^="cat-"] i {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: inherit;
  transition: color 0.2s ease;
}
#left-sidebar button[id^="cat-"]:hover {
  background-color: #00d672 !important;
  color: #FFFFFF !important;
  border-left-color: transparent;
}
#left-sidebar button[id^="cat-"]:hover i {
  color: #FFFFFF !important;
}
#left-sidebar button[id^="cat-"]:hover .cat-badge {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
}

/* Active category */
#left-sidebar button[id^="cat-"].cat-active {
  background-color: #16202a !important;
  color: #00d672 !important;
  font-weight: 600 !important;
  border-left: 3px solid #00d672 !important;
}
#left-sidebar button[id^="cat-"].cat-active i {
  color: #00d672 !important;
}
#left-sidebar button[id^="cat-"].cat-active .cat-badge {
  background-color: #00d672 !important;
  color: #061910 !important;
}

/* Category section label */
#left-sidebar .text-\[10px\].font-bold.uppercase,
#left-sidebar div.text-\[10px\] {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 4px 12px;
  margin-bottom: 2px;
}

/* Ensure profile dropdown always wins stacking */
#profile-dropdown,
#notifications-modal,
#daily-claim-modal {
  z-index: 9999 !important;
}
header {
  z-index: 50 !important;
}

/* ── Final polish: kill thin line under live ticker ── */
#global-live-ticker.border-b,
#global-live-ticker {
  border-bottom: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}
#app-content {
  border-top: none !important;
  box-shadow: none !important;
}
/* Sidebar last-item cleanup (no extra margin on final button) */
#left-sidebar button[id^="nav-"]:last-child,
#left-sidebar button[id^="cat-"]:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   Sidebar divider (replaces "CATEGORIES" label)
   ═══════════════════════════════════════════════════════════ */
.sidebar-divider {
  display: block;
  width: calc(100% - 24px);
  margin: 14px 12px;
  border: none;
  border-top: 1px solid #2d3748;
  height: 0;
  opacity: 0.9;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   Live indicator box (static green dot before ticker items)
   ═══════════════════════════════════════════════════════════ */
.live-indicator-box {
  width: 40px;
  height: 40px;
  background-color: #1a202c;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #252b36;
}
.live-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: #00d672;
  border-radius: 50%;
  box-shadow: 0 0 6px #00d672, 0 0 12px rgba(0, 214, 114, 0.35);
  animation: liveDotPulse 1.8s ease-in-out infinite;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.88); }
}

/* ═══════════════════════════════════════════════════════════
   Ticker chips — boxier radius + lighter bg (final polish)
   ═══════════════════════════════════════════════════════════ */
.ticker-chip {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  border-radius: 10px !important;          /* less round / more boxy — unchanged */
  padding: 5px 6px 5px 5px !important;
  background: #181F29 !important;          /* one notch darker — blends into premium dark UI */
  border: 1px solid #252B36 !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.ticker-chip:hover {
  border-color: #323846 !important;
  background: #1F2733 !important;
}
/* Icon square inside the chip (LTC / provider mark) */
.ticker-chip > span:first-child {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}
/* Middle text block (type + time) */
.ticker-chip .ticker-live-time,
.ticker-chip > div {
  line-height: 1.2;
}
/* Amount pill on the right — fully rounded capsule */
.ticker-chip .tabular-nums,
.ticker-chip span.bg-\[\#0b0e13\],
.ticker-chip span[class*="rounded-full"] {
  border-radius: 9999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  background: #0b0e13 !important;
  color: #ffffff !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   FEATURED PROMO CARDS — image top + solid details bottom
   Classes: .featured-promos-wrapper .featured-promo-card
            .promo-image-wrapper .promo-details-box
            .promo-info .promo-title .promo-provider
            .promo-action .promo-reward-amount .promo-click-indicator
   ═══════════════════════════════════════════════════════════ */
.featured-promos-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}
@media (max-width: 1024px) {
  .featured-promos-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .featured-promos-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Card shell + premium floating/breathing loop + Dynamic Ambient Glow */
.featured-promo-card {
  --dominant-color: 0, 214, 114; /* fallback brand green until image samples */
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #1e2532;
  border: 1px solid #2a3344;
  cursor: pointer;
  transition: border-color 0.35s ease, box-shadow 0.45s ease, transform 0.35s ease;
  animation: promoFloatBreath 3.5s ease-in-out infinite;
  will-change: transform, box-shadow;
  box-shadow: 0 8px 24px -6px rgba(var(--dominant-color), 0.25);
}
.featured-promo-card:nth-child(2) {
  animation-delay: 0.6s;
}
.featured-promo-card:nth-child(3) {
  animation-delay: 1.2s;
}
.featured-promo-card.has-ambient-glow {
  border-color: rgba(var(--dominant-color), 0.35);
}
.featured-promo-card:hover {
  border-color: rgba(var(--dominant-color), 0.55);
  animation-play-state: paused;
  transform: translateY(-6px);
  box-shadow: 0 12px 32px -4px rgba(var(--dominant-color), 0.45);
}
@keyframes promoFloatBreath {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 8px 24px -6px rgba(var(--dominant-color), 0.25);
  }
  50% {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px -5px rgba(var(--dominant-color), 0.32);
  }
}

/* 1. Top section — taller portrait cover art (~230px) + bottom-up ambient glow */
.promo-image-wrapper {
  position: relative;
  width: 100%;
  height: 230px;
  flex-shrink: 0;
  overflow: hidden;
  background: #121a24;
  border-radius: 12px 12px 0 0;
}
.promo-image-wrapper img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: transform 0.35s ease;
}
.featured-promo-card:hover .promo-image-wrapper img {
  transform: scale(1.05);
}
/* Dominant-color glow: elegant bottom-up wash into the art */
.promo-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(
    to top,
    rgba(var(--dominant-color), 0.8) 0%,
    rgba(var(--dominant-color), 0.25) 30%,
    transparent 65%
  );
  transition: background 0.45s ease, opacity 0.35s ease;
  opacity: 1;
}
.featured-promo-card:hover .promo-image-wrapper::after {
  background: linear-gradient(
    to top,
    rgba(var(--dominant-color), 0.88) 0%,
    rgba(var(--dominant-color), 0.32) 32%,
    transparent 68%
  );
}

/* 2. Bottom section — solid details box (no glow / no color wash) */
.promo-details-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #1e2532;
  border-radius: 0 0 12px 12px;
  min-height: 56px;
}

/* 3. Left — title + provider */
.promo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.promo-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.promo-provider {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.3;
}

/* 4. Right — reward amount + tracking indicator */
.promo-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.promo-reward-amount {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
  color: #F5C542;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.promo-coin-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(245, 197, 66, 0.45));
}

/* Pre-built tracking cursor button — hidden until .is-tracking */
.promo-tracking-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #151a23;
  border: 1px solid #2a3344;
  color: #94a3b8;
  cursor: default;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.promo-tracking-indicator svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* ── .is-tracking state (Universal Click-Tracking) ── */
.featured-promo-card.is-tracking .promo-reward-amount,
.global-trackable-offer.is-tracking .promo-reward-amount {
  display: none;
}
.featured-promo-card.is-tracking .promo-tracking-indicator,
.global-trackable-offer.is-tracking .promo-tracking-indicator {
  display: inline-flex;
  color: #cbd5e1;
  border-color: #3a4658;
  background: #121820;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: trackingPulse 1.8s ease-in-out infinite;
}
@keyframes trackingPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.25), 0 4px 16px rgba(0, 0, 0, 0.4); }
}

/* legacy class kept for safety */
.promo-click-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #151a23;
  border: 1px solid #2a3344;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.promo-click-indicator svg {
  width: 14px;
  height: 14px;
}
.promo-click-indicator:hover {
  background: #00d672;
  border-color: #00d672;
  color: #061910;
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════════════════════
   PERSISTENT LIVE CHAT SIDEBAR — desktop + logged-in only
   ═══════════════════════════════════════════════════════════ */
#right-chat-sidebar {
  background-color: #161C27 !important;
  background: #161C27 !important;
  background: #161C27;
  border-left: 1px solid #2A3344;
  display: none; /* default hidden; JS + media query control visibility */
  flex-direction: column;
  width: 320px;
  max-width: 100%;
  z-index: 45;
}
/* Desktop (xl+): persistent column in the flex layout when JS adds .flex */
@media (min-width: 1280px) {
  #right-chat-sidebar.flex,
  #right-chat-sidebar.xl\:flex {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    height: calc(100vh - 68px) !important;
    max-height: calc(100vh - 68px) !important;
    min-height: calc(100vh - 68px) !important;
    background-color: #161C27 !important;
    background: #161C27 !important;
    box-shadow: none !important;
  }
  /* Hide the mobile float button on desktop when sidebar is open */
  body.chat-desktop-open #chat-float-btn {
    display: none !important;
  }
}
/* Below xl: keep as overlay drawer (existing behavior) */
@media (max-width: 1279px) {
  #right-chat-sidebar.flex {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
  }
}
/* Guests / mobile: force hidden regardless */
#right-chat-sidebar.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
/* Ensure the 3-column layout fills remaining viewport under sticky header */
@media (min-width: 1024px) {
  body > .flex-1.flex.w-full {
    height: calc(100vh - 68px);
    max-height: calc(100vh - 68px);
    min-height: 0;
    overflow: hidden;
  }

  /* LEFT SIDEBAR — sticky, full remaining height, internal scroll */
  #left-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100%;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* RIGHT CHAT SIDEBAR — locked height, flex column so input stays at bottom */
  #right-chat-sidebar.flex,
  #right-chat-sidebar.xl\:flex {
    position: sticky !important;
    top: 0;
    align-self: flex-start;
    height: 100% !important;
    max-height: calc(100vh - 68px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  /* Chat messages area takes remaining space and scrolls */
  #right-chat-sidebar #chat-stream {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  /* Input + lock hint stay pinned at bottom of the chat column */
  #right-chat-sidebar > .p-3.border-t,
  #right-chat-sidebar > div.px-3.pt-1 {
    flex-shrink: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   FULL-HEIGHT STICKY SIDEBARS — solid columns to bottom of screen
   Pixel-perfect continuous background (left + right)
   ═══════════════════════════════════════════════════════════ */

:root {
  --gollah-header-h: 68px; /* matches sm:h-[68px] on <header> */
}

@media (min-width: 1024px) {
  /* 1. Lock the 3-column layout to the remaining viewport height.
     This is the KEY: parent must not grow with center content. */
  body > div.flex-1.flex.w-full.overflow-hidden,
  body > div.flex-1.flex.w-full {
    height: calc(100vh - var(--gollah-header-h)) !important;
    max-height: calc(100vh - var(--gollah-header-h)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  /* 2. LEFT SIDEBAR — full remaining height + solid continuous bg */
  #left-sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    height: calc(100vh - var(--gollah-header-h)) !important;
    max-height: calc(100vh - var(--gollah-header-h)) !important;
    min-height: calc(100vh - var(--gollah-header-h)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background-color: #151A23 !important;
    background: #151A23 !important;
  }

  /* Inner nav content can scroll; background stays full height */
  #left-sidebar > div {
    min-height: 100%;
  }

  /* 3. RIGHT CHAT — full remaining height + solid continuous bg */
  #right-chat-sidebar.flex,
  #right-chat-sidebar.xl\:flex,
  #right-chat-sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    height: calc(100vh - var(--gollah-header-h)) !important;
    max-height: calc(100vh - var(--gollah-header-h)) !important;
    min-height: calc(100vh - var(--gollah-header-h)) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background-color: #161C27 !important;
    background: #161C27 !important;
    box-shadow: none !important;
  }

  /* Chat messages fill the tall space; input stays flush at bottom */
  #right-chat-sidebar #chat-stream {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  #right-chat-sidebar > .p-3.border-t,
  #right-chat-sidebar > div.px-3.pt-1,
  #right-chat-sidebar > div.p-3 {
    flex-shrink: 0 !important;
  }
}

/* xl refinement (same heights, ensure override of any earlier rules) */
@media (min-width: 1280px) {
  #right-chat-sidebar.flex,
  #right-chat-sidebar.xl\:flex {
    position: sticky !important;
    top: 0 !important;
    height: calc(100vh - var(--gollah-header-h)) !important;
    max-height: calc(100vh - var(--gollah-header-h)) !important;
    min-height: calc(100vh - var(--gollah-header-h)) !important;
    background-color: #161C27 !important;
    background: #161C27 !important;
  }
}

/* Mobile / below lg — no forced height */
@media (max-width: 1023px) {
  #left-sidebar {
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  #right-chat-sidebar {
    /* keep existing mobile drawer behaviour */
  }
}

/* Uniform hover helper for .sidebar-nav-item */
.sidebar-nav-item {
  transition: background-color 0.15s ease, color 0.15s ease;
}




/* ═══════════════════════════════════════════════════════════
   CHAT UI — spacious bubbles + reactions + input (ref image)
   ═══════════════════════════════════════════════════════════ */

:root {
  --chat-bubble-bg: #252d3a;
  --chat-input-bg: #0f141b;
  --chat-input-wrap-bg: #161c24;
  --chat-surface: #1a202c;
  --chat-border: #2a3344;
}

.chat-top-bar {
  background: #161C27;
  padding: 10px 12px;
}
/* Segmented control — dark outer, zero gap, active pill flush to edges */
.chat-tab-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0 !important;
  border-radius: 50px;
  background: #0f141b;
  border: none;
  box-shadow: none;
  overflow: hidden; /* clip active pill to outer radius */
}
.chat-tab-toggle-btn {
  flex: 1 1 auto;
  min-width: 72px;
  border: none;
  background: transparent;
  color: #7b8798;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  padding: 6px 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.25s ease, box-shadow 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  white-space: nowrap;
}
.chat-tab-toggle-btn:hover:not(.active) {
  color: #ffffff;
}
.chat-tab-toggle-btn.active {
  background: #2a3240;
  color: #ffffff;
  font-weight: 600;
  box-shadow: none; /* no inset gap illusion */
  border-radius: 50px;
}
.chat-tab-toggle-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 214, 114, 0.35);
}
/* Legacy class aliases (if any leftover markup) */
.chat-tabs { display: inline-flex; }
.chat-tab {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  color: #7b8798;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.2;
}
.chat-tab.active {
  background: #2a3240;
  color: #ffffff;
  font-weight: 700;
}

/* Message row — more breathing room */
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 2px;
  margin-bottom: 8px;
}

/* Legacy chat avatar hooks → global component sizes (ga-md = larger chat avatars) */
.chat-msg .global-avatar-wrapper,
.chat-avatar-wrap.global-avatar-wrapper {
  margin-top: 0;
  flex-shrink: 0;
}

/* Spacious bubble — lighter premium contrast vs sidebar */
.chat-bubble,
.message-content {
  flex: 1;
  min-width: 0;
  background: var(--chat-bubble-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 12px 16px;
  position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12), 0 4px 14px rgba(0,0,0,0.12);
}
.chat-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.chat-bubble-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  letter-spacing: 0.01em;
}
.chat-bubble-name.me {
  color: #fbbf24;
}
.chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.chat-bubble-time {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
}
.chat-bubble-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}
.chat-action-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  padding: 0;
  position: relative;
}
.chat-action-btn:hover {
  color: #00d672;
  background: rgba(0, 214, 114, 0.1);
}
.chat-action-btn svg {
  width: 15px;
  height: 15px;
}
.chat-bubble-text {
  font-size: 13.5px;
  color: #dbe2ea;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0;
}

/* Reaction badges under message */
.chat-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  min-height: 0;
}
.chat-reaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 2px 7px 2px 5px;
  font-size: 12px;
  line-height: 1.3;
  cursor: default;
  user-select: none;
  transition: background 0.15s, border-color 0.15s;
}
.chat-reaction-badge:hover {
  background: rgba(0, 214, 114, 0.12);
  border-color: rgba(0, 214, 114, 0.25);
}
.chat-reaction-badge .rx-emoji {
  font-size: 13px;
  line-height: 1;
}
.chat-reaction-badge .rx-count {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

/* Floating emoji picker — grid, extended set */
.chat-react-picker {
  position: absolute;
  z-index: 80;
  display: none;
  top: calc(100% + 8px);
  right: 0;
  width: min(268px, calc(100vw - 24px));
  background: #1c2432;
  border: 1px solid #343E50;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  align-items: center;
  justify-items: center;
}
.chat-react-picker.open {
  display: grid;
  animation: chatPickerIn 0.15s ease;
}
@keyframes chatPickerIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-react-picker button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.12s;
  line-height: 1;
  padding: 0;
}
.chat-react-picker button:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.12);
}
.chat-react-picker button.is-active {
  background: rgba(0, 214, 114, 0.16);
  box-shadow: inset 0 0 0 1px rgba(0, 214, 114, 0.35);
}
.chat-reaction-badge {
  cursor: pointer;
}
.chat-reaction-badge.is-mine {
  background: rgba(0, 214, 114, 0.14);
  border-color: rgba(0, 214, 114, 0.35);
}

/* Input area */
.chat-input-area {
  background: var(--chat-input-wrap-bg);
  padding: 12px 14px;
  border-top: 1px solid #2A3344;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--chat-input-bg);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
}
.chat-input-field {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 12px 42px 12px 16px;
  font-size: 13.5px;
  color: #f1f5f9;
  outline: none;
  box-shadow: none;
}
.chat-input-field::placeholder {
  color: #64748b;
}
.chat-input-field:focus {
  outline: none;
  box-shadow: none;
  border: none;
}
.chat-input-field:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chat-emoji-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s;
  padding: 0;
}
.chat-emoji-btn:hover {
  color: #00d672;
}
.chat-emoji-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}
.chat-send-btn {
  background: #22c55e;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  flex-shrink: 0;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.3);
  line-height: 1.2;
}
.chat-send-btn:hover {
  background: #16a34a;
  filter: brightness(1.08);
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}
.chat-send-btn:active {
  transform: scale(0.98);
}
.chat-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: none;
}


/* ═══════════════════════════════════════════════════════════
   GLOBAL AVATAR — SVG progress ring + level badge (site-wide)
   Sizes: sm | navbar (header pill) | md (chat) | lg (profile dropdown) | xl (stats)
   Ring: #00d672 · Badge: #e11d48 · 1000 coins = 1 level
   ═══════════════════════════════════════════════════════════ */

.global-avatar-wrapper {
  --ga-size: 44px;
  --ga-ring: 3px;
  --ga-badge: 18px;
  --ga-badge-font: 10px;
  --ga-img-inset: 5px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ga-size);
  height: var(--ga-size);
  flex-shrink: 0;
  vertical-align: middle;
}

.global-avatar-wrapper.ga-sm {
  --ga-size: 40px;
  --ga-ring: 2.5px;
  --ga-badge: 16px;
  --ga-badge-font: 9px;
  --ga-img-inset: 4.5px;
}
/* Navbar profile — FORCE green SVG ring, hide red level badge only */
.global-avatar-wrapper.ga-navbar {
  --ga-size: 44px;
  --ga-ring: 3.25px;
  --ga-badge: 0px;
  --ga-badge-font: 0px;
  --ga-img-inset: 5px;
  margin-top: -2px;
  margin-bottom: -2px;
  z-index: 2;
  position: relative;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
/* Level badge stays hidden in navbar only */
.global-avatar-wrapper.ga-navbar .global-avatar-level,
.global-avatar-wrapper.ga-navbar #profile-level-badge,
.header-profile-pill .global-avatar-level {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
/* FORCE SVG ring visible and edge-hugging */
.global-avatar-wrapper.ga-navbar svg,
.global-avatar-wrapper.ga-navbar .global-avatar-svg,
.header-profile-pill .global-avatar-wrapper.ga-navbar svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  inset: 0 !important;
  z-index: 5 !important;
  pointer-events: none !important;
  transform: rotate(-90deg) !important;
  overflow: visible !important;
}
.global-avatar-wrapper.ga-navbar .ga-track,
.header-profile-pill .ga-navbar .ga-track {
  fill: none !important;
  stroke: rgba(255, 255, 255, 0.14) !important;
  stroke-width: 3.25px !important;
}
.global-avatar-wrapper.ga-navbar .ga-progress,
.header-profile-pill .ga-navbar .ga-progress {
  fill: none !important;
  stroke: #00d672 !important;
  stroke-width: 3.25px !important;
  stroke-linecap: round !important;
  filter: drop-shadow(0 0 3px rgba(0, 214, 114, 0.5)) !important;
}
/* Image only — no grey border/frame; ring is the sole border */
.global-avatar-wrapper.ga-navbar .global-avatar-img,
.global-avatar-wrapper.ga-navbar img,
.header-profile-pill .ga-navbar img {
  position: absolute !important;
  top: var(--ga-img-inset) !important;
  left: var(--ga-img-inset) !important;
  right: var(--ga-img-inset) !important;
  bottom: var(--ga-img-inset) !important;
  width: calc(100% - (var(--ga-img-inset) * 2)) !important;
  height: calc(100% - (var(--ga-img-inset) * 2)) !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  z-index: 2 !important;
}
.global-avatar-wrapper.ga-md {
  --ga-size: 48px;
  --ga-ring: 3px;
  --ga-badge: 18px;
  --ga-badge-font: 10px;
  --ga-img-inset: 5px;
}
.global-avatar-wrapper.ga-md .global-avatar-level {
  min-width: 20px;
  height: 16px;
  padding: 0 5px;
  font-size: 9px;
}
.global-avatar-wrapper.ga-lg {
  --ga-size: 80px;
  --ga-ring: 3.5px;
  --ga-badge: 22px;
  --ga-badge-font: 11px;
  --ga-img-inset: 7px;
}
.global-avatar-wrapper.ga-xl {
  --ga-size: 96px;
  --ga-ring: 4px;
  --ga-badge: 24px;
  --ga-badge-font: 12px;
  --ga-img-inset: 8px;
}

.global-avatar-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
  z-index: 1;
}
.global-avatar-svg .ga-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: var(--ga-ring);
}
.global-avatar-svg .ga-progress {
  fill: none;
  stroke: #00d672;
  stroke-width: var(--ga-ring);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 4px rgba(0, 214, 114, 0.45));
}

.global-avatar-img {
  position: absolute;
  top: var(--ga-img-inset);
  left: var(--ga-img-inset);
  right: var(--ga-img-inset);
  bottom: var(--ga-img-inset);
  width: calc(100% - (var(--ga-img-inset) * 2));
  height: calc(100% - (var(--ga-img-inset) * 2));
  border-radius: 50%;
  object-fit: cover;
  background: #1e2532;
  border: 2px solid #0c131d;
  display: block;
  z-index: 2;
}

/* Level badge — bottom-left, flex-centered number */
.global-avatar-level {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #e11d48;
  color: #ffffff;
  font-size: var(--ga-badge-font);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  border: 2px solid #0c131d;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: -0.02em;
}
/* Size-scaled badge dimensions (still bottom-centered) */
.global-avatar-wrapper.ga-sm .global-avatar-level {
  min-width: 20px;
  height: 16px;
  padding: 0 5px;
  font-size: 9px;
}
.global-avatar-wrapper.ga-md .global-avatar-level {
  min-width: 22px;
  height: 18px;
  padding: 0 6px;
  font-size: 10px;
}
.global-avatar-wrapper.ga-lg .global-avatar-level {
  min-width: 26px;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
}
.global-avatar-wrapper.ga-xl .global-avatar-level {
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
}

/* Header / profile slots keep notif badge stacking */
.global-avatar-wrapper .header-notif-badge {
  z-index: 50 !important;
  position: absolute !important;
}
/* Keep SVG ring above image but below notif badge */
.global-avatar-wrapper.ga-navbar .global-avatar-svg,
.global-avatar-wrapper.ga-navbar svg {
  z-index: 5 !important;
}
.global-avatar-wrapper.ga-navbar .global-avatar-img,
.global-avatar-wrapper.ga-navbar img {
  z-index: 2 !important;
}

/* Size helpers when wrapping existing header slots */
#header-avatar-slot.global-avatar-wrapper,
#header-avatar-slot {
  /* sized by .ga-navbar */
}
#dropdown-avatar-slot.global-avatar-wrapper {
  /* sized by .ga-lg */
}

/* ── Navbar profile pill — 40px dark body; avatar ring overlaps edges ── */
.header-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  /* no vertical padding — avatar uses negative margin to overlap edges */
  padding: 0 12px 0 0;
  box-sizing: border-box;
  border-radius: 50px;
  background: #1e2532;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  position: relative;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  overflow: visible;
}
.header-profile-pill:hover {
  background: #252d3c;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.header-profile-pill:active {
  transform: scale(0.98);
}
.header-profile-pill:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 214, 114, 0.35);
}
.header-profile-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #94a3b8;
  display: block;
  transition: color 0.2s ease, transform 0.2s ease;
}
.header-profile-pill:hover .header-profile-chevron {
  color: #cbd5e1;
}
.header-profile-pill.is-open .header-profile-chevron {
  transform: rotate(180deg);
  color: #e2e8f0;
}
/* Clean avatar flush left, vertically centered with chevron */
.header-profile-pill .global-avatar-wrapper.ga-navbar {
  flex-shrink: 0;
  position: relative;
  align-self: center;
  overflow: visible !important;
}
.header-profile-pill {
  overflow: visible !important;
}


/* ═══════════════════════════════════════════════════════════
   REALTIME ONLINE USERS badge (Supabase Presence)
   ═══════════════════════════════════════════════════════════ */
.realtime-online-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: rgba(0, 214, 114, 0.08);
  border: 1px solid rgba(0, 214, 114, 0.18);
  line-height: 1;
  user-select: none;
}
.realtime-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d672;
  box-shadow: 0 0 0 0 rgba(0, 214, 114, 0.55);
  animation: realtimeOnlinePulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes realtimeOnlinePulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 214, 114, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 214, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 214, 114, 0); }
}
.realtime-online-count {
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
  font-variant-numeric: tabular-nums;
  min-width: 0.75em;
}
.realtime-online-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.01em;
}


/* ═══════════════════════════════════════════════════════════
   GOD-TIER RESPONSIVE LAYER (append-only)
   Does not override micro-components:
   .global-avatar-wrapper / .ga-* / .chat-tab-toggle /
   .realtime-online-badge / header-notif z-index stack
   ═══════════════════════════════════════════════════════════ */

/* ── Desktop & ultra-wide: edge-to-edge on 1080p, soft cap only on ultra-wide ── */
@media (min-width: 1025px) {
  body > .flex-1.flex.w-full,
  body > div.flex-1.flex.w-full.overflow-hidden,
  body > div.flex-1.flex.w-full {
    width: 100% !important;
    max-width: 100% !important; /* fill 1920x1080 edge-to-edge */
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Structural flex: fixed side rails, fluid center */
  #left-sidebar {
    flex: 0 0 auto;
  }
  #right-chat-sidebar.flex,
  #right-chat-sidebar.xl\:flex {
    flex: 0 0 auto;
  }
  /* Center stream absorbs remaining width */
  body > .flex-1.flex.w-full > .flex-1.flex.flex-col,
  body > div.flex-1.flex.w-full > .flex-1,
  #app-content {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* Soft cap only for extreme ultra-wides (>1920) so content doesn't infinite-stretch */
@media (min-width: 1921px) {
  body > .flex-1.flex.w-full,
  body > div.flex-1.flex.w-full.overflow-hidden,
  body > div.flex-1.flex.w-full {
    max-width: 1920px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Wider offer / provider grids on large desktops */
@media (min-width: 1280px) {
  #providers-carousel,
  #high-earning-carousel {
    /* keep horizontal scroll carousels fluid */
    width: 100%;
  }
  .grid.grid-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }
  .grid.grid-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
}

/* ── Tablet: sidebars compact, main fluid ── */
@media (max-width: 1024px) {
  /* Left nav becomes drawer-friendly; don't force height lock */
  #left-sidebar {
    position: relative !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  /* Chat overlay already handled; ensure main stream uses full width */
  body > .flex-1.flex.w-full,
  body > div.flex-1.flex.w-full {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .flex-1.flex.flex-col.overflow-y-auto.custom-scroll,
  #app-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto;
  }

  /* Offer / card grids: prefer 2-up when space is mid */
  .grid.grid-cols-3,
  .grid.grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ── Mobile-first: native-app feel (≤768px) ── */
@media (max-width: 768px) {
  /* Stack the 3-column shell */
  body > .flex-1.flex.w-full,
  body > div.flex-1.flex.w-full.overflow-hidden,
  body > div.flex-1.flex.w-full {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Hide desktop left rail on small screens (JS already toggles; enforce) */
  #left-sidebar {
    display: none !important;
  }

  /* Chat stays off-canvas drawer on mobile (existing fixed rules); full width when open */
  #right-chat-sidebar.flex {
    width: min(100%, 100vw) !important;
    max-width: 100vw !important;
  }

  /* Header denser */
  header.h-14,
  header.sm\:h-\[68px\] {
    height: 56px !important;
  }

  /* Tighten horizontal padding on main stream */
  #app-content,
  .flex-1.flex.flex-col.overflow-y-auto.custom-scroll {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #global-announcement-banner,
  #global-live-ticker {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  /* Profile pill stays slim; don't crush avatar micro-component */
  .header-profile-pill {
    height: 36px !important;
    gap: 6px !important;
    padding-right: 10px !important;
  }

  /* Wallet block stays 40px original; allow slight horizontal compress */
  .header-balance-wallet-wrap {
    max-width: 100%;
  }

  .header-coin-area {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .header-coin-balance {
    font-size: 13px !important;
  }

  /* Chat input docked to bottom of drawer */
  #right-chat-sidebar .chat-input-area {
    position: sticky;
    bottom: 0;
    z-index: 6;
    padding: 10px 12px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
    background: var(--chat-input-wrap-bg, #161c24);
  }

  #right-chat-sidebar #chat-stream {
    padding: 10px !important;
  }

  .chat-top-bar {
    padding: 8px 10px !important;
  }

  /* Single-column offer/cards */
  .grid.grid-cols-2,
  .grid.grid-cols-3,
  .grid.grid-cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* Modals use more viewport */
  .modal-card {
    max-width: calc(100vw - 1.25rem) !important;
  }

  /* Float toasts full-bleed friendly */
  #float-toast-stack {
    left: 8px !important;
    right: 8px !important;
    max-width: none !important;
  }

  /* Reduce oversized section spacing */
  .section-title {
    font-size: 12px !important;
  }
}

/* ── Very small phones ── */
@media (max-width: 380px) {
  .header-profile-pill {
    height: 34px !important;
    gap: 4px !important;
    padding-right: 8px !important;
  }

  .header-profile-chevron {
    width: 14px !important;
    height: 14px !important;
  }

  .realtime-online-label {
    display: none; /* keep count + dot only */
  }

  .chat-tab-toggle-btn {
    min-width: 0 !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ── Prefer reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .realtime-online-dot {
    animation: none !important;
  }
  .header-profile-pill,
  .chat-tab-toggle-btn,
  .header-wallet-btn {
    transition: none !important;
  }
}
