/* ========== PROFILE PAGE STYLES ========== */
.profile-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #1b3b4f;
  z-index: 20;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Smooth, GPU-friendly scrolling — prevents blank/white tiles on fast flings */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  will-change: scroll-position;
}
@supports (height: 100dvh) {
  .profile-page { height: 100dvh; }
}

/* Profile lists: keep every card painted while scrolling fast */
.profile-content,
#profileMusicGrid,
.profile-video-grid {
  content-visibility: visible;
}
#profileMusicGrid > div { contain: none; }
#profileMusicGrid img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.profile-page.hidden {
  display: none !important;
}

.profile-header {
  background: linear-gradient(135deg, #0F3D34 0%, #1B5E4F 100%);
  padding: 1.5rem 1.2rem 2rem 1.2rem;
  text-align: center;
  position: relative;
}

.profile-back-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

/* Slot that holds the offline pill centered in the profile header */
#rupiaNetBtnProfileSlot {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.profile-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.profile-menu-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

.profile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ========== LINKED ACCOUNTS MODAL ========== */
.linked-accounts-modal .modal {
  max-width: 380px;
}

.linked-account-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0.8rem;
  border: 1.5px solid #444;
  border-radius: 1rem;
  background: #2a2a2a;
  margin-bottom: 0.8rem;
}

.linked-account-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  border: 1px solid #E2EDE9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #EA4335;
  flex-shrink: 0;
}

.linked-account-info {
  flex: 1;
}

.linked-account-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.1rem;
}

.linked-account-email {
  font-size: 0.72rem;
  color: #aaa;
}

.linked-account-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #E8F3F0;
  color: #1B5E4F;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  margin-top: 0.3rem;
}

.linked-account-empty {
  text-align: center;
  color: #aaa;
  padding: 1.5rem 0;
  font-size: 0.85rem;
}

