/* ================= GLOBAL ================= */

/* ================= PREMIUM HEADER ================= */
.appHeader {
  position: fixed;
  top: 10px;

  left: 50%;
  transform: translateX(-50%);

  width: calc(100% - 20px);
  max-width: 380px;
  height: 55px;

  border-radius: 16px;

   background: radial-gradient(circle at top, var(--bg-start), var(--bg-mid), var(--bg-end));
  backdrop-filter: blur(14px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 12px;

  box-shadow: 0 8px 25px var(--bg-end);
  border: 1px solid var(--bg-start);

  z-index: 1000;
}

/* LEFT / RIGHT */
.header-left,
.header-right {
  width: 40px;
  display: flex;
  align-items: center;
}

/* CENTER */
.header-title {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  flex: 1;
}

/* BUTTON STYLE */
.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--bg-end);
  color: var(--text-color);

  text-decoration: none;
  transition: 0.3s;
}

/* ICON */
.header-btn i {
  font-size: 16px;
}

/* HOVER */
.header-btn:hover {
  background: var(--primary);
}

/* LOGOUT SPECIAL */
.logout-btn {
  background: linear-gradient(135deg, var(--bg-start), var(--btn-withdraw));
}

.logout-btn:hover {
  box-shadow: 0 0 10px var(--bg-mid);
}

/* ================= BOTTOM NAV ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;

  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: 380px;

  z-index: 1000;
}

/* ================= MODERN NAV ================= */
.appNavBar {
  position: fixed;
  bottom: 10px;

  left: 50%;
  transform: translateX(-50%);

  width: calc(100% - 20px);
  max-width: 380px;
  height: 65px;

  border-radius: 25px;

 background: linear-gradient(135deg, var(--bg-start), var(--bg-mid));
  backdrop-filter: blur(16px);

  display: flex;
  justify-content: space-around;
  align-items: center;

  box-shadow: 0 10px 30px var(--primary-dark);
  border: 1px solid var(--bg-mid);

  z-index: 9999;
}

/* ================= NAV ITEM ================= */
.navLink {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-color);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  font-size: 10px;
  transition: 0.3s;
}

/* ICON */
.navLink i {
  font-size: 18px;
  margin-bottom: 2px;
  transition: 0.3s;
}

/* TEXT */
.navLink p {
  margin: 0;
  font-size: 10px;
}

/* ================= ACTIVE ================= */
.navLink.active {
  color: var(--bg-mid);
  transform: scale(0.92);
}

.navLink.active i {
  transform: translateY(-4px) scale(1.1);
  
}

/* GLOW DOT */
.navLink.active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  width: 20px;
  height: 4px;
  border-radius: 5px;
 background: linear-gradient(135deg, var(--bg-end), var(--bg-mid));
}

/* ================= CENTER BUTTON ================= */
.navLink.center {
  position: relative;
  top: -18px;

  width: 55px;
  height: 55px;
  border-radius: 50%;

 background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 8px 20px var(--btn-withdraw);
}

.navLink.center i {
  font-size: 22px;
}

.navLink.center p {
  display: none;
}
.badge-dot {
  position: absolute;
  top: 5px;
  right: 20px;
  width: 8px;
  height: 8px;
  background: var(--bg-start);
  border-radius: 50%;
}

/* ================= APP WRAPPER ================= */
.dashboard {
  width: 100%;
  max-width: 380px;
  margin: auto;

  padding-top: 150px;   /* 🔥 increase space */
  padding-bottom: 100px;

  overflow-x: hidden;
}

.dashboard,
.plan-page {
  padding-top: 80px;
}
body {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
button:active,
a:active {
  transform: scale(0.96);
}
/* ================= HEADER (FIXED) ================= */
.header {
  position: fixed;
  top: 0;

  left: 50%;
  transform: translateX(-50%);  /* ✅ center */
  width: 100%;
  max-width: 380px;            /* ✅ match app width */
  z-index: 1000;
  padding: 12px 12px;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  border-radius:15px;
}

/* ================= TOPBAR ================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

/* ================= BALANCE ================= */
.balance-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  text-align: center;

  background: var(--bg-start);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-end);
}

