:root {
  --bg: #050914;
  --panel: rgba(12, 20, 33, .92);
  --panel-2: rgba(17, 29, 47, .96);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef6ff;
  --muted: #9fb0c4;
  --blue: #38a8ff;
  --green: #23c483;
  --gold: #f1c75b;
  --red: #ff6b6b;
}

body {
  background:
    linear-gradient(180deg, rgba(23, 39, 69, .58), transparent 360px),
    radial-gradient(circle at 82% 0%, rgba(56, 168, 255, .16), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--blue); }
.pts-nav { background: rgba(7, 17, 31, 0.95); border-bottom: 1px solid var(--line); }
.hero {
  min-height: 78vh;
  display: grid;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(7,17,31,.96), rgba(7,17,31,.76)),
    url('https://images.unsplash.com/photo-1642790106117-e829e14a795f?auto=format&fit=crop&w=1600&q=80') center/cover;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 5rem); font-weight: 800; letter-spacing: 0; }
.text-muted { color: var(--muted) !important; }
.feature-card, .stat-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .22);
}
.feature-card strong, .stat-card strong { color: var(--gold); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.plan-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 1rem; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 268px;
  background: rgba(5, 10, 20, .98);
  border-right: 1px solid var(--line);
  padding: 1rem;
  overflow-y: auto;
  z-index: 30;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 1.25rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #fff0ad);
  color: #10131c;
  box-shadow: 0 0 24px rgba(241, 199, 91, .26);
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  text-decoration: none;
  padding: .78rem .85rem;
  border-radius: 8px;
  margin-bottom: .25rem;
}
.sidebar a i { font-size: 1.05rem; }
.sidebar a.active, .sidebar a:hover {
  background: linear-gradient(90deg, rgba(56, 168, 255, .22), rgba(35, 196, 131, .08));
  color: var(--text);
}
.sidebar-market {
  margin-top: 1.25rem;
  padding: .85rem;
  border: 1px solid rgba(35, 196, 131, .28);
  border-radius: 8px;
  background: rgba(35, 196, 131, .08);
}
.sidebar-market span, .sidebar-market small { display: block; color: var(--muted); }
.sidebar-market strong { color: var(--green); letter-spacing: .08em; }
.app-main { margin-left: 268px; min-height: 100vh; padding-bottom: 1rem; }
.terminal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 58px;
  padding: .75rem 1.25rem;
  background: rgba(5, 9, 20, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.market-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .5rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}