/* ========== IN-APP NOTIFICATION POP-UP ========== */
.inapp-notif-icon {
  width: 38px; height: 38px; background: #E8F3F0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #1B5E4F; font-size: 1.1rem; flex-shrink: 0;
}
.inapp-notif-body { flex: 1; }
.inapp-notif-title { font-weight: 700; font-size: 0.82rem; color: #1F2E2A; margin-bottom: 0.1rem; }
.inapp-notif-msg { font-size: 0.72rem; color: #5F6C69; }
.inapp-notif-close { background: none; border: none; color: #8EA39D; font-size: 0.9rem; cursor: pointer; padding: 0 0.2rem; flex-shrink: 0; }

.withdrawal-modal .input-field,
.delete-account-modal .input-field {
  background: #2a2a2a; border-color: rgba(255,255,255,0.15);
  color: #fff;
}
.withdrawal-modal .input-field:focus,
.delete-account-modal .input-field:focus { border-color: #6ee89a; }
.withdrawal-modal .input-group label,
.delete-account-modal .input-group label { color: rgba(255,255,255,0.7) !important; }
.withdrawal-modal .input-icon,
.delete-account-modal .input-icon { color: rgba(255,255,255,0.4); }

/* ========== WITHDRAWAL MODAL ========== */
.withdrawal-modal .modal {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}
.withdrawal-modal .modal-header { flex-shrink: 0; }
.withdrawal-modal .modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}

/* Payout method switcher — PayPal / Mobile Money */
.withdraw-method-row {
  display: flex; gap: 0.5rem; margin-bottom: 1.1rem;
}
.withdraw-method-btn {
  flex: 1; padding: 0.6rem 0.4rem;
  background: #2a2a2a;
  border: 1.5px solid rgba(255,255,255,0.14);
  border-radius: 0.85rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  cursor: pointer; transition: border-color 0.18s, background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.withdraw-method-btn.active {
  border-color: #6ee89a;
  background: rgba(110,232,154,0.1);
}
.withdraw-method-btn-icon { font-size: 1.1rem; line-height: 1; color: rgba(255,255,255,0.65); }
.withdraw-method-btn.active .withdraw-method-btn-icon { color: #6ee89a; }
.withdraw-method-btn-label {
  font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.65);
  text-align: center;
}
.withdraw-method-btn.active .withdraw-method-btn-label { color: #6ee89a; }

.paypal-connect-box {
  background: linear-gradient(135deg, #003087 0%, #009cde 100%);
  border-radius: 1.2rem;
  padding: 1.6rem 1.2rem;
  text-align: center;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}
.paypal-connect-box::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 130px; height: 130px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}
.paypal-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.paypal-logo-icon {
  width: 52px; height: 52px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.paypal-logo-icon svg { width: 32px; height: 32px; }
.paypal-connect-title {
  font-size: 1.05rem; font-weight: 700; color: white;
  margin-bottom: 0.35rem;
}
.paypal-connect-desc {
  font-size: 0.75rem; color: rgba(255,255,255,0.85);
  line-height: 1.5;
}
.paypal-steps {
  display: flex; flex-direction: column; gap: 0.7rem;
  margin-bottom: 1rem;
}
.paypal-step {
  display: flex; align-items: flex-start; gap: 0.8rem;
  background: #2a2a2a; border-radius: 0.8rem; padding: 0.75rem 0.9rem;
}
.paypal-step-num {
  min-width: 26px; height: 26px;
  background: linear-gradient(135deg, #003087, #009cde);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}
.paypal-step-text { flex: 1; }
.paypal-step-label { font-size: 0.82rem; font-weight: 600; color: #fff; }
.paypal-step-desc { font-size: 0.68rem; color: #aaa; margin-top: 0.1rem; }
.paypal-connect-btn {
  width: 100%;
  background: linear-gradient(135deg, #003087 0%, #009cde 100%);
  border: none; padding: 0.7rem; border-radius: 1.5rem;
  font-weight: 700; font-size: 0.9rem; color: white;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(0,60,135,0.3);
  transition: all 0.2s ease;
}
.paypal-connect-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,60,135,0.4); }
.paypal-connect-btn svg { width: 20px; height: 20px; }
.paypal-note {
  text-align: center; font-size: 0.62rem; color: #aaa;
  margin-top: 0.8rem; display: flex; align-items: center;
  justify-content: center; gap: 0.3rem;
}
/* Connected state */
.paypal-connected-box {
  background: #2a2a2a;
  border: 2px solid #6ee89a;
  border-radius: 1.2rem; padding: 1.2rem;
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.2rem;
}
.paypal-connected-icon {
  width: 48px; height: 48px; background: white;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-top: 0.1rem;
}
.paypal-connected-info { flex: 1; min-width: 0; }
.paypal-connected-label { font-size: 0.72rem; color: #6ee89a; font-weight: 600; }
.paypal-connected-email {
  font-size: 0.88rem; font-weight: 700; color: #fff; margin-top: 0.1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.35;
}
.paypal-connected-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: #1B5E4F; color: white; font-size: 0.6rem;
  font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 1rem; margin-top: 0.3rem;
}
.withdrawal-amount-row {
  display: flex; gap: 0.6rem; margin-bottom: 1rem; align-items: flex-end;
}
.withdrawal-amount-row .input-group { flex: 1; margin-bottom: 0; }
.withdraw-now-btn {
  background: linear-gradient(100deg, #0F3D34, #1B5E4F);
  border: none; padding: 0.55rem 1rem; border-radius: 1.5rem;
  font-weight: 700; font-size: 0.8rem; color: white; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.paypal-disconnect-btn {
  width: 100%; background: linear-gradient(100deg, #0F3D34, #1B5E4F); border: none;
  padding: 0.55rem; border-radius: 1.5rem; font-weight: 600;
  font-size: 0.75rem; color: white; cursor: pointer; margin-top: 0.5rem;
}

/* ========== DELETE ACCOUNT MODAL ========== */
.delete-account-modal .modal { max-width: 360px; background: #111 !important; }
.delete-account-modal .modal-header h3 { color: #fff !important; }
.delete-account-modal .modal-close { color: rgba(255,255,255,0.6) !important; }
.delete-account-modal label { color: rgba(255,255,255,0.7) !important; }
.delete-warning-box {
  background: rgba(220,53,69,0.12); border: 1.5px solid rgba(220,53,69,0.4); border-radius: 0.8rem;
  padding: 0.9rem 1rem; margin-bottom: 1rem; display: flex; gap: 0.7rem; align-items: flex-start;
}
.delete-warning-box i { color: #dc3545; font-size: 1.2rem; margin-top: 0.1rem; flex-shrink: 0; }
.delete-warning-text { font-size: 0.78rem; color: rgba(255,255,255,0.8); line-height: 1.5; }
.delete-warning-text strong { display: block; margin-bottom: 0.2rem; font-size: 0.85rem; color: #fff; }
.delete-confirm-btn {
  width: 100%; background: linear-gradient(100deg, #b91c1c, #dc3545); border: none;
  padding: 0.6rem; border-radius: 1.5rem; font-weight: 700; font-size: 0.85rem;
  color: white; cursor: pointer; margin-top: 0.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}
.delete-confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== PROFILE MENU — FULL-SCREEN OVERLAY ===== */
.profile-dropdown {
  position: fixed;
  inset: 0;
  background: #1a1a1a;
  z-index: 200;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

/* Drag handle */
.profile-dropdown::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0.75rem auto 0 auto;
  flex-shrink: 0;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.3rem 0.6rem 1.3rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-dropdown-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #6ee89a;
}

.profile-dropdown-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.75);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s;
  flex-shrink: 0;
}

.profile-dropdown-close:hover,
.profile-dropdown-close:active {
  background: rgba(255, 255, 255, 0.18);
}

.profile-dropdown-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0 2rem 0;
}

.dropdown-section-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(110, 232, 154, 0.55);
  padding: 1rem 1.3rem 0.35rem 1.3rem;
}

.dropdown-item {
  padding: 0.95rem 1.3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  width: 100%;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

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

.dropdown-item i {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  color: #6ee89a;
  flex-shrink: 0;
}

.dropdown-item .dropdown-item-arrow {
  margin-left: auto;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
}

.dropdown-item.danger {
  color: rgba(255, 100, 90, 0.95);
}

.dropdown-item.danger i {
  color: rgba(255, 100, 90, 0.85);
}


/* ===== ACCOUNT TYPE TOGGLE ===== */
.account-type-toggle-wrap {
  padding: 0.75rem 1.3rem 0.9rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.account-type-label-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.account-type-label-row i {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  color: #6ee89a;
  flex-shrink: 0;
}
.account-type-label-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  flex: 1;
}
.account-type-pill-row {
  display: flex;
  gap: 0.5rem;
  padding-left: 2.2rem;
}
.account-type-pill {
  flex: 1;
  padding: 0.52rem 0;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1.5px solid rgba(110,232,154,0.25);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}
.account-type-pill.active-business {
  background: linear-gradient(100deg,#1B5E4F,#0F3D34);
  border-color: #6ee89a;
  color: #6ee89a;
  box-shadow: 0 0 10px rgba(110,232,154,0.18);
}
.account-type-pill.active-personal {
  background: linear-gradient(100deg,#1a3a5c,#0d2740);
  border-color: #64b5f6;
  color: #64b5f6;
  box-shadow: 0 0 10px rgba(100,181,246,0.18);
}
.account-type-hint {
  padding-left: 2.2rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.4;
}

/* ===== REGISTER FORM — locked account type badge ===== */
.register-account-type-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(100,181,246,0.07);
  border: 1.5px solid rgba(100,181,246,0.22);
  border-radius: 1rem;
  padding: 0.55rem 1rem;
  margin-bottom: 0.6rem;
}
.register-account-type-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg,#1a3a5c,#0d2740);
  border: 1.5px solid #64b5f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.register-account-type-icon i {
  color: #64b5f6;
  font-size: 0.78rem;
}
.register-account-type-text {
  flex: 1;
}
.register-account-type-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64b5f6;
  letter-spacing: 0.02em;
}
.register-account-type-text span {
  font-size: 0.67rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.35;
}
.register-account-type-lock {
  color: rgba(255,255,255,0.2);
  font-size: 0.72rem;
}

/* Trading nav button — visibility controlled entirely by JS inline style */
/* (no CSS display:none here so JS display=flex works correctly) */


/* ===== TRADING SCREEN (full page) ===== */
#tradingScreen {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--nav-h, 64px); /* end exactly where the bottom nav starts */
  background: #0d1f1a;
  z-index: 50; /* below .bottom-nav (100) so the nav stays visible & tappable */
  visibility: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
#tradingScreen.ts-show {
  transform: translateX(0);
  visibility: visible;
}
/* Desktop: nav is a left sidebar, so the screen sits to its right */
@media (min-width: 768px) {
  #tradingScreen { left: 220px; bottom: 0; }
}
/* Trading screen open: solid nav + highlighted Trading button */
body.rupia-trading-open .bottom-nav { background: #121212; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.rupia-trading-open .bottom-nav::after { background: #121212; }
.ts-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem 0.75rem 1.1rem;
  background: linear-gradient(180deg, rgba(15,35,28,0.98) 0%, rgba(13,31,26,0.92) 100%);
  border-bottom: 1px solid rgba(110,232,154,0.1);
  flex-shrink: 0;
}
.ts-back-btn {
  background: rgba(255,255,255,0.07);
  border: none;
  color: #6ee89a;
  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;
}
.ts-back-btn:active { background: rgba(110,232,154,0.15); }
.ts-header-info { flex: 1; }
.ts-header-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.ts-header-sub {
  font-size: 0.65rem;
  color: rgba(110,232,154,0.7);
  margin-top: 0.1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.ts-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4CD080;
  box-shadow: 0 0 6px #4CD080;
  animation: ts-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ts-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* Week tabs */
.ts-week-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem 0.6rem 1.1rem;
  background: rgba(13,31,26,0.6);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.ts-week-tabs::-webkit-scrollbar { display: none; }
.ts-week-tab {
  flex-shrink: 0;
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: 'Inter', sans-serif;
}
.ts-week-tab.active {
  background: rgba(110,232,154,0.12);
  border-color: #6ee89a;
  color: #6ee89a;
}

/* Scroll body */
.ts-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.8rem 1rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Summary bar */
.ts-summary-bar {
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(110,232,154,0.1);
  border-radius: 1rem;
  overflow: hidden;
  flex-shrink: 0;
}
.ts-summary-item {
  flex: 1;
  text-align: center;
  padding: 0.7rem 0.4rem;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.ts-summary-item:last-child { border-right: none; }
.ts-summary-val {
  font-size: 0.9rem;
  font-weight: 800;
  color: #6ee89a;
}
.ts-summary-lbl {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.15rem;
}

/* Section heading */
.ts-section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
}
.ts-section-label i { color: #FFE0A3; font-size: 0.65rem; }

/* Song leaderboard cards — reuse tsc-* classes from trading dashboard */
.ts-songs-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Crown badge on #1 */
.ts-crown {
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  line-height: 1;
}

/* Empty state */
.ts-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255,255,255,0.3);
}
.ts-empty i { font-size: 2.8rem; display: block; margin-bottom: 0.8rem; color: rgba(110,232,154,0.25); }
.ts-empty p { font-size: 0.82rem; line-height: 1.6; }

/* Chart card inside trading screen */
.ts-chart-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,224,163,0.12);
  border-radius: 1.1rem;
  padding: 0.9rem 0.9rem 0.6rem 0.9rem;
  flex-shrink: 0;
}
.ts-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.ts-chart-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFE0A3;
  display: flex; align-items: center; gap: 0.4rem;
}
.ts-chart-canvas-wrap {
  position: relative;
  height: 120px;
  width: 100%;
}
.ts-chart-canvas-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.ts-chart-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ts-cs-item { flex: 1; text-align: center; }
.ts-cs-val { font-size: 0.82rem; font-weight: 700; color: white; }
.ts-cs-val.up { color: #4CD080; }
.ts-cs-val.down { color: #FF6B6B; }
.ts-cs-lbl { font-size: 0.5rem; color: rgba(255,255,255,0.35); margin-top: 0.1rem; text-transform: uppercase; letter-spacing: 0.5px; }

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 0.4rem 1.3rem;
}

.profile-avatar-wrapper {
  position: relative;
  width: 100px;
  margin: 0 auto 1rem auto;
}

.profile-edit-corner-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  border: 2px solid #FFE0A3;
  color: #FFE0A3;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-edit-corner-btn:hover,
.profile-edit-corner-btn:active {
  transform: scale(1.12);
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.profile-zoom-corner-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  border: 2px solid #FFE0A3;
  color: #FFE0A3;
  font-size: 0.58rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.profile-zoom-corner-btn:hover,
.profile-zoom-corner-btn:active {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #1B5E4F, #0F3D34);
  border-radius: 50%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #FFE0A3;
  box-shadow: 0 0 0 2px rgba(255,224,163,0.35), 0 4px 14px rgba(0,0,0,0.45);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}
.profile-avatar:active { transform: scale(0.96); }

.profile-avatar i {
  font-size: 3.5rem;
  color: #FFE0A3;
}

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

.profile-avatar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.profile-avatar:hover .profile-avatar-overlay,
.profile-avatar:active .profile-avatar-overlay {
  opacity: 1;
}

.profile-avatar-overlay i {
  font-size: 1rem;
  color: white;
}

/* ========== PORTAL PHOTO PICKER ========== */
/* The old bottom-sheet overlay is now hidden; we use the portal instead */
.photo-picker-overlay {
  display: flex;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.photo-picker-overlay.show {
  opacity: 1;
  visibility: visible;
}
.photo-picker-sheet {
  background: #111;
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1rem 1.2rem calc(2rem + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 480px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  transform: translateY(40px);
  transition: transform 0.25s ease;
}
.photo-picker-overlay.show .photo-picker-sheet {
  transform: translateY(0);
}
.photo-picker-handle {
  width: 40px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 1rem;
}
.photo-picker-title {
  font-size: 1rem; font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 1rem;
}
.photo-picker-preview {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 3px solid #6ee89a;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  overflow: hidden;
  font-size: 2.2rem; color: #6ee89a;
}
.photo-picker-preview img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.photo-picker-options {
  display: flex; flex-direction: column; gap: 0.6rem;
  margin-bottom: 1rem;
}
.photo-picker-option {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
  cursor: pointer;
  font-size: 0.85rem; font-weight: 600; color: #fff;
  transition: background 0.15s;
}
.photo-picker-option:hover, .photo-picker-option:active {
  background: rgba(255,255,255,0.07);
}
.photo-picker-option i { font-size: 1.1rem; color: #6ee89a; }
.photo-picker-save-btn {
  width: 100%;
  background: linear-gradient(100deg, #0F3D34, #1B5E4F);
  color: white; border: none;
  padding: 0.7rem; border-radius: 1.5rem;
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; margin-bottom: 0.5rem;
  display: none;
}
.photo-picker-save-btn.show { display: block; }
.photo-picker-cancel {
  width: 100%; background: none; border: none;
  color: rgba(255,255,255,0.4); font-size: 0.8rem; font-weight: 600;
  cursor: pointer; padding: 0.4rem;
}

/* Portal wrapper — starts as the avatar circle, expands to fill the header */
.avatar-portal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(135deg, #0A2E26 0%, #1B5E4F 100%);
  overflow: hidden;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border-radius: 0;
  opacity: 1;
}

.avatar-portal.open {
  transform: translateY(0);
  pointer-events: auto;
}

/* Inner content of the portal */
.portal-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.1rem 1rem 0.8rem 1rem;
  opacity: 1;
  transform: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.avatar-portal.open .portal-inner {
  opacity: 1;
  transform: none;
}

.portal-close-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  color: white;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  flex-shrink: 0;
}

.portal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFE0A3;
  text-align: center;
  margin-bottom: 1rem;
  margin-top: 0.4rem;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.portal-tab-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.portal-tab {
  flex: 1;
  background: rgba(10, 25, 35, 0.95);
  border: 1px solid rgba(220, 240, 255, 0.12);
  border-radius: 2rem;
  color: #d4e9f2;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portal-tab.active {
  background: #FFE0A3;
  border-color: #FFE0A3;
  color: #0F3D34;
}

/* Portal grid — mirrors profile-video-grid exactly */
.portal-video-list {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  align-content: start;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.portal-video-list::-webkit-scrollbar { width: 3px; }
.portal-video-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

/* Grid thumb — identical to .profile-video-thumb */
.portal-video-item {
  position: relative;
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, #0F3D34, #1b3b4f);
  border-radius: 0.6rem;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(27,94,79,0.2);
}

.portal-video-item video {
  width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}

.portal-video-item .portal-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.35rem;
}

.portal-video-item .portal-thumb-name {
  color: white; font-size: 0.55rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.portal-video-item .portal-thumb-date {
  color: rgba(255,255,255,0.55); font-size: 0.48rem;
}

.portal-video-item .portal-thumb-badge {
  position: absolute; top: 0.3rem; left: 0.3rem;
  font-size: 0.45rem; font-weight: 700; padding: 0.12rem 0.35rem;
  border-radius: 1rem; color: white; text-transform: uppercase;
}

.portal-video-item .portal-thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}

.portal-video-item .portal-thumb-play i {
  font-size: 1.4rem; color: rgba(255,255,255,0.8);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Small trash button top-right of each thumb */
.portal-delete-btn {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 22px;
  height: 22px;
  background: rgba(220,53,69,0.75);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
.portal-delete-btn:hover, .portal-delete-btn:active {
  background: rgba(220,53,69,1);
}

.portal-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.68rem;
  text-align: center;
  gap: 0.4rem;
  padding: 2rem 0;
}

.portal-empty i { font-size: 2rem; opacity: 0.35; }

.portal-save-btn { display: none; }

/* ========== GRAPH PANEL (mirrors notifications-panel) ========== */
#graphOverlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  height: 100dvh;
  background: #1a1a1a;
  z-index: 9000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -5px 0 20px rgba(0,0,0,0.3);
}
#graphOverlay.show {
  transform: translateX(0);
}
.graph-panel-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;
  flex-shrink: 0;
}
.graph-panel-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.graph-panel-close {
  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;
  flex-shrink: 0;
}
.graph-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
}
.graph-tab-btn {
  background: #2a2a2a;
  border: none;
  color: #ccc;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.graph-tab-btn.active {
  background: linear-gradient(100deg, #0F3D34, #1B5E4F);
  color: #FFE0A3;
}
.graph-metric-btn {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.65);
  font-size: 0.58rem;
  font-weight: 600;
  border-radius: 1.5rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.graph-metric-btn:active {
  transform: scale(0.95);
}
.graph-metric-btn.active {
  background: linear-gradient(135deg, #0F3D34, #1B5E4F);
  border-color: #1B5E4F;
  color: #FFE0A3;
  box-shadow: 0 3px 10px rgba(27,94,79,0.4);
}
.graph-x-label {
  font-size: 0.48rem;
  color: #aaa;
  text-align: center;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.2rem;
}

.profile-username {
  font-size: 0.9rem;
  color: #FFE0A3;
  margin-bottom: 0.3rem;
}

.profile-bio-display {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
  min-height: 1rem;
  max-width: 220px;
  margin: 0 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}


/* ===== VERIFIED BADGE ===== */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #00b341 0%, #00882f 100%);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
  box-shadow: 0 1px 5px rgba(0,179,65,0.45), 0 0 0 2px rgba(255,255,255,0.18);
  position: relative;
  top: -1px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}
.verified-badge:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(0,179,65,0.6), 0 0 0 2.5px rgba(255,255,255,0.28);
}
.verified-badge svg {
  width: 11px; height: 11px;
  fill: none; stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.verified-badge.sm { width: 15px; height: 15px; margin-left: 4px; top: -1px; }
.verified-badge.sm svg { width: 8px; height: 8px; }
/* Performance Graph settings row — pill-style badge (matches the "Verified" tag
   used for Face Verification) instead of the bare circular tick used elsewhere. */
.perf-graph-verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.62rem;
  font-weight: 800;
  color: #6ee89a;
  background: rgba(110,232,154,0.12);
  border: 1px solid rgba(110,232,154,0.35);
  border-radius: 0.45rem;
  padding: 0.12rem 0.5rem;
}
.perf-graph-verified-pill svg {
  width: 8px; height: 8px;
  fill: none; stroke: #6ee89a;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
/* Wrapper for the music icon + verified overlay inside the nav button */
.music-nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 3px;
}
/* Green tick overlaid at the bottom-right of the music icon — only when paid */
.music-nav-verified {
  position: absolute;
  bottom: -3px;
  right: -5px;
  width: 13px;
  height: 13px;
  background: linear-gradient(135deg, #00b341 0%, #00882f 100%);
  border-radius: 50%;
  border: 1.5px solid #0a1923;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,179,65,0.5);
}
.music-nav-verified svg {
  width: 7px; height: 7px;
  fill: none; stroke: #fff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.music-nav-verified .verified-badge.sm {
  margin-left: 3px;
  top: 0;
  position: relative;
}
.profile-name { display: flex !important; align-items: center; justify-content: center; }
.reel-profile-card-name { display: flex !important; align-items: center; justify-content: center; }

.profile-content {
  flex: 1;
  background: transparent;
  border-radius: 0;
  margin-top: 0;
  padding: 1.5rem 1.2rem;
}

.profile-section {
  margin-bottom: 1.5rem;
}

.profile-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 224, 163, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}

.profile-info-item {
  display: flex;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-info-item:last-child {
  border-bottom: none;
}

.profile-info-icon {
  width: 30px;
  color: rgba(255, 224, 163, 0.85);
  font-size: 1rem;
}

.profile-info-content {
  flex: 1;
}

.profile-info-label {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.profile-info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.75rem 0.4rem;
  margin-top: 1rem;
  gap: 0;
}

.profile-stat-item {
  text-align: center;
  flex: 1;
  min-width: 0;
  padding: 0 0.1rem;
}

.profile-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #FFE0A3;
  white-space: nowrap;
}

.profile-stat-label {
  font-size: 0.48rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Edit Profile Modal */
.edit-modal .modal {
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.edit-modal .input-group {
  margin-bottom: 1rem;
}

.edit-modal .input-field {
  padding-left: 2.5rem;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
}

@media (min-width: 500px) {
  .nav-btn {
    min-width: 70px;
    max-width: 85px;
    padding: 8px 8px;
  }
  .nav-btn i {
    font-size: 1.7rem;
  }
  .nav-btn span {
    font-size: 0.75rem;
  }
}

@media (max-width: 360px) {
  .nav-btn {
    min-width: 48px;
    padding: 5px 3px;
  }
  .nav-btn i {
    font-size: 1.3rem;
  }
  .nav-btn span {
    font-size: 0.55rem;
  }
}

/* Very small phones (older/budget Android, ~320px-wide screens).
   Tightens outer spacing and shrinks the nav further so nothing
   gets clipped or forces horizontal scroll at the narrowest widths. */
@media (max-width: 340px) {
  body {
    padding: 0.5rem;
  }
  .modal {
    width: 94%;
    padding: 1rem 0.8rem;
  }
  .nav-btn {
    min-width: 40px;
    padding: 4px 2px;
  }
  .nav-btn i {
    font-size: 1.1rem;
  }
  .nav-btn span {
    font-size: 0.5rem;
  }
}