.balance-card span {
  font-size: 12px;
  opacity: 0.8;
}

.balance-card h1 {
  font-size: 18px;
  color: var(--primary-dark)
}

/* ================= ACTION BUTTONS ================= */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
}

.action-btn {
  padding: 10px 4px;
  border-radius: 12px;
  text-align: center;
  font-size: 10px;
  color: var(--text-color);
  transition: .3s;
}

.action-btn i {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

@keyframes spin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* COLORS */
.deposit-btn { background: linear-gradient(135deg, var(--bg-start), var(--btn-deposit)); }
.withdraw-btn { background: linear-gradient(135deg, var(--bg-start), var(--btn-withdraw)); }
.history-btn { background: linear-gradient(135deg, var(--bg-start), var(--btn-history)); }
.team-btn { background: linear-gradient(135deg, var(--bg-start), var(--btn-team)); }

/* ================= PROFIT CARD ================= */
.profit-card {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: calc(100% - 24px);
  margin: 10px auto;
  padding: 14px;
  border-radius: 18px;

 background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));
  color: var(--text-color);
  text-decoration: none;
}

.profit-card-yellow {
  background: linear-gradient(135deg, var(--bg-start), var(--primary-light));
  color: var(--primary-dark);
}

/* ================= PROFIT ICON ================= */
.profit-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--bg-start);
}

.profit-text {
  flex: 1;
  margin-left: 10px;
}

.profit-text span {
  font-size: 11px;
}

.profit-text strong {
  font-size: 13px;
}

.profit-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--bg-start);
}

/* ================= EARNING ================= */
.earn-card {
  width: calc(100% - 24px);
  margin: 12px auto;
  padding: 16px;
  border-radius: 18px;

  background: linear-gradient(135deg, var(--primary), var(--bg-end));
}

.earn-amount {
  font-size: 20px;
  font-weight: bold;
}

/* ================= GRID ================= */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
}

.grid-item {
  text-align: center;
  font-size: 10px;
}

.icon-box {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: center;

background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--primary);
}

/* ================= CARD ================= */
.card {
  width: calc(100% - 24px);
  margin: 12px auto;
  padding: 16px;
  border-radius: 18px;

 background: linear-gradient(135deg, var(--bg-mid), var(--primary-light));
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-end);
}

/* ================= REFERRAL ================= */
.ref-modern {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 🔥 MOST IMPORTANT */
.ref-modern::before,
.ref-modern::after {
  pointer-events: none; /* allow clicks through */
}

/* TEXT */
.ref-text {
  flex: 1;
  font-size: 12px;
  overflow: hidden;
  word-break: break-all;
}

/* BUTTON FIX */
.copy-btn-modern {
  background: linear-gradient(135deg, var(--bg-mid), var(--primary-dark));
  border: none;
  color: var(--text-color);
  padding: 6px 8px;
  border-radius: 8px;

  position: relative;
  z-index: 5;   /* 🔥 bring above everything */
  cursor: pointer;
}

/* ================= SUMMARY ================= */
/* ================= SUMMARY ================= */
.summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

/* CARD */
.summary-card {
  padding: 12px;
  border-radius: 14px;
transition: 0.3s;
  color: var(--text-color);
  text-decoration: none;

  display: flex;
  flex-direction: column;
  justify-content: center;
box-shadow: 0 8px 20px var(--primary-dark);
  height: 80px;   /* 🔥 fixed clean height */
}
.summary-card:hover {
  transform: translateY(-3px);
}
/* TITLE */
.summary-card h3 {
  font-size: 11px;   /* 🔥 smaller */
  font-weight: 500;
  opacity: 0.85;
  margin: 0;
}

/* VALUE */
.summary-card h2 {
  font-size: 16px;   /* 🔥 reduced */
  font-weight: 700;
  margin-top: 4px;
}

/* COLORS */
.team-card {
  background: linear-gradient(135deg, var(--btn-deposit), var(--btn-deposit));
}

.deposit-card {
   background: linear-gradient(135deg, var(--btn-team), var(--btn-team));
}

.withdraw-card {
 background: linear-gradient(135deg, var(--btn-withdraw), var(--btn-withdraw));
}

.bonus-card {
   background: linear-gradient(135deg, var(--glow), var(--glow));
  color: var(--primary-dark);
}

/* ================= STATUS ICON ================= */
.status-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 15px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;
  color: var(--text-color);
}