.ticker-strip {
  display: flex;
  gap: .5rem;
  overflow: hidden;
}
.ticker-strip span {
  color: var(--green);
  border: 1px solid rgba(35, 196, 131, .24);
  background: rgba(35, 196, 131, .08);
  border-radius: 999px;
  padding: .28rem .65rem;
  font-size: .78rem;
}
.stat-card .value { font-size: 1.35rem; font-weight: 800; }
.trading-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(56, 168, 255, .18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(56, 168, 255, .16), rgba(35, 196, 131, .08)),
    rgba(12, 20, 33, .94);
}
.wallet-chip {
  min-width: 220px;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(241, 199, 91, .28);
  background: rgba(241, 199, 91, .1);
}
.wallet-chip span { display: block; color: var(--muted); font-size: .85rem; }
.wallet-chip strong { display: block; color: var(--gold); font-size: 1.5rem; }
.trading-card {
  position: relative;
  overflow: hidden;
}
.trading-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}
.market-symbol {
  color: var(--green);
  background: rgba(35, 196, 131, .12);
  border: 1px solid rgba(35, 196, 131, .22);
  border-radius: 6px;
  padding: .2rem .45rem;
  font-size: .72rem;
  font-weight: 800;
}
.mini-chart {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 34px;
  margin-top: .8rem;
}
.mini-chart span {
  display: block;
  width: 18%;
  border-radius: 3px 3px 0 0;
  background: var(--green);
  opacity: .82;
}
.mini-chart span:nth-child(1) { height: 35%; }
.mini-chart span:nth-child(2) { height: 52%; }
.mini-chart span:nth-child(3) { height: 46%; }
.mini-chart span:nth-child(4) { height: 72%; }
.mini-chart span:nth-child(5) { height: 88%; }
.mini-chart.down span { background: var(--red); }
.mini-chart.flat span { background: var(--blue); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); }
.form-control, .form-select {
  background: #081726;
  color: var(--text);
  border-color: var(--line);
}
.form-control:focus, .form-select:focus { background: #081726; color: var(--text); border-color: var(--blue); box-shadow: none; }
.badge-soft { background: rgba(35,196,131,.16); color: var(--green); }
.progress { background: #06111f; }
.btn-warning { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 700; }
.btn-success { background: var(--green); border-color: var(--green); }
.auth-wrap { max-width: 520px; margin: 3rem auto; }
.mobile-app-nav { display: none; }
.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
}
.crypto-pay-box {
  border-color: rgba(241, 199, 91, .24);
}
.payment-detail-block {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: rgba(5, 10, 20, .38);
  padding: .85rem;
}
.payment-text {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
}
.plan-slider-wrap {
  border: 1px solid rgba(56, 168, 255, .14);
  border-radius: 8px;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(56, 168, 255, .09), rgba(241, 199, 91, .06)),
    rgba(12, 20, 33, .78);
}
.plan-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: .75rem;
  overflow-x: auto;
  padding-bottom: .25rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.plan-slide {
  scroll-snap-align: start;
  min-height: 132px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(35, 196, 131, .13), rgba(56, 168, 255, .08)),
    rgba(5, 10, 20, .78);
}
.plan-slide .plan-tag {
  color: var(--gold);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.plan-slide strong {
  display: block;
  margin-top: .35rem;
  font-size: 1.15rem;
}
.plan-slide span {
  display: block;
  color: var(--green);
  margin-top: .25rem;
  font-weight: 700;
}
.slide-meter {
  height: 6px;
  margin-top: .9rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.1);
}
.slide-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
}
.kyc-approved {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(35, 196, 131, .24);
  border-radius: 8px;
  background: rgba(35, 196, 131, .1);
}
.kyc-approved i {
  color: var(--green);
  font-size: 2rem;
}
.rank-reward-panel {
  overflow: hidden;
}
.rank-reward-grid {
  display: grid;
  gap: .75rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: .15rem;
}
.rank-reward-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: .8rem;
  align-items: center;
  min-height: 108px;
  padding: .85rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(241, 199, 91, .1), rgba(56, 168, 255, .08)),
    rgba(5, 10, 20, .72);
  overflow: hidden;
}
.rank-reward-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}
.rank-reward-card::after {
  content: "";
  position: absolute;
  inset: -40% auto auto 45%;
  width: 120px;
  height: 120px;
  background: rgba(241, 199, 91, .12);
  transform: rotate(35deg);
  animation: rewardShine 3.4s linear infinite;
}
.rank-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--rank-progress), rgba(255,255,255,.08) 0);
}
.rank-orbit::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #081420;
}
.rank-orbit span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--gold);
  background: rgba(241, 199, 91, .1);
  animation: rewardPulse 1.9s ease-in-out infinite;
}
.rank-card-body {
  position: relative;
  z-index: 1;
}
.reward-pill {
  flex: 0 0 auto;
  color: #10131c;
  background: linear-gradient(135deg, var(--gold), #fff0ad);
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .78rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(241, 199, 91, .18);
}
.rank-requirement {
  color: var(--muted);
  font-size: .82rem;
  margin-top: .15rem;
}
.rank-progress-track {
  height: 7px;
  margin: .65rem 0 .45rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.09);
}
.rank-progress-track i {
  display: block;
  height: 100%;
  width: var(--rank-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green), var(--gold));
  animation: progressGlow 2.2s ease-in-out infinite;
}
.rank-split {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  color: var(--muted);
  font-size: .76rem;
}
.rank-reward-card.unlocked {
  border-color: rgba(35, 196, 131, .38);
  box-shadow: 0 0 24px rgba(35, 196, 131, .12);
}

@keyframes rewardPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(241, 199, 91, 0); }
  50% { transform: scale(1.08); box-shadow: 0 0 22px rgba(241, 199, 91, .32); }
}

@keyframes rewardShine {
  from { transform: translateX(-180px) rotate(35deg); opacity: 0; }
  35% { opacity: 1; }
  to { transform: translateX(260px) rotate(35deg); opacity: 0; }
}

@keyframes progressGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.32); }
}

@media (max-width: 860px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: .75rem 1rem;
  }
  .sidebar .brand { margin-bottom: 0; }
  .sidebar .brand span:last-child { font-size: .9rem; }
  .side-nav, .sidebar-market { display: none; }
  .app-main { margin-left: 0; padding-bottom: 84px; }
  .terminal-topbar { position: static; padding: .7rem 1rem; }
  .ticker-strip { display: none; }
  .trading-hero { align-items: stretch; flex-direction: column; }
  .wallet-chip { min-width: 0; }
  .copy-field { grid-template-columns: 1fr; }
  .plan-slider {
    grid-auto-columns: 78%;
  }
  .rank-reward-card {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 104px;
  }
  .rank-orbit {
    width: 46px;
    height: 46px;
  }
  .mobile-app-nav {
    position: fixed;
    inset: auto .75rem .75rem;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .25rem;
    padding: .45rem;
    background: rgba(5, 10, 20, .96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0,0,0,.38);
  }
  .mobile-app-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: 52px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: .68rem;
  }
  .mobile-app-nav a i { font-size: 1.05rem; }
  .mobile-app-nav a.active {
    color: var(--text);
    background: rgba(56, 168, 255, .18);
  }
  .hero { min-height: auto; padding: 5rem 0; }
}
