/* POL Staking Hub - Premium brand layer */
:root {
  --bg: #03060d;
  --bg2: #070a13;
  --bg3: #0b101b;
  --gold: #f0b92e;
  --gold2: #ffd977;
  --gold3: #fff1bf;
  --gold-dark: #8f6516;
  --silver: #cbd5e1;
  --silver2: #f8fafc;
  --ink: #02040a;
  --card-bg: linear-gradient(145deg, rgba(12,16,28,.92), rgba(3,6,13,.96));
  --card-border: 1px solid rgba(240,185,46,.18);
  --border: rgba(240,185,46,.18);
  --border2: rgba(255,255,255,.08);
  --text: #f4f7fb;
  --text-muted: #9aa4b6;
  --text-dim: #616b7d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 22px 70px rgba(0,0,0,.55);
  --shadow-gold: 0 20px 58px rgba(240,185,46,.16);
}

html { background: var(--bg); }
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip !important;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  background:
    linear-gradient(180deg, rgba(3,6,13,.92), rgba(3,6,13,.98)),
    radial-gradient(circle at 50% -10%, rgba(240,185,46,.10), transparent 35%),
    var(--bg) !important;
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.08));
}
.ambient-glow { display: none !important; }

.main-header {
  border-bottom: 1px solid rgba(240,185,46,.16);
  box-shadow: 0 10px 36px rgba(0,0,0,.34);
}
.main-header::before {
  background: rgba(3,6,13,.88);
  backdrop-filter: blur(24px) saturate(140%);
}
.header-container { height: 72px; max-width: 1440px; }
.logo-img {
  width: 46px;
  height: 46px;
  border-color: rgba(240,185,46,.78);
  box-shadow: 0 0 0 4px rgba(240,185,46,.08), 0 0 26px rgba(240,185,46,.28);
}
.logo-text {
  font-size: .98rem;
  letter-spacing: .12em;
  background: linear-gradient(135deg, var(--silver2), var(--gold2) 54%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
}
.nav-item {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 800;
}
.nav-item:hover,
.nav-item.active {
  color: var(--gold2);
  background: rgba(240,185,46,.10);
  border-color: rgba(240,185,46,.16);
}

.btn {
  border-radius: 12px;
  font-weight: 900;
  letter-spacing: .01em;
}
.btn-primary {
  background: linear-gradient(135deg, #ffe38d 0%, var(--gold) 45%, #a87311 100%);
  box-shadow: 0 10px 30px rgba(240,185,46,.25), inset 0 1px 0 rgba(255,255,255,.42);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 44px rgba(240,185,46,.34); }
.btn-outline {
  color: var(--gold2);
  border: 1px solid rgba(240,185,46,.38);
  background: rgba(240,185,46,.035);
}
.btn-outline:hover { background: rgba(240,185,46,.11); border-color: rgba(240,185,46,.58); }

.glass-card,
.glass-card-dark,
.stake-card,
.plan-card,
.income-card,
.stat-card,
.kpi-card,
.trust-badge,
.info-card,
.milestone-card,
.referral-quick-bar,
.market-strip {
  background: linear-gradient(145deg, rgba(15,20,34,.86), rgba(4,7,15,.94));
  border: 1px solid rgba(240,185,46,.16);
  box-shadow: 0 18px 54px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.04);
}

/* Front page */
.hero-section {
  min-height: calc(100vh - 72px);
  align-items: stretch;
}
.hero-bg-img {
  opacity: .52;
  object-position: 65% center;
  filter: saturate(1.08) contrast(1.08);
}
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(3,6,13,.96) 0%, rgba(3,6,13,.78) 42%, rgba(3,6,13,.24) 100%),
    linear-gradient(to bottom, rgba(3,6,13,.08), var(--bg) 98%);
}
.hero-content {
  max-width: 1440px;
  padding-top: 104px;
  padding-bottom: 88px;
  display: flex;
  align-items: center;
}
.hero-inner { max-width: 720px; }
.hero-badge {
  color: var(--gold2);
  background: rgba(240,185,46,.11);
  border-color: rgba(240,185,46,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.hero-title {
  font-size: clamp(2.8rem, 6.6vw, 5.8rem);
  letter-spacing: 0;
  line-height: .98;
  text-shadow: 0 18px 52px rgba(0,0,0,.72);
}
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--gold3) 34%, var(--gold) 70%, #9f741b 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-subtitle {
  max-width: 650px;
  color: #b8c1d1;
  font-size: 1.06rem;
}
.hero-stats-row {
  max-width: 690px;
  border-radius: 18px;
  background: rgba(3,6,13,.70);
  border: 1px solid rgba(240,185,46,.18);
}
.hero-stat-value { color: var(--gold2); font-size: 1.5rem; }
.section { padding-top: 92px; padding-bottom: 92px; }
.section-title { letter-spacing: 0; }
.section-sub { color: #a9b3c4; }
.info-img {
  border-radius: 18px;
  border-color: rgba(240,185,46,.22);
  box-shadow: 0 24px 70px rgba(0,0,0,.46);
}
.plan-card { border-radius: 18px; }
.plan-roi { color: var(--gold2); text-shadow: 0 0 28px rgba(240,185,46,.28); }

/* Stake page */
.page-wrapper {
  padding-top: 68px;
  background:
    linear-gradient(180deg, rgba(3,6,13,.86), rgba(3,6,13,.97)),
    url("assets/logo.png") right -220px top 40px / 720px auto no-repeat;
}
.stake-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 22px;
  padding: 34px;
}
.wallet-detected-banner,
.balance-status-card,
.swap-card {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 16px;
}
.auth-logo-row img {
  width: 62px;
  height: 62px;
  box-shadow: 0 0 0 5px rgba(240,185,46,.08), 0 0 32px rgba(240,185,46,.25);
}
.auth-logo-row h2 {
  font-size: 1.72rem;
  letter-spacing: 0;
}
.step-indicator {
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 14px;
}
.plan-cards { gap: 12px; }
.plan-card-sel {
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.plan-card-sel.active {
  background: linear-gradient(145deg, rgba(240,185,46,.16), rgba(10,14,24,.88));
  border-color: rgba(240,185,46,.66);
  box-shadow: 0 18px 42px rgba(240,185,46,.13);
}
.field-input {
  background: rgba(2,4,10,.72);
  border-color: rgba(255,255,255,.09);
  border-radius: 14px;
}
.field-input:focus {
  border-color: rgba(240,185,46,.66);
  box-shadow: 0 0 0 4px rgba(240,185,46,.10);
}
#btn-stake {
  min-height: 58px;
  font-size: 1.02rem;
}