/* COLORS */
.status-icon.success {
  background: linear-gradient(135deg, var(--btn-deposit), var(--btn-deposit));
}

.status-icon.error {
  background: linear-gradient(135deg, var(--btn-withdraw), var(--btn-withdraw));
}

.status-icon.warning {
 background: linear-gradient(135deg, var(--bg-warning), var(--bg-warning));
  color:var(--primary-dark);
}

/* ================= WITHDRAW ================= */
.withdraw-title {
  font-size: 16px;
  font-weight: 600;
}

.withdraw-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 4px;
}

/* GRID */
.method-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CARD ITEM */
.method-card {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 12px;
  border-radius: 16px;

   background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 1px solid var(--bg-end);

  text-decoration: none;
  color: var(--primary-dark);

  transition: 0.3s;
}

/* HOVER */
.method-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 10px var(--bg-end);
}

/* LEFT */
.method-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ICON */
.method-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--bg-end);
}

.method-icon img {
  width: 24px;
}

/* TEXT */
.method-name {
  font-size: 13px;
}

/* ARROW */
.method-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

 background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* LOADING */
.method-card.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* ================= BUTTON LOADER ================= */
.method-arrow {
  position: relative;
}

/* hide arrow */
.method-arrow.btn-loading .arrow-icon {
  visibility: hidden;
}

/* spinner */
.method-arrow.btn-loading::after {
  content: "";
  width: 14px;
  height: 14px;

  border: 2px solid var(--primary);
  border-top: 2px solid transparent;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  animation: spin 0.6s linear infinite;
}

/* spin animation */
@keyframes spin {
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* disable card */
.method-card.loading {
  opacity: 0.6;
  pointer-events: none;
}
/* GRID */
.game-grid {
  display: flex;
  gap: 10px;
}

/* BUTTON */
.game-btn {
  flex: 1;
  padding: 10px 4px;
  border-radius: 12px;

  text-align: center;
  font-size: 10px;
  color: var(--text-color);

  background-color: var(--bg-mid);
  backdrop-filter: blur(10px);

  transition: .3s;
  position: relative;
}

/* ICON */
.game-btn i {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

/* HOVER */
.game-btn:hover {
  transform: translateY(-3px);
}

/* LOADING */
.game-btn.loading i,
.game-btn.loading span {
  opacity: 0;
}

/* SPINNER */
.game-btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;

  border: 2px solid var(--text-color);
  border-top: transparent;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}


.live-bet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 12px;
    border-radius: 14px;

    background: linear-gradient(135deg, var(--bg-start), var(--bg-start));
    color: var(--text-color);

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    position: relative;

    box-shadow: 0 0 15px var(--primary);

    animation: pulseGlow 1.5s infinite;
}

/* ICON */
.live-bet-btn i {
    font-size: 14px;
}

/* LIVE DOT */
.live-dot {
    width: 8px;
    height: 8px;
    background: var(--btn-team);
    border-radius: 50%;

    animation: blink 1s infinite;
}

/* GLOW ANIMATION */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px var(--bg-start); }
    50% { box-shadow: 0 0 25px var(--bg-mid); }
    100% { box-shadow: 0 0 10px var(--bg-end); }
}

/* BLINK DOT */
@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* GRID */
.history-grid {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* BUTTON */
.history-btn {
  flex: 1;
  padding: 10px 4px;

  border-radius: 12px;
  text-align: center;

  font-size: 10px;
  color: var(--text-color);

  backdrop-filter: blur(10px);

  transition: .3s;
  position: relative;
}

/* ICON */
.history-btn i {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

/* HOVER */
.history-btn:hover {
  transform: translateY(-3px);
}

/* LOADING */
.history-btn.loading i,
.history-btn.loading span {
  opacity: 0;
}

/* SPINNER */
.history-btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;

  border: 2px solid var(--text-color);
  border-top: transparent;
  border-radius: 50%;

  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}