/* =========================================================
   PBx1 ELITE - MASTER LAYOUT (DECCAN CLUB CAPSULE THEME)
========================================================= */

:root {
  --bg-dark: #06070c;
  --panel-dark: #0c0918;
  --card-bg: #140f26;
  --card-border: rgba(255, 215, 0, 0.22);
  --accent-gold: #ffd700;
  --accent-gold-glow: rgba(255, 215, 0, 0.4);
  --accent-cyan: #38bdf8;
  --accent-green: #00c06d;
  --accent-red: #ef4444;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --header-calc-h: 56px;
  --footer-calc-h: 62px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  overflow: hidden !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  touch-action: none !important;
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 50% 0%, #15102a 0%, #06070c 75%);
  background-attachment: fixed;
  color: var(--text-main);
  user-select: none;
}

.pbx-app-viewport {
  position: absolute !important;
  top: var(--header-calc-h) !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  padding: 10px 14px 20px 14px !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
}

body.has-footer .pbx-app-viewport {
  bottom: var(--footer-calc-h) !important;
  padding-bottom: 24px !important;
}

/* =====================================
   1. FIXED MASTER HEADER
===================================== */
#appHeader {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: var(--header-calc-h) !important;
  padding: 0 12px !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  touch-action: none !important;
  background: rgba(10, 8, 20, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hdr-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.hdr-menu-btn, .hdr-back-btn {
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--accent-gold);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
  transition: all 0.15s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.hdr-menu-btn:active, .hdr-back-btn:active {
  transform: scale(0.92);
  background: rgba(255, 215, 0, 0.2);
}

.hdr-title-wrap { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hdr-brand-logo { font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: -0.4px; color: var(--accent-gold); text-shadow: 0 0 12px var(--accent-gold-glow); text-decoration: none; line-height: 1; text-transform: uppercase; }
.hdr-brand-badge { background: rgba(255, 215, 0, 0.15); border: 1px solid rgba(255, 215, 0, 0.45); color: var(--accent-gold); font-size: 8.5px; font-weight: 900; padding: 2px 6px; border-radius: 4px; font-style: normal; letter-spacing: 0.8px; text-transform: uppercase; line-height: 1.2; }
.hdr-page-title { font-size: 14.5px; font-weight: 900; color: #ffffff; letter-spacing: 0.4px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hdr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hdr-balance-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 900; color: #ffffff; background: #10141f; padding: 6px 10px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.08); letter-spacing: 0.3px; white-space: nowrap; }
.inr-png-icon { width: 17px; height: 17px; object-fit: contain; display: block; }

.hdr-wallet-btn { background: #00c06d; color: #ffffff; width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 15px; box-shadow: 0 2px 10px rgba(0, 192, 109, 0.35); transition: transform 0.1s ease; flex-shrink: 0; }
.hdr-wallet-btn:active { transform: scale(0.92); }

.hdr-notif-btn { background: #10141f; border: 1px solid rgba(255, 255, 255, 0.08); color: #ffffff; width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; font-size: 14px; transition: all 0.15s ease; flex-shrink: 0; }
.hdr-notif-btn:active { transform: scale(0.92); background: rgba(255, 215, 0, 0.15); color: var(--accent-gold); }
.notif-badge { position: absolute; top: -4px; right: -4px; background: var(--accent-red); color: #ffffff; font-size: 8.5px; font-weight: 900; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 2px solid #06070c; box-shadow: 0 0 8px rgba(239, 68, 68, 0.8); font-family: monospace; }

/* =====================================
   2. FIXED 5-BUTTON BOTTOM DOCK
===================================== */
#appFooter {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: var(--footer-calc-h) !important;
  padding: 0 4px !important;
  z-index: 99999 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr !important;
  align-items: center !important;
  box-sizing: border-box !important;
  touch-action: none !important;
  background: rgba(8, 6, 16, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.9);
}

.dock-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: #94a3b8; height: 100%; cursor: pointer; transition: all 0.15s ease; background: transparent; border: none; }
.dock-item i { font-size: 20px !important; }
.dock-item span { font-size: 10px !important; font-weight: 800; letter-spacing: 0.3px; }
.dock-item.active { color: var(--accent-gold); }
.dock-item.active i { color: var(--accent-gold); transform: translateY(-2px); filter: drop-shadow(0 0 10px var(--accent-gold-glow)); }
.dock-item.active span { color: var(--accent-gold); font-weight: 900; }

.dock-center-home { display: flex; align-items: center; justify-content: center; text-decoration: none; position: relative; top: -16px; }
.dock-logo-bubble { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle, #251642 0%, #080612 100%); border: 2.5px solid #ffd700; box-shadow: 0 0 18px rgba(255, 215, 0, 0.6), 0 8px 18px rgba(0, 0, 0, 0.9); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.dock-logo-bubble img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dock-center-home:active .dock-logo-bubble { transform: scale(0.92); }

/* =====================================
   3. DECCAN-CLUB CAPSULE DRAWER
===================================== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2147483646 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: #080710;
  background-image: linear-gradient(180deg, #100a20 0%, #05040a 100%);
  border-right: 1px solid var(--card-border);
  z-index: 2147483647 !important;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.95);
  padding: 14px 12px 28px 12px;
  gap: 12px;
}

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

/* Profile Card */
.sidebar-profile-card {
  background: #0d091b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  transition: transform 0.15s ease;
}

.sidebar-profile-card:active { transform: scale(0.98); }

.p-avatar {
  width: 44px;
  height: 44px;
  background: #05030a;
  border-radius: 50%;
  border: 1.5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 18px;
  position: relative;
  flex-shrink: 0;
}

.p-avatar::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  border: 2px solid #140f26;
}

.p-info { flex: 1; min-width: 0; }
.p-name { font-size: 14.5px; font-weight: 900; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-id { font-size: 11px; color: #94a3b8; margin-top: 2px; font-weight: 700; font-family: monospace; }
.p-arrow { color: #64748b; font-size: 13px; }

/* Category Blocks & Capsule Menu Buttons */
.sb-category-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-sec-title {
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding-left: 6px;
}

.sb-capsules-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sb-capsule-card {
  background: #0d091a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.sb-capsule-card:active {
  transform: scale(0.98);
  background: #140e26;
  border-color: rgba(255, 215, 0, 0.3);
}

.sc-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #e2e8f0;
}

.sc-left i {
  font-size: 15px;
  color: #cbd5e1;
  width: 18px;
  text-align: center;
}

.sc-left i.text-gold {
  color: var(--accent-gold);
}

.sc-arrow {
  color: #64748b;
  font-size: 11px;
}

/* Home Card Golden Accent */
.sb-capsule-card.home-card,
.sb-capsule-card.active-gold {
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.08) 0%, #0d091a 100%);
}

.sb-capsule-card.home-card .sc-left,
.sb-capsule-card.active-gold .sc-left {
  color: var(--accent-gold);
}

.sb-capsule-card.home-card .sc-left i,
.sb-capsule-card.active-gold .sc-left i {
  color: var(--accent-gold);
}

.sb-capsule-card.home-card .sc-arrow,
.sb-capsule-card.active-gold .sc-arrow {
  color: var(--accent-gold);
}

.sc-hot-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* Guide Sub-Links Dropdown Accordion */
.guide-sub-links {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 4px 16px;
}

.guide-sub-links.open {
  display: flex;
}

.guide-sub-item {
  background: rgba(14, 10, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.15s ease;
}

.guide-sub-item:active {
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
  border-color: rgba(255, 215, 0, 0.3);
}

/* Support Card */
.support-card {
  background: #0d091a;
  border: 1px solid rgba(0, 230, 137, 0.35);
  border-radius: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  margin-top: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.supp-left { display: flex; align-items: center; gap: 10px; }
.supp-left i { font-size: 20px; color: #c084fc; }
.supp-text .title { font-size: 12.5px; font-weight: 900; color: #fff; }
.supp-text .sub { font-size: 10px; color: #94a3b8; }
.supp-badge { background: var(--accent-green); color: #032014; font-size: 9.5px; font-weight: 900; padding: 4px 8px; border-radius: 6px; text-align: center; white-space: nowrap; box-shadow: 0 0 10px rgba(0, 230, 137, 0.3); }

/* Channels Section */
.channels-section { padding-top: 4px; }
.channels-title { font-size: 10px; font-weight: 900; color: var(--accent-gold); letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; padding-left: 6px; }
.channels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.channel-btn {
  background: #0d091a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 18px;
}

.channel-btn.tg { color: #38bdf8; }
.channel-btn.insta { color: #ec4899; }
.channel-btn.wa { color: #22c55e; }

/* =====================================
   4. NOTIFICATION DROPDOWN DRAWER
===================================== */
.notif-drawer-overlay {
  position: fixed;
  inset: 0;
  top: var(--header-calc-h) !important;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99990 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.notif-drawer-overlay.open { opacity: 1; visibility: visible; }

.notif-drawer {
  position: fixed;
  top: var(--header-calc-h) !important;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: #0d0a1a;
  border-bottom: 2px solid var(--accent-gold);
  border-radius: 0 0 18px 18px;
  z-index: 99995 !important;
  transform: translateY(-115%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.95);
}

.notif-drawer.open { transform: translateY(0); }

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

.notif-title { font-size: 13px; font-weight: 900; color: #ffffff; display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; }
.notif-actions { display: flex; align-items: center; gap: 12px; }
.btn-mark-read { background: none; border: none; color: var(--accent-gold); font-size: 11px; font-weight: 800; cursor: pointer; }
.btn-close-notif { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; }
.btn-clear-all { background: none; border: none; color: #94a3b8; font-size: 11px; font-weight: 700; cursor: pointer; }
.btn-clear-all:active { color: #ef4444; }

.notif-list-container {
  overflow-y: auto;
  padding: 10px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-item {
  background: #140f26;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.notif-item.unread { background: rgba(255, 215, 0, 0.04); }
.notif-item:active { transform: scale(0.98); }
.notif-item-icon { font-size: 18px; padding-top: 2px; flex-shrink: 0; }
.notif-item-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.notif-item-title { font-size: 12.5px; font-weight: 900; color: #ffffff; letter-spacing: 0.2px; }
.notif-item-msg { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.notif-item-time { font-size: 9.5px; color: #64748b; margin-top: 4px; font-family: monospace; }

.notif-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.notif-empty i { font-size: 26px; opacity: 0.3; }