/* Dashboard */
@media (min-width: 901px) {
  .dashboard-container {
    min-height: calc(100vh - 72px);
    width: 100%;
    max-width: 100vw;
    align-items: flex-start;
    overflow-x: clip;
  }
  .dash-sidebar {
    position: sticky !important;
    top: 72px;
    flex: 0 0 270px;
    width: 270px;
    height: calc(100vh - 72px);
    transform: none !important;
    background: linear-gradient(180deg, rgba(5,8,16,.98), rgba(3,5,11,.98)) !important;
    border-right: 1px solid rgba(240,185,46,.16) !important;
    box-shadow: 18px 0 50px rgba(0,0,0,.28) !important;
  }
  .dash-main {
    flex: 1 1 auto;
    margin-left: 0;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 26px 26px 46px;
    overflow-x: clip;
  }
}
.sidebar-header-row {
  min-height: 78px;
  border-bottom: 1px solid rgba(240,185,46,.12);
}
.sidebar-dashboard-label {
  font-size: 1.05rem !important;
  color: var(--gold2) !important;
}
.sidebar-link {
  margin: 4px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
}
.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(240,185,46,.105);
  border-color: rgba(240,185,46,.18);
}
.market-strip,
.referral-quick-bar {
  border-radius: 16px;
}
.trust-badges-row,
.premium-kpi-grid,
.stats-grid,
.stats-grid-4 {
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.trust-badges-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.premium-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.stats-grid,
.stats-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}
.trust-badge,
.kpi-card,
.stat-card {
  border-radius: 18px;
  min-width: 0;
  max-width: 100%;
}
.trust-badge-text,
.kpi-card > *,
.stat-card > div:last-child {
  min-width: 0;
}
.trust-badge-title,
.trust-badge-sub,
.kpi-value,
.stat-value,
.referral-link-display,
.market-tick-item {
  overflow-wrap: anywhere;
}
.market-strip,
.referral-quick-bar {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.currency-toggle,
.referral-quick-actions {
  max-width: 100%;
}
.header-container {
  width: 100%;
}
.header-left,
.desktop-nav,
.header-right {
  min-width: 0;
}
.desktop-nav {
  flex-wrap: wrap;
  justify-content: center;
}
.kpi-value,
.stat-value,
.earn-live-val,
.roi-big-val {
  letter-spacing: 0;
}
.panel-title {
  color: #f8fafc;
  letter-spacing: 0;
}
.mobile-tab-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}

/* Leaderboard */
.lb-podium-card,
.leaderboard-table,
.data-table,
.pool-card {
  border-color: rgba(240,185,46,.16) !important;
}

