/* ========== DASHBOARD STYLES ========== */
.dashboard {
  width: 100%;
  height: 100dvh;
  background-color: #000;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding-bottom: var(--nav-h, 65px); /* reserve space for fixed bottom nav */
}

.dashboard.hidden {
  display: none !important;
}

.empty-space {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
}

.welcome-banner {
  text-align: center;
  padding: 1.5rem;
}

.welcome-banner i {
  font-size: 3.5rem;
  color: #FFE0A3;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.welcome-banner h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.welcome-banner p {
  color: #d4e9f2;
  font-size: 0.9rem;
}

.user-greeting {
  background: rgba(10, 25, 35, 0.5);
  padding: 0.4rem 1.2rem;
  border-radius: 2rem;
  display: inline-block;
  margin-top: 0.8rem;
  backdrop-filter: blur(4px);
  color: white;
}

.user-greeting i {
  font-size: 1rem;
  color: #FFE0A3;
  margin-right: 0.3rem;
}

.bottom-nav {
  width: 100%;
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 18px 4px 10px 4px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  position: fixed;
  bottom: 0rem;
  left: 0;
  right: 0;
  z-index: 100;
  gap: 2px;
}
/* Cover the system gesture/nav bar strip below the nav */
.bottom-nav::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-bottom, 0px);
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  z-index: 99;
  pointer-events: none;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #d4e9f2;
  font-size: 1rem;
  padding: 6px 6px;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 56px;
  flex: 1;
  max-width: 70px;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  pointer-events: auto;
  position: relative;
}

.nav-btn i {
  font-size: 1.5rem;
  margin-bottom: 3px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.nav-btn span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  opacity: 0.9;
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
  white-space: nowrap;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateY(-2px);
}

#alertsNavBtn:active {
  background: #000;
}

/* Notification badge */
.notification-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  background: #FFD700;
  color: #1b3b4f;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0 4px;
  border: 1.5px solid #1b3b4f;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Notifications panel */
/* ── Prevent long-press image save/copy/share context menu app-wide ── */
img {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  pointer-events: none;
}

.notifications-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  height: 100dvh;
  background: #1b3b4f;
  z-index: 25;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0,0,0,0.3);
}

.notifications-panel.show {
  transform: translateX(0);
}

/* ========== BASKET PANEL — YouTube Mobile ========== */
.basket-panel {
  position: fixed;
  top: 0; right: 0;
  width: 100%; max-width: 100%;
  height: 100vh;
  background: #0f0f0f;
  z-index: 25;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  font-family: 'Roboto', 'Inter', sans-serif;
  overflow: hidden;
}
.basket-panel.show { transform: translateX(0); }

/* Top inline video player — appears above basket list when a video is tapped */
#basketTopPlayer {
  flex-shrink: 0;
  width: 100%;
  background: #000;
  z-index: 200;
  box-shadow: 0 4px 24px rgba(0,0,0,0.7);
  animation: basketPlayerSlideIn 0.25s cubic-bezier(.4,0,.2,1);
}
@keyframes basketPlayerSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bdpSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes bdpSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* Header — YouTube dark top bar */
.basket-header {
  background: #0f0f0f;
  padding: 0 4px 0 16px;
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.basket-header-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  width: 100%;
}
.basket-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.2px;
}
.basket-header h2 i { font-size: 1.1rem; color: #00b341; }
.basket-header-count {
  background: rgba(255,255,255,0.10);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  margin-left: 0.35rem;
  color: rgba(255,255,255,0.7);
}
.close-basket {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background 0.15s;
  flex-shrink: 0;
}
.close-basket:hover, .close-basket:active { background: rgba(255,255,255,0.1); }

/* Scrollable feed */
.basket-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0 80px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

/* Empty state */
.basket-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: rgba(255,255,255,0.35);
}
.basket-empty i { font-size: 3rem; margin-bottom: 1rem; color: #ff0000; opacity: 0.5; }
.basket-empty p { font-size: 0.9rem; line-height: 1.6; }
/* === YouTube video card === */
.basket-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0 0 16px 0;
  cursor: pointer;
  background: transparent;
}
.basket-item:active { background: rgba(255,255,255,0.04); }

/* Full-width 16:9 thumbnail — no side margins, like YouTube home */
.basket-item-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  transition: aspect-ratio 0.25s ease, padding-bottom 0.25s ease;
}

/* Duration badge — bottom right like YouTube */
.basket-item-thumb::before {
  content: attr(data-dur);
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 4;
  pointer-events: none;
  letter-spacing: 0.3px;
}

