/* ============================================================
   Grasberg — Main Theme
   Gold & Dark Luxury Theme
   ============================================================ */

:root {
  --gold:      #f0a500;
  --gold-light:#ffd96e;
  --gold-dark: #c07a00;
  --bg-dark:   #0d0d1a;
  --bg-card:   #161630;
  --bg-card2:  #1e1e3a;
  --sidebar-bg:#10102a;
  --text-main: #e8e8ff;
  --text-muted:#8888aa;
  --border:    #2a2a4a;
  --success:   #00d97e;
  --danger:    #e63757;
  --warning:   #f6c343;
  --info:      #39afd1;
  --purple:    #6c4cdb;
  --gradient:  linear-gradient(135deg, #1a1a3e 0%, #0d0d1a 100%);
  --gold-grad: linear-gradient(135deg, #f0a500 0%, #c07a00 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  height: 100vh;          /* fixed height — scroll ke liye zaroori */
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0; top: 0;
  display: flex; flex-direction: column;
  overflow: hidden;       /* brand fixed, nav scrolls */
  z-index: 1000;
  transition: transform .3s ease;
}
.sidebar-brand {
  flex-shrink: 0;         /* brand kabhi compress na ho */
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand .logo-text {
  font-size: 1.1rem; font-weight: 700;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.sidebar-brand .logo-text small { font-size: .7rem; font-weight: 400; color: var(--text-muted); display: block; -webkit-text-fill-color: var(--text-muted); }
.sidebar-logo { width: 40px; height: 40px; }

.sidebar-nav {
  flex: 1;
  min-height: 0;          /* flex child ko shrink hone do — scroll ke liye critical */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 4px; }
.nav-section-title {
  font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); padding: 16px 20px 6px;
}
.nav-item { list-style: none; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px;
  color: var(--text-muted);
  font-size: .9rem; font-weight: 500;
  transition: all .2s; border-radius: 0;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: rgba(240,165,0,.08);
}
.nav-link.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: #000; font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

/* Main content */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* Currency toggle */
.currency-toggle {
  display: flex; align-items: center;
  background: var(--bg-dark);
  border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.currency-toggle button {
  border: none; background: none;
  padding: 7px 16px;
  font-size: .85rem; font-weight: 600;
  cursor: pointer; color: var(--text-muted);
  transition: all .2s;
}
.currency-toggle button.active {
  background: var(--gold-grad);
  color: #000;
}

/* User menu */
.user-menu {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; color: #000;
}
.user-info .name { font-size: .85rem; font-weight: 600; color: var(--text-main); }
.user-info .uid  { font-size: .72rem; color: var(--text-muted); }

/* Page area */
.page-content { padding: 28px 24px; flex: 1; }
.page-header { margin-bottom: 24px; }
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--text-main); }
.page-subtitle { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 600; color: var(--text-main); }

/* Stat cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: transform .2s, border-color .2s;
  margin-bottom: 0;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon.gold   { background: rgba(240,165,0,.15); color: var(--gold); }
.stat-icon.green  { background: rgba(0,217,126,.15); color: var(--success); }
.stat-icon.blue   { background: rgba(57,175,209,.15); color: var(--info); }
.stat-icon.purple { background: rgba(108,76,219,.15); color: var(--purple); }
.stat-icon.red    { background: rgba(230,55,87,.15);  color: var(--danger); }
.stat-card > div:not(.stat-icon) { min-width: 0; overflow: hidden; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Wallet balance card */
.wallet-card {
  background: linear-gradient(135deg, #1a1440 0%, #0d0d1a 100%);
  border: 1px solid var(--gold-dark);
  border-radius: 18px;
  padding: 28px 24px;
  position: relative; overflow: hidden;
  margin-bottom: 24px;
}
.wallet-card::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.12) 0%, transparent 70%);
}
.wallet-label { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.wallet-amount { font-size: 2rem; font-weight: 800; color: var(--gold); margin: 6px 0; }
.wallet-sub { font-size: .85rem; color: var(--text-muted); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
table thead tr { background: var(--bg-card2); }
table thead th { padding: 12px 16px; font-size: .75rem; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
table tbody tr { border-top: 1px solid var(--border); transition: background .15s; }
table tbody tr:hover { background: rgba(240,165,0,.03); }
table tbody td { padding: 12px 16px; color: var(--text-main); vertical-align: middle; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600; text-transform: capitalize;
}
.badge-success  { background: rgba(0,217,126,.15); color: var(--success); }
.badge-danger   { background: rgba(230,55,87,.15); color: var(--danger); }
.badge-warning  { background: rgba(246,195,67,.15); color: var(--warning); }
.badge-info     { background: rgba(57,175,209,.15); color: var(--info); }
.badge-gold     { background: rgba(240,165,0,.15);  color: var(--gold); }
.badge-purple   { background: rgba(108,76,219,.15); color: var(--purple); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 14px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main); font-size: .9rem;
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); background: var(--bg-card2); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.form-text { font-size: .78rem; color: var(--text-muted); margin-top: 5px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 8px; border: none;
  font-size: .875rem; font-weight: 600; cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.btn-gold {
  background: var(--gold-grad); color: #000;
}
.btn-gold:hover { background: linear-gradient(135deg, #ffd96e 0%, #f0a500 100%); color: #000; transform: translateY(-1px); }
.btn-outline-gold { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: #000; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #000; }
.btn-secondary { background: var(--bg-card2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: 10px; font-size: .875rem;
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px;
}
.alert-success { background: rgba(0,217,126,.12); border: 1px solid rgba(0,217,126,.3); color: #00d97e; }
.alert-danger   { background: rgba(230,55,87,.12); border: 1px solid rgba(230,55,87,.3); color: #e63757; }
.alert-warning  { background: rgba(246,195,67,.12); border: 1px solid rgba(246,195,67,.3); color: #f6c343; }
.alert-info     { background: rgba(57,175,209,.12); border: 1px solid rgba(57,175,209,.3); color: #39afd1; }

/* ============================================================
   PROGRESS & LEVELS
   ============================================================ */
.progress { background: var(--bg-dark); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--gold-grad); transition: width .4s ease; }

.level-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--border); margin-bottom: 8px;
  background: var(--bg-card);
}
.level-row.achieved { border-color: var(--gold); background: rgba(240,165,0,.05); }
.level-num { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-card2); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.level-num.done { background: var(--gold-grad); color: #000; }

/* ============================================================
   TRADE BUTTON
   ============================================================ */
.trade-btn-wrap { text-align: center; padding: 40px 20px; }
.trade-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  width: 200px; height: 200px; border-radius: 50%;
  border: 4px solid var(--gold);
  background: radial-gradient(circle, rgba(240,165,0,.15) 0%, rgba(240,165,0,.05) 100%);
  font-size: 1rem; font-weight: 700; color: var(--gold);
  cursor: pointer; flex-direction: column;
  transition: all .3s; box-shadow: 0 0 40px rgba(240,165,0,.2);
  text-decoration: none;
}
.trade-btn:hover, .trade-btn.pulse {
  box-shadow: 0 0 60px rgba(240,165,0,.5);
  transform: scale(1.03); color: var(--gold);
}
.trade-btn.disabled {
  opacity: .4; cursor: not-allowed; border-color: var(--text-muted); color: var(--text-muted);
  box-shadow: none;
}
.trade-btn i { font-size: 2.5rem; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.page-btn {
  padding: 7px 12px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .85rem; cursor: pointer;
  text-decoration: none; transition: all .2s;
}
.page-btn:hover, .page-btn.active { background: var(--gold); color: #000; border-color: var(--gold); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-wrapper {
  min-height: 100vh;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
}
.auth-wrapper::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,165,0,.08) 0%, transparent 70%);
}
.auth-wrapper::after {
  content: '';
  position: absolute; bottom: -100px; right: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,76,219,.08) 0%, transparent 70%);
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 460px;
  position: relative; z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .brand-name {
  font-size: 1.5rem; font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { font-size: .875rem; color: var(--text-muted); margin-bottom: 28px; }

/* ============================================================
   PACKAGE CARDS
   ============================================================ */
.pkg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 24px;
  text-align: center; transition: all .25s;
  cursor: pointer; position: relative;
}
.pkg-card:hover, .pkg-card.selected {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(240,165,0,.15);
}
.pkg-card .pkg-name { font-size: .75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 12px; }
.pkg-card .pkg-price { font-size: 2rem; font-weight: 800; color: var(--text-main); }
.pkg-card .pkg-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.pkg-card .pkg-daily { font-size: .875rem; color: var(--success); font-weight: 600; margin: 8px 0; }
.pkg-card .pkg-duration { font-size: .8rem; color: var(--text-muted); }
.pkg-popular {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold-grad); color: #000; font-size: .7rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
.hamburger { display: none; background: none; border: none; color: var(--text-main); font-size: 1.3rem; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 999; }

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }
  .page-content { padding: 20px 16px; }
}
@media (max-width: 576px) {
  .auth-box { padding: 28px 20px; }
  .stat-value { font-size: 1rem; }
  .wallet-amount { font-size: 1.5rem; }
  .stat-card { padding: 12px 10px; gap: 8px; }
  .stat-icon { width: 38px; height: 38px; font-size: 1rem; }
  .stat-label { font-size: .72rem; }
}

/* Grid utilities */
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.col   { flex: 1;         padding: 0 12px; }
.col-2 { width: 16.666%;  padding: 0 12px; }
.col-3 { width: 25%;      padding: 0 12px; }
.col-4 { width: 33.333%;  padding: 0 12px; }
.col-5 { width: 41.666%;  padding: 0 12px; }
.col-6 { width: 50%;      padding: 0 12px; }
.col-7 { width: 58.333%;  padding: 0 12px; }
.col-8 { width: 66.666%;  padding: 0 12px; }
.col-12{ width: 100%;     padding: 0 12px; }
@media (max-width: 768px) {
  .col-2, .col-3, .col-4 { width: 50%; }
  .col-5, .col-6, .col-7, .col-8 { width: 100%; }
}
@media (max-width: 480px) {
  .col-2, .col-3 { width: 50%; }
  .col-4, .col-5, .col-6, .col-7, .col-8 { width: 100%; }
}
.table-wrap { -webkit-overflow-scrolling: touch; }

/* Utility */
.text-gold   { color: var(--gold) !important; }
.text-success{ color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning{ color: var(--warning) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-bold     { font-weight: 700; }
.mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 32px; }
.mb-1 { margin-bottom: 12px; } .mb-2 { margin-bottom: 24px; } .mb-3 { margin-bottom: 32px; }
.p-0 { padding: 0; }
.d-flex { display: flex; } .align-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.w-100 { width: 100%; }
.hidden { display: none; }
.shimmer { animation: shimmer 2s infinite linear; background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%); background-size: 200% 100%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.pulse-gold { animation: pulseGold 2s infinite; }
@keyframes pulseGold { 0%,100% { box-shadow: 0 0 0 0 rgba(240,165,0,.4); } 50% { box-shadow: 0 0 0 12px rgba(240,165,0,0); } }

/* ============================================================
   NOTIFICATION MARQUEE
   ============================================================ */
.sgm-marquee-wrap {
  background: linear-gradient(90deg, rgba(240,165,0,.08) 0%, rgba(240,165,0,.04) 50%, rgba(240,165,0,.08) 100%);
  border-top: 1px solid rgba(240,165,0,.2);
  border-bottom: 1px solid rgba(240,165,0,.2);
  overflow: hidden;
  padding: 8px 0;
  margin-bottom: 0;
  position: relative;
}
.sgm-marquee-wrap::before,
.sgm-marquee-wrap::after {
  content: '';
  position: absolute; top: 0; width: 60px; height: 100%; z-index: 2;
  pointer-events: none;
}
.sgm-marquee-wrap::before { left: 0;  background: linear-gradient(to right,  var(--bg-dark), transparent); }
.sgm-marquee-wrap::after  { right: 0; background: linear-gradient(to left,   var(--bg-dark), transparent); }
.sgm-marquee-inner { display: flex; width: max-content; }
.sgm-marquee-text {
  white-space: nowrap;
  font-size: .8rem;
  color: var(--text-muted);
  padding: 0 20px;
  animation: sgmMarquee 40s linear infinite;
}
.sgm-marquee-text:hover { animation-play-state: paused; }
@keyframes sgmMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   BLINK BADGE (LIVE NOW)
   ============================================================ */
.blink-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: .05em;
  animation: blinkPulse 1.2s ease-in-out infinite;
  vertical-align: middle;
  margin-left: 6px;
}
@keyframes blinkPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230,55,87,.5); }
  50%      { opacity: .7; box-shadow: 0 0 0 6px rgba(230,55,87,0); }
}

/* ============================================================
   COIN PARTICLE ANIMATION
   ============================================================ */
.sgm-coin {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe066, #f0a500 60%, #a06800);
  box-shadow: 0 2px 6px rgba(240,165,0,.6), inset 0 -2px 4px rgba(0,0,0,.3);
  font-size: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,.5);
  font-weight: 800;
}
.sgm-coin::after {
  content: '₿';
  font-size: .55rem;
  color: rgba(100,60,0,.6);
}
