/* ------------------------------
  Theme variables (dark by default)
   - Put these at top so other rules can use them
--------------------------------*/
:root {
  --bg-color: #0f0f0f;
  --panel-color: #141414;
  --text-color: #ffffff;
  --small: #d8d5d5;
  --muted: #9b9898;
  --accent: #f4c84b;
  --accent-dark: #d6a93a;
  --green: #3bb24a;
  --card-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.08)
  );
  --glass: rgba(255, 255, 255, 0.02);
  --shadow-strong: rgba(0, 0, 0, 0.6);
}

/* Light theme overrides */
.light-theme {
  --bg-color: #fafafa;
  --panel-color: #ffffff;
  --text-color: #111111;
  --muted: #d8d5d5;
  --accent: #f5c745;
  --accent-dark: #e0b63d;
  --green: #3bb24a;
  --card-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(245, 245, 245, 1)
  );
  --glass: rgba(0, 0, 0, 0.02);
  --shadow-strong: rgba(0, 0, 0, 0.08);
}

/* ------------------------------
  Base & Layout
--------------------------------*/
html,
body {
  height: 100%;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background-color: var(--bg-color);
  color: var(--text-color);
  padding-bottom: 100px; /* space for bottom nav */
  transition: background 0.35s ease, color 0.35s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  /* subtle pattern overlay */
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.01) 1px,
    transparent 1px
  );
  background-size: 80px 80px;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  z-index: 0;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgb(19 7 7 / 65%), #0e05058a);
  /* background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent); */
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
}

.profile-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.16)
  );
  border: 3px solid rgba(244, 200, 75, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

/* Wallet badge */
.wallet-badge {
  background: linear-gradient(
    90deg,
    var(--panel-color),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 10px;
  padding: 6px 12px;
  box-shadow: 0 6px 14px var(--shadow-strong);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-weight: 600;
  color: var(--text-color);
}
.wallet-amount {
  font-size: 0.95rem;
}

/* App card */
.app-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 22px var(--shadow-strong);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

/* Accent pill / CTA */
.accent-pill {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #1b1200;
  border-radius: 20px;
  padding: 6px 12px;
  font-weight: 700;
  display: inline-block;
}

/* Game card */
.game-card {
  border-radius: 18px;
  overflow: hidden;
  min-height: 150px;
  display: flex;
  align-items: center;
  padding: 20px;
  color: #0b0b0b;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

/* specific game gradients */
.matka-card {
  background: linear-gradient(180deg, #ffd86b, #f2c34a);
}
.colour-card {
  background: linear-gradient(180deg, #6f6bf5, #2b2b96);
  color: #fff;
}

/* Balance card */
.balance-card {
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.01),
    rgba(0, 0, 0, 0.06)
  );
}

/* Buttons */
.action-cta {
  border-radius: 12px;
  padding: 10px 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #221100;
  border: none;
}
.action-cta.btn-dark {
  background: #222;
  color: #fff;
}

/* Text helpers */
.muted {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
}
.small-muted {
  color: var(--small);
  font-size: 0.85rem;
}

/* ------------------------------
  Bottom Nav (main focus)
--------------------------------*/
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.75));
  padding: 10px 12px;
  backdrop-filter: blur(8px);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  touch-action: manipulation;
}

/* bottom nav when light theme */
.light-theme .bottom-nav {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 245, 245, 0.95)
  );
  border-top-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.06);
}

/* nav buttons */
.nav-btn {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: transform 0.18s ease, color 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}
.nav-btn i {
  font-size: 1.35rem;
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.2, 1), color 0.22s ease,
    text-shadow 0.22s ease;
}

/* hover / active interactions */
.nav-btn:hover {
  transform: translateY(-4px);
  color: var(--accent);
}
.nav-btn:hover i {
  transform: scale(1.15);
}

.nav-btn.active {
  color: var(--accent);
  font-weight: 700;
}
.nav-btn.active i {
  transform: translateY(-2px) scale(1.08);
  text-shadow: 0 0 8px rgba(244, 200, 75, 0.7);
}

/* responsive spacing of icons */
.container .d-flex.justify-content-around {
  gap: 0.6rem;
}

/* ------------------------------
  Small UI tweaks & helpers
--------------------------------*/
.feature-card {
  background: linear-gradient(
    90deg,
    rgba(59, 59, 104, 0.12),
    rgba(31, 31, 31, 0.15)
  );
}
.feature-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #2b1a00;
  font-size: 1.1rem;
}
.feature-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.section-heading {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.game-title {
  font-weight: 800;
  font-size: 1.6rem;
}

.balance-value {
  font-size: 3.2rem;
  font-weight: 800;
  margin: 8px 0;
}

.safety-badge {
  background: var(--green);
  color: white;
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 700;
}

/* stat cards inside wallet */
.stat-card .stat-value {
  font-weight: 800;
  font-size: 1.6rem;
}

/* offcanvas avatar */
.drawer-avatar {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #2b1a00;
  font-size: 1.5rem;
}
.drawer-name {
  font-weight: 700;
  font-size: 1.2rem;
}

/* drawer signout */
.drawer-signout {
  background: transparent;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-color);
}

/* small screens adjustments */
@media (min-width: 992px) {
  .game-card {
    min-height: 220px;
  }
  .profile-circle {
    width: 64px;
    height: 64px;
  }
}

/* reduce bottom nav size on very small screens */
@media (max-width: 360px) {
  .nav-btn small {
    font-size: 11px;
  }
  .nav-btn i {
    font-size: 1.2rem;
  }
}