/* Play icon centre overlay */
.basket-item-thumb::after {
  content: '\f144';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 3;
}
.basket-item-thumb.playing::after { opacity: 0; }
.basket-item-thumb.playing::before { opacity: 0; }

/* Video inside thumb — always 16:9 container; use contain so all ratios display correctly */
.basket-thumb-vid,
.basket-item-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.basket-item-thumb.playing {
  aspect-ratio: 16 / 9;
}

/* Info row below thumbnail — YouTube style */
.basket-item-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 12px 0 12px;
}

/* Channel avatar circle */
.basket-item-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFE0A3;
  margin-top: 1px;
}
.basket-item-avatar-btn {
  cursor: pointer;
  border: none;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.basket-item-avatar-btn:active {
  transform: scale(0.9);
  box-shadow: 0 0 0 3px rgba(27,94,79,0.45);
}
.basket-item-avatar-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Text block */
.basket-item-text {
  flex: 1;
  min-width: 0;
}
.basket-item-name {
  font-size: 0.9rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  letter-spacing: 0px;
}
.basket-item-channel {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.basket-item-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.basket-item-meta .dot {
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  display: inline-block;
}
.basket-item-badge { display: none; }

/* Three-dot vertical menu */
.basket-item-more {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s;
  margin-top: -2px;
}
.basket-item-more:hover, .basket-item-more:active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.basket-item-delete { display: none; }
.basket-item-delete:hover { color: #fe2c55; }

/* Action row */
.basket-item-actions {
  display: flex;
  align-items: center;
  padding: 2px 12px 6px 12px;
  gap: 16px;
}
/* Inline comments list */
.basket-comments-list {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.basket-comments-list.bci-open {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 10px 12px 8px 12px;
  gap: 10px;
}
.bci-list { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.bci-empty {
  color: rgba(255,255,255,0.25);
  font-size: 0.78rem;
  text-align: center;
  padding: 6px 0 4px;
}
.bci-input-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  position: relative;
}
.bci-input {
  flex: 1; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1.2rem; color: #fff;
  font-family: inherit; font-size: 0.88rem;
  padding: 11px 15px; outline: none;
  caret-color: #1B8EF0;
  min-height: 46px;
}
.bci-input::placeholder { color: rgba(255,255,255,0.28); }
.bci-send {
  background: #1B5E4F; border: none; color: #fff;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; flex-shrink: 0;
}
.bci-tag-dd {
  position: absolute; bottom: 42px; left: 0; right: 0;
  background: #2a2a2a; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.8rem; overflow: hidden;
  z-index: 100; max-height: 160px; overflow-y: auto;
  box-shadow: 0 -4px 14px rgba(0,0,0,0.4);
}
.basket-comment-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
}
.basket-comment-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #FFE0A3;
  overflow: hidden;
}
.basket-comment-avatar img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.basket-comment-body { flex: 1; min-width: 0; }
.basket-comment-author { font-weight: 700; color: rgba(255,255,255,0.85); margin-bottom: 1px; font-size: 0.73rem; }
.basket-comment-text { color: rgba(255,255,255,0.6); line-height: 1.45; word-break: break-word; }
.basket-comment-text .basket-tag { color: #1B8EF0; font-weight: 600; }
.basket-comment-time { font-size: 0.62rem; color: rgba(255,255,255,0.28); margin-top: 2px; }

/* Comment input sheet */
#basketCommentSheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #1a1a1a;
  border-radius: 1rem 1rem 0 0;
  padding: 0.5rem 0 0 0;
  z-index: 9999;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
  max-height: 70vh;
  display: flex; flex-direction: column;
}
#basketCommentSheet .bcs-handle {
  width: 36px; height: 4px; background: rgba(255,255,255,0.18);
  border-radius: 2px; margin: 0 auto 0.7rem auto;
}
#basketCommentSheet .bcs-title {
  font-size: 0.9rem; font-weight: 700; color: #fff;
  padding: 0 14px 0.5rem 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#basketCommentSheet .bcs-comments-scroll {
  flex: 1; overflow-y: auto; padding: 10px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
#basketCommentSheet .bcs-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px 16px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
#basketCommentSheet .bcs-input {
  flex: 1; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2rem; color: #fff;
  font-family: inherit; font-size: 0.85rem;
  padding: 8px 14px; outline: none;
  caret-color: #1B8EF0;
}
#basketCommentSheet .bcs-input::placeholder { color: rgba(255,255,255,0.3); }
#basketCommentSheet .bcs-send {
  background: #1B5E4F; border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; flex-shrink: 0;
  transition: background 0.15s;
}
#basketCommentSheet .bcs-send:hover { background: #0F3D34; }