@media (max-width: 900px) {
  .dashboard-container {
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    padding-top: 48px;
    overflow-x: clip;
  }
  .dash-sidebar {
    position: fixed !important;
    top: 112px;
    height: calc(100vh - 112px);
    max-width: min(82vw, 286px);
  }
  .dash-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0;
    overflow-x: clip;
  }
  .header-container { height: 64px; padding: 0 16px; }
  .mobile-util-bar { top: 64px !important; min-height: 48px; }
  .desktop-nav { display: none !important; }
  .hero-content { padding: 74px 18px 54px; }
  .hero-title { font-size: clamp(2.35rem, 12vw, 4.2rem); }
  .hero-subtitle { font-size: .96rem; }
  .hero-stats-row { display: grid; grid-template-columns: repeat(2,1fr); }
  .hero-stat { border-right: 0; border-bottom: 1px solid rgba(240,185,46,.10); }
  .page-wrapper { padding: 32px 14px 86px; background-size: 520px auto; }
  .stake-card { padding: 22px 16px; border-radius: 18px; }
  .plan-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dash-main { padding: 18px 12px 90px; }
  .trust-badges-row { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .premium-kpi-grid,
  .stats-grid,
  .stats-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .market-strip,
  .referral-quick-bar { border-radius: 14px; }
  .market-strip {
    display: flex;
    flex-wrap: wrap;
  }
  .market-ticker-viewport {
    flex: 1 1 100%;
    min-width: 0;
  }
  .currency-toggle {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .logo-text { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-stats-row { grid-template-columns: 1fr; }
  .plan-cards { grid-template-columns: 1fr; }
  .sponsor-referrer-grid { grid-template-columns: 1fr !important; }
  .bsc-rows { grid-template-columns: 1fr !important; }
  .trust-badges-row { grid-template-columns: 1fr !important; }
  .premium-kpi-grid,
  .stats-grid,
  .stats-grid-4 { grid-template-columns: 1fr !important; }
  .dash-main { padding-left: 10px !important; padding-right: 10px !important; }
  .stat-card,
  .kpi-card,
  .trust-badge { padding-left: 14px; padding-right: 14px; }
  .referral-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }
  .referral-quick-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* Shared wallet launcher and final responsive shell. */
.wallet-launch-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 5, 11, .88);
  backdrop-filter: blur(16px);
}
.wallet-launch-modal.show { display: flex; }
.wallet-launch-card {
  position: relative;
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid rgba(240,185,46,.24);
  border-radius: 18px;
  background: #080b12;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  text-align: center;
}
.wallet-launch-logo { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 12px; }
.wallet-launch-card h2 { font-size: 1.25rem; color: #fff; margin-bottom: 8px; }
.wallet-launch-card > p { color: #9ca3af; font-size: .86rem; line-height: 1.55; }
.wallet-launch-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
}
.wallet-launch-actions { display: grid; gap: 10px; margin: 20px 0 14px; }
.wallet-launch-option {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: #fff;
  text-align: left;
}
.wallet-launch-option:hover { border-color: rgba(240,185,46,.45); background: rgba(240,185,46,.07); }
.wallet-launch-option span { min-width: 0; display: flex; flex-direction: column; }
.wallet-launch-option small { margin-top: 2px; color: #7f8796; }
.wallet-launch-note { font-size: .72rem !important; color: #687080 !important; }

@media (max-width: 900px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden !important; }
  .main-header { height: 64px; }
  .header-container { height: 64px !important; min-height: 64px; padding: 0 14px !important; gap: 10px; }
  .header-left { flex: 1 1 auto; min-width: 0; }
  .logo-link { min-width: 0; }
  .logo-img { width: 36px !important; height: 36px !important; }
  .logo-text { overflow: hidden; text-overflow: ellipsis; }
  #header-right, .header-right { flex: 0 1 auto; min-width: 0; }
  #btn-connect-wallet {
    min-height: 40px;
    max-width: 166px;
    min-width: 0;
    padding: 8px 12px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #btn-connect-wallet span { overflow: hidden; text-overflow: ellipsis; }
  .mobile-nav-drawer {
    top: 64px !important;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 14px;
    background: #080b12;
    border-color: rgba(240,185,46,.16);
  }
  .mobile-menu-items .nav-item { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; }
  .mobile-actions [data-wallet-connect] { min-height: 48px; }
  .mobile-util-bar { top: 64px !important; }
  .dashboard-container { padding-top: 48px !important; }
  .dash-sidebar { top: 112px !important; height: calc(100dvh - 112px) !important; }
  .page-wrapper { width: 100%; max-width: 100%; }
  .table-wrapper, .leaderboard-table-wrap, .ref-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
  #toast-container { left: 12px !important; right: 12px !important; bottom: 84px !important; max-width: none !important; }
}

@media (max-width: 480px) {
  .logo-text { display: none !important; }
  #btn-connect-wallet { max-width: 154px; font-size: .76rem !important; }
  .wallet-launch-card { padding: 24px 16px 18px; }
  .premium-kpi-grid, .stats-grid, .stats-grid-4 { grid-template-columns: 1fr !important; }
}