/* Tag autocomplete dropdown */
#basketTagDropdown {
  position: absolute; bottom: 64px; left: 14px; right: 14px;
  background: #2a2a2a; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 0.8rem; overflow: hidden;
  z-index: 10000; max-height: 180px; overflow-y: auto;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}
.bcs-tag-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  transition: background 0.12s;
}
.bcs-tag-option:hover, .bcs-tag-option:active { background: rgba(255,255,255,0.08); }
.bcs-tag-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg,#1B5E4F,#0F3D34);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #FFE0A3;
  flex-shrink: 0; overflow: hidden;
}
.bcs-tag-avatar img { width:100%;height:100%;object-fit:cover;border-radius:50%; }
.bcs-tag-name { font-size: 0.82rem; font-weight: 600; color: #fff; }
.bcs-tag-handle { font-size: 0.7rem; color: rgba(255,255,255,0.4); }

/* Caption / description below info row */
.basket-item-caption {
  font-size: 0.97rem;
  color: #fff;
  font-weight: 600;
  line-height: 1.55;
  padding: 8px 12px 2px 12px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.basket-item-caption.expanded {
  display: block;
  overflow: visible;
}
.basket-caption-more {
  display: block;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 2px 12px 6px 12px;
  cursor: pointer;
  letter-spacing: 0.2px;
}
.basket-item-caption.expanded .basket-caption-more { display: none; }
/* Expand button hidden — landscape handled automatically on device rotation */
.basket-expand-btn { display: none !important; }

/* Countdown ring shown while video plays (bottom-left of thumb) */
.basket-watch-ring {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.basket-item-thumb.playing .basket-watch-ring { opacity: 1; }
.basket-watch-ring svg { width: 32px; height: 32px; transform: rotate(-90deg); }
.basket-watch-ring circle.bg {
  fill: none;
  stroke: rgba(255,255,255,0.2);
  stroke-width: 3;
}
.basket-watch-ring circle.progress {
  fill: none;
  stroke: #1B8E6A;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 87.96; /* 2π×14 */
  stroke-dashoffset: 87.96;
  transition: stroke-dashoffset 0.5s linear;
}
.basket-watch-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  color: #fff;
  transform: rotate(0deg);
}

/* 30-day expiry countdown badge on basket thumb */
.basket-expiry-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(10,10,10,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 3px 7px 3px 5px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
  pointer-events: none;
  text-transform: uppercase;
  transition: background 0.3s;
}
.basket-expiry-badge.expiry-ok    { border-color: rgba(0,200,100,0.45); color: #00e87a; }
.basket-expiry-badge.expiry-warn  { border-color: rgba(255,165,0,0.55);  color: #ffa500; }
.basket-expiry-badge.expiry-urgent{ border-color: rgba(255,60,60,0.6);   color: #ff6060; }
.basket-expiry-badge i { font-size: 0.52rem; }

/* Expired overlay — shown when 30-day access has lapsed */
.basket-expired-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 8;
  pointer-events: none;
  text-align: center;
  padding: 0.5rem;
}
.basket-expired-overlay i  { font-size: 1.6rem; color: #ff6060; }
.basket-expired-overlay p  { font-size: 0.62rem; font-weight: 700; color: rgba(255,255,255,0.9); line-height: 1.3; margin: 0; }
.basket-expired-overlay .beo-renew { display: none; }

/* Badge on basket nav button */
.basket-nav-badge {
  position: absolute;
  top: 2px;
  right: 6px;
  background: #fe2c55;
  color: white;
  font-size: 0.5rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  display: none;
}

.notifications-header {
  background: linear-gradient(135deg, #0F3D34 0%, #1B5E4F 100%);
  padding: 1.5rem 1.2rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notifications-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-notifications {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
}

/* ── Push-permission nudge banner inside the Alerts panel ──
   Shown whenever the browser's own "Allow notifications" dialog
   isn't the current source of truth for the user — i.e. permission
   is still undecided, was blocked, or isn't supported here at all.
   Gives a real, always-tappable way to opt in even on visits where
   the native browser prompt doesn't pop up on its own. */
.alerts-push-banner {
  display: none;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1.2rem;
  font-size: 0.78rem;
  line-height: 1.3;
  cursor: pointer;
  background: rgba(255, 215, 0, 0.12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.alerts-push-banner:active {
  background: rgba(255, 215, 0, 0.2);
}
.alerts-push-banner i {
  font-size: 1.05rem;
  flex-shrink: 0;
  color: #FFD700;
}
.alerts-push-banner span {
  flex: 1;
}
.alerts-push-banner.denied {
  cursor: default;
  background: rgba(220, 53, 69, 0.14);
  color: #ff9b9b;
}
.alerts-push-banner.denied i { color: #ff6b6b; }
.alerts-push-banner.unsupported {
  cursor: default;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.5);
}
.alerts-push-banner.unsupported i { color: rgba(255,255,255,0.4); }

.notifications-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  padding-bottom: max(5rem, calc(1rem + env(safe-area-inset-bottom)));
  background: linear-gradient(145deg, #0B2B26 0%, #1A4A3F 100%);
  -webkit-overflow-scrolling: touch;
}

.notification-item {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 0.8rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  gap: 0.8rem;
  border-left: 4px solid #FFD700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.12s;
}
.notification-item:active {
  background: rgba(255, 255, 255, 0.13);
  transform: scale(0.985);
}

.notification-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 224, 163, 0.9);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.notification-title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-message {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
  overflow-wrap: break-word;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
}

.empty-notifications {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.4);
}

.notif-delete-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  align-self: center;
  font-size: 0.8rem;
}

.comment-delete-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.comment-delete-btn:hover, .comment-delete-btn:active {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
}

.notif-delete-btn:hover, .notif-delete-btn:active {
  background: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
}

/* ========== HOME LONG-PRESS POPUP MENU ========== */
.home-longpress-menu {
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: rgba(10, 28, 38, 0.97);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1.2rem;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 9999;
  min-width: 170px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(12px);
}
.home-longpress-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}
.hlp-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 0.8rem;
  color: #e8f4f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  text-align: left;
}
.hlp-btn:hover, .hlp-btn:active {
  background: rgba(255,255,255,0.15);
}
.hlp-btn i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}
.hlp-btn.report-btn i { color: #ff6b6b; }
.hlp-menu-label {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0.2rem 0.5rem 0.1rem;
}


/* ===== BOTTOM NAV — Spotify-style transparent glass ===== */
.bottom-nav {
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: none;
  padding: 10px 4px 8px 4px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav::after {
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.nav-btn {
  color: rgba(255,255,255,0.62);
  border-radius: 12px;
  max-width: 80px;
  padding: 8px 4px 4px 4px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-shadow: none;
}
.nav-btn:hover { background: transparent; color: #fff; transform: none; }
.nav-btn span:not(.notification-badge):not(.music-nav-icon-wrap):not(.music-nav-verified) {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

/* Icons: hide the font glyph, draw a thin outline icon with a mask */
.nav-btn i.fas, .nav-btn i.far {
  width: 26px; height: 26px;
  font-size: 0 !important;
  line-height: 0;
  margin-bottom: 4px;
  filter: none;
  background-color: currentColor;
  -webkit-mask: var(--nav-ico) center / contain no-repeat;
          mask: var(--nav-ico) center / contain no-repeat;
}
.nav-btn i.fas::before, .nav-btn i.far::before { content: none !important; }
.music-nav-icon-wrap { width: 26px; height: 26px; }
.music-nav-icon-wrap i.fas { margin-bottom: 0 !important; }

.nav-btn[data-nav="home"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M9.5 21v-6.5h5V21'/%3E%3C/svg%3E");
}
.nav-btn[data-nav="music"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M3.5 11v2M7 8v8M10.5 4v16M14 7v10M17.5 3.5v17M21 9v6'/%3E%3C/svg%3E");
}
.nav-btn[data-nav="upload"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18.5a4.5 4.5 0 0 1-.6-8.96A6 6 0 0 1 18 8.6a4.95 4.95 0 0 1-.5 9.9H7z'/%3E%3Cpath d='M12 16v-6M9.5 12.5 12 10l2.5 2.5'/%3E%3C/svg%3E");
}
.nav-btn[data-nav="alerts"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 2h-15z'/%3E%3Cpath d='M10 21a2.2 2.2 0 0 0 4 0'/%3E%3C/svg%3E");
}
.nav-btn[data-nav="profile"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4.5 21a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
}
.nav-btn[data-nav="trading"] i {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h14l-3-3M20 16H6l3 3'/%3E%3C/svg%3E");
}

/* Active tab: gold icon + label with a gold bar on top */
.nav-btn.active { color: #E9B949; }
.nav-btn.active::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 2px;
  background: #E9B949;
  border-radius: 0 0 2px 2px;
}
.nav-btn .profile-nav-avatar { margin-bottom: 4px; }
.nav-btn.active .profile-nav-avatar { border-color: #E9B949 !important; }

@media (min-width: 900px) {
  .nav-btn.active::before { display: none; }
  .nav-btn.active { background: rgba(233,185,73,0.1); }
}
