:root {
  --gold: #c9952d;
  --gold-light: #e2be6a;
  --gold-dark: #a67b1e;
  --gold-shimmer: #f0d680;
  --white: #181512;
  --off-white: #14110e;
  --bg: #000000;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --input-bg: #0f172a;
  --shadow-gold: 0 4px 24px rgba(201, 149, 45, 0.2);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.5);
  --table-min-height: 120px;
  --radius: 14px;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --header-bg-start: #000000;
  --header-bg-mid: #050505;
  --transition: 0.3s ease;
}

.light-theme {
  --white: #ffffff;
  --off-white: #faf8f4;
  --bg: #fdfcf9;
  --text: #2d2518;
  --text-muted: #8c7e6a;
  --border: #e8dcc8;
  --input-bg: #fefefe;
  --shadow-gold: 0 4px 24px rgba(201, 149, 45, 0.25);
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
  --header-bg-start: #fdf6e8;
  --header-bg-mid: #fdfaf3;
}


select, option {
  background-color: var(--white);
  color: var(--text);
}

body {
  transition: background-color var(--transition), color var(--transition);
}

.app-header,
.tab-header,
.page,
.tab-content,
.balance-card,
.plan-card,
.btn-primary,
.lang-btn,
.theme-toggle-btn,
.notification-btn,
.amount-input-wrap,
.plain-input {
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  contain: layout;
}

.theme-toggle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
}

.theme-toggle-btn,
.notification-btn,
.lang-btn {
  background: var(--white) !important;
  border-color: var(--border) !important;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.overlay-open {
  overflow: hidden !important;
}

body.overlay-open .bottom-nav {
  display: none !important;
}

/* ---- Pages ---- */
.page {
  display: none;
  min-height: 100dvh;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  background: linear-gradient(170deg, var(--off-white) 0%, var(--white) 40%, var(--off-white) 100%);
}

.page.active {
  display: flex;
}

/* Override for App Layout to be full screen */
.page.app-layout {
  padding: 0;
  align-items: stretch;
  justify-content: flex-start;
}

/* ---- Auth Container ---- */
.auth-container {
  width: 100%;
  max-width: 400px;
  animation: fadeSlideUp 0.6s ease-out;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Brand ---- */
.brand-section {
  text-align: center;
  margin-bottom: 36px;
}

.brand-section.small {
  margin-bottom: 24px;
}

.brand-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-gold);
  animation: shimmer-glow 3s ease infinite;
}

.brand-logo.small {
  width: 60px;
  height: 60px;
  margin-bottom: 12px;
}

@keyframes shimmer-glow {

  0%,
  100% {
    box-shadow: 0 4px 24px rgba(201, 149, 45, 0.25);
  }

  50% {
    box-shadow: 0 4px 32px rgba(201, 149, 45, 0.45);
  }
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.brand-name.small {
  font-size: 28px;
}

.brand-name span {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-shimmer));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* ---- Form ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.input-group input,
.input-group select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  transition: all 0.25s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.input-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238c7e6a' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 45, 0.12);
}

.input-group input::placeholder {
  color: #c4b9a8;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 4px;
}

.toggle-password:hover {
  opacity: 0.8;
}

.forgot-link {
  text-align: right;
  font-size: 13px;
  color: var(--gold-dark);
  text-decoration: none;
  font-weight: 500;
  margin-top: -8px;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--gold);
}

/* ---- Buttons ---- */
.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  background-size: 200% auto;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 6px 30px rgba(201, 149, 45, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 16px rgba(201, 149, 45, 0.25);
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-google {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
}

.btn-google:hover {
  background: var(--off-white);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-soft);
}

.switch-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 28px;
}

.switch-text a {
  color: var(--gold-dark);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.switch-text a:hover {
  color: var(--gold);
}

/* ---- Signup Nudge ---- */
.signup-nudge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 11px 20px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(201, 149, 45, 0.12), rgba(240, 214, 128, 0.18));
  border: 1.5px solid rgba(201, 149, 45, 0.35);
  animation: nudgePulse 2.8s ease-in-out infinite, fadeSlideDown 0.7s ease-out;
  position: relative;
  overflow: hidden;
}

.signup-nudge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(240, 214, 128, 0.35), transparent);
  animation: shimmerSlide 2.8s ease-in-out infinite;
}

@keyframes shimmerSlide {
  0% {
    left: -60%;
  }

  60% {
    left: 120%;
  }

  100% {
    left: 120%;
  }
}

@keyframes nudgePulse {

  0%,
  100% {
    border-color: rgba(201, 149, 45, 0.35);
    box-shadow: 0 0 0 0 rgba(201, 149, 45, 0);
  }

  50% {
    border-color: rgba(201, 149, 45, 0.7);
    box-shadow: 0 0 12px 3px rgba(201, 149, 45, 0.18);
  }
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signup-nudge span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.signup-nudge a {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-shimmer));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: opacity 0.2s;
}

.signup-nudge a:hover {
  opacity: 0.8;
}

/* ---- Verify Page ---- */
.verify-icon {
  text-align: center;
  font-size: 64px;
  margin-bottom: 16px;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.verify-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.verify-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.verify-email {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-dark);
  margin: 4px 0 16px;
  word-break: break-all;
}

.verify-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 0 8px;
}

.verify-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-resend {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--gold-light);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--gold-dark);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-resend:hover {
  background: rgba(201, 149, 45, 0.06);
}

.btn-resend:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- App Layout ---- */
.app-layout {
  display: none;
  flex-direction: column;
  padding: 0;
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
}

.app-layout.active {
  display: flex;
}

.tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 0 0 140px 0;
  /* Extra space for bottom nav + safe area */
  animation: fadeSlideUp 0.35s ease-out;
  -webkit-overflow-scrolling: touch;
}

.tab-content.active {
  display: block;
}

/* ---- App Header (Home) ---- */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px 20px;
  background: linear-gradient(170deg, var(--header-bg-start) 0%, var(--header-bg-mid) 50%, var(--white) 100%);
  border-bottom: 1px solid rgba(201, 149, 45, 0.15);
  position: relative;
  overflow: visible;
  width: 100%;
  z-index: 2000;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(240, 214, 128, 0.3), transparent);
  animation: tabHeaderShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
  clip-path: inset(0);
}

/* Header User Chip */
.header-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  background-size: cover;
  background-position: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
}

.app-greeting {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

.app-username {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Language Selector */
.lang-selector {
  position: relative;
  z-index: 10;
  transition: opacity 0.3s;
}

body.overlay-open .lang-selector {
  opacity: 0;
  pointer-events: none;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 50px;
  background: var(--white);
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: var(--shadow-soft);
}

.lang-btn:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
}

.flag-img {
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.lang-btn #lang-code {
  letter-spacing: 0.5px;
}

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--gold-light);
  border-radius: 18px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  z-index: 15000; /* Higher than other dashboard elements */
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  max-height: 400px;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.dark-theme .lang-menu {
  background: rgba(24, 21, 18, 0.95);
  border-color: rgba(201, 149, 45, 0.3);
}

.lang-menu::-webkit-scrollbar {
  width: 4px;
}

.lang-menu::-webkit-scrollbar-thumb {
  background: var(--gold-light);
  border-radius: 4px;
}

.lang-menu.open {
  display: block;
}

.lang-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--gold-dark);
  padding: 10px 16px 6px;
  background: linear-gradient(90deg, rgba(201, 149, 45, 0.08), transparent);
  border-top: 1px solid var(--border);
}

.lang-group-label:first-child {
  border-top: none;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover {
  background: linear-gradient(90deg, rgba(201, 149, 45, 0.08), transparent);
}

.lang-option .lang-flag {
  font-size: 18px;
}

.lang-option .lang-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.lang-menu-arrow {
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1.5px solid var(--gold-light);
  border-top: 1.5px solid var(--gold-light);
  transform: rotate(45deg);
  z-index: -1;
}

/* ---- Balance Card ---- */
.balance-card {
  margin: 12px 12px 20px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #a67b1e 0%, #c9952d 50%, #e2be6a 100%);
  border-radius: 20px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(166, 123, 30, 0.35);
}

.balance-card .balance-shine {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.balance-label {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.balance-amount {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  margin: 6px 0 4px;
}

.balance-sub {
  font-size: 13px;
  opacity: 0.8;
}

/* ---- Stats ---- */
.stats-row {
  display: flex;
  gap: 10px;
  padding: 0 16px 20px;
}

.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.stat-icon {
  font-size: 18px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ---- Section Title ---- */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 0 16px;
  margin-bottom: 12px;
}

/* ---- Quick Actions ---- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 24px;
}

.quick-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.quick-btn:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.quick-icon {
  font-size: 22px;
}

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 28px 16px;
  margin: 0 16px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.empty-state span {
  font-size: 28px;
  display: block;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- Tab Header ---- */
.tab-header {
  padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 24px;
  background: linear-gradient(170deg, var(--header-bg-start) 0%, var(--header-bg-mid) 50%, var(--white) 100%);
  border-bottom: 1px solid rgba(201, 149, 45, 0.15);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.tab-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(240, 214, 128, 0.3), transparent);
  animation: tabHeaderShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tabHeaderShimmer {
  0% {
    left: -60%;
  }

  55% {
    left: 120%;
  }

  100% {
    left: 120%;
  }
}

.tab-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.tab-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}


/* ---- Invest Tab Header Highlight ---- */
#tab-invest .tab-header {
  background: linear-gradient(170deg, var(--header-bg-start) 0%, var(--header-bg-mid) 50%, var(--white) 100%);
  border-bottom: 1px solid rgba(201, 149, 45, 0.15);
}

#tab-invest .tab-title {
  font-size: 28px;
  color: var(--gold-dark);
}

#tab-invest .invest-title-text {
  color: inherit;
}

#tab-invest .tab-subtitle {
  color: var(--text-muted);
}


/* ---- Invest Header ---- */
.invest-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #7a5a10 0%, #a67b1e 30%, #c9952d 60%, #e2be6a 100%);
  padding: 52px 24px 32px;
  margin-bottom: 4px;
  color: var(--white);
}

.invest-header-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.18) 0%, transparent 60%);
}

.invest-header-shine {
  position: absolute;
  top: -60%;
  right: -20%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.invest-header-content {
  position: relative;
  z-index: 1;
}

.invest-header-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}

.invest-header-amount {
  font-family: var(--font-heading);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.invest-header-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.invest-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--white);
}

.invest-stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.invest-stat-dot.green {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.invest-header-tagline {
  font-size: 13px;
  opacity: 0.8;
  font-style: italic;
}

/* ---- Investment Plans (New) ---- */
.plan-card {
  margin: 0 12px 12px;
  padding: 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  position: relative;
  transition: all 0.25s ease;
}

.plan-card:hover {
  box-shadow: var(--shadow-gold);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}

.plan-card.featured {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(201, 149, 45, 0.05), var(--white) 60%);
}

.plan-new {
  padding-top: 28px;
}

/* Duration badge top-left */
.plan-duration-badge {
  position: absolute;
  top: -1px;
  left: 18px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0 0 10px 10px;
  letter-spacing: 0.5px;
}

/* Most Popular badge top-right */
.plan-badge {
  position: absolute;
  top: -1px;
  right: 18px;
  background: linear-gradient(135deg, #1d7a3f, #27ae60);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 0 0 10px 10px;
  letter-spacing: 0.3px;
}

/* Card top row: icon + name */
.plan-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.plan-icon-new {
  font-size: 36px;
  flex-shrink: 0;
}

.plan-card-info {}

.plan-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.plan-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Return progress bar */
.plan-return-bar {
  margin-bottom: 16px;
}

.plan-return-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.plan-return-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.plan-return-pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.plan-return-pct.gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-shimmer));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-return-track {
  height: 6px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
}

.plan-return-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-shimmer));
  border-radius: 50px;
  transition: width 0.8s ease;
}

/* Meta row */
.plan-meta-row {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.plan-meta-item {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.plan-meta-item:last-child {
  border-right: none;
}

.plan-meta-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 3px;
}

.plan-meta-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.plan-meta-val.green {
  color: #1d7a3f;
}

/* Old compat */
.plan-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.plan-return {
  font-size: 15px;
  color: var(--gold-dark);
  font-weight: 600;
  margin: 4px 0 2px;
}

.plan-min {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.plan-btn {
  margin-top: 0;
  height: 46px;
  font-size: 15px;
}

/* ---- Refer ---- */
.refer-card {
  margin: 0 16px 20px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #a67b1e, #c9952d, #e2be6a);
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(166, 123, 30, 0.3);
}

.refer-reward-amount {
  display: block;
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  color: var(--white);
}

.refer-reward-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  display: block;
}

.refer-code-section {
  padding: 0 16px 16px;
}

.refer-code-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.refer-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--white);
  border: 1.5px solid var(--gold-light);
  border-radius: var(--radius);
}

.refer-code {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 3px;
  font-family: monospace;
}

.copy-btn {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--white);
  border: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 0.85;
}

.refer-steps {
  padding: 20px 16px 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Profile ---- */
.profile-card {
  margin: 16px;
  padding: 32px 24px;
  background: linear-gradient(135deg, var(--white), var(--off-white));
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.profile-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(201, 149, 45, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  background-size: cover;
  background-position: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  border: 3px solid var(--white);
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.profile-email {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: block;
}

.profile-menu {
  padding: 0 16px 40px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.menu-item:active {
  opacity: 0.6;
  transform: translateX(4px);
}

.menu-item.danger .menu-label {
  color: #ff4757;
}

.menu-icon {
  font-size: 22px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 149, 45, 0.06);
  border-radius: 10px;
  flex-shrink: 0;
}

.menu-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.menu-arrow {
  font-size: 18px;
  color: var(--text-muted);
  opacity: 0.5;
}

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(72px + env(safe-area-inset-bottom, 0px));
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  /* Align to top of nav bar, padding handled by safe area */
  justify-content: space-around;
  padding: 8px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
  z-index: 11000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  color: var(--text-muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-item.active {
  color: var(--gold-dark);
}

.nav-item.active svg {
  stroke: var(--gold-dark);
  transform: translateY(-2px);
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  opacity: 0;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: #1d7a3f;
  color: var(--white);
}

.toast.error {
  background: #c0392b;
  color: var(--white);
}

.toast.info {
  background: var(--gold-dark);
  color: var(--white);
}

.hidden {
  display: none !important;
}

/* ---- Back Button ---- */
.back-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--gold-dark);
  padding: 0;
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}

.back-btn:hover {
  opacity: 0.7;
}

/* ---- Deposit Methods ---- */
.deposit-methods {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- Premium Method Card Grid ---- */
.deposit-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  padding: 8px 16px 24px !important;
}

.method-card {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.method-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--gold-light);
  box-shadow: 0 8px 25px rgba(201, 149, 45, 0.12);
}

.method-card.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--white) 0%, rgba(201, 149, 45, 0.03) 100%);
  box-shadow: 0 10px 30px rgba(201, 149, 45, 0.2);
}

/* Selection Indicator (Box corner) */
.method-card::after {
  content: '✓';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  background: var(--border);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.method-card.selected::after {
  background: var(--gold);
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(201, 149, 45, 0.3);
}

.method-icon-wrapper {
  font-size: 32px;
  margin-bottom: 4px;
  transition: transform 0.3s;
}

.method-card:hover .method-icon-wrapper {
  transform: rotate(5deg) scale(1.1);
}

.method-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.2px;
}

.method-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  color: #fff;
  background: var(--gold-dark);
}

.method-badge.hot {
  background: linear-gradient(135deg, #ff4757, #ff6b81);
}

.method-badge.fast {
  background: linear-gradient(135deg, #10b981, #34e7e4);
}

.method-badge.new {
  background: linear-gradient(135deg, #3742fa, #5352ed);
}

.method-check {
  display: none; /* Hide old check as we now use card selection styling */
}

/* ---- Download App Section ---- */
.lp-download-section {
  padding: 40px 16px;
  text-align: center;
  /* background: var(--off-white); */
  position: relative;
  z-index: 10;
}

.download-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 149, 45, 0.2);
  border-radius: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeSlideUp 0.8s ease-out;
}

.download-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.download-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-group-download {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-app-store {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 14px;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 180px;
  text-align: left;
}

.btn-app-store:hover {
  transform: translateY(-4px) scale(1.02);
  background: #0a0a0a;
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(201, 149, 45, 0.3);
}

.store-icon {
  font-size: 28px;
}

.store-text {
  display: flex;
  flex-direction: column;
}

.store-text span {
  font-size: 10px;
  text-transform: uppercase;
  opacity: 0.7;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.store-text strong {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.amount-section {
  padding: 0 16px 20px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  overflow: hidden;
  transition: all 0.2s ease;
  min-height: 54px;
}

.amount-input-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 45, 0.15);
  background: var(--white);
}

.currency-prefix {
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-dark);
  border-right: 1.5px solid var(--border);
  height: 54px;
  display: flex;
  align-items: center;
  background: rgba(201, 149, 45, 0.05);
}

.amount-input {
  flex: 1;
  height: 54px;
  border: none;
  outline: none;
  padding: 0 18px;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--text) !important;
  background: transparent !important;
  width: 100%;
}

.amount-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.quick-amounts {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.amt-chip {
  display: none !important;
}

/* ---- Plain Input ---- */
.plain-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.plain-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 149, 45, 0.12);
}

.plain-input::placeholder {
  color: #c4b9a8;
}

/* ---- Balance Mini Card ---- */
.balance-mini-card {
  margin: 0 16px 20px;
  padding: 20px 20px;
  background: linear-gradient(135deg, #a67b1e, #c9952d);
  border-radius: 16px;
  color: var(--white);
}

.bm-label {
  font-size: 12px;
  opacity: 0.85;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bm-amount {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  margin-top: 4px;
}

/* ---- Contact Channels ---- */
.contact-channels {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s ease;
  color: inherit;
}

.contact-card:hover {
  border-color: var(--gold-light);
  box-shadow: var(--shadow-soft);
}

.contact-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.contact-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.contact-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.contact-arrow {
  margin-left: auto;
  font-size: 22px;
  color: var(--text-muted);
}

/* ---- Tab Header Row (with history icon) ---- */
.tab-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row !important;
}

.tab-header-center {
  flex: 1;
  text-align: center;
}

.tab-header-row .tab-title {
  font-size: 22px;
}

.tab-header-row .tab-subtitle {
  font-size: 13px;
}

.history-icon-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  color: var(--gold-dark);
  box-shadow: var(--shadow-soft);
}

.history-icon-btn:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* ---- Secondary Back Button ---- */
.btn-back-secondary {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-back-secondary:hover {
  border-color: var(--gold-light);
  color: var(--gold-dark);
}

/* ---- History List Styling (Inside Full Page Slide) ---- */
.history-list {
  background: var(--bg);
}

.full-page-scroll {
  overflow-y: auto;
  height: 100%;
  -webkit-overflow-scrolling: touch;
}

.history-empty {
  text-align: center;
  padding: 60px 20px;
}

.history-empty span {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.history-empty p {
  color: var(--text-muted);
  font-size: 14px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.history-item-icon.deposit {
  background: rgba(29, 122, 63, 0.1);
}

.history-item-icon.withdraw {
  background: rgba(192, 57, 43, 0.1);
}

.history-item-icon.invest {
  background: rgba(201, 149, 45, 0.1);
}

.history-item-info {
  flex: 1;
}

.history-item-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.history-item-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.history-item-amount {
  font-size: 15px;
  font-weight: 700;
}

.history-item-amount.deposit.completed {
  color: #1d7a3f;
}

.history-item-amount.withdraw.completed,
.history-item-amount.invest.completed {
  color: #c0392b;
}

.history-item-amount.pending,
.history-item-amount.rejected,
.history-item-amount.failed {
  color: var(--text-muted) !important;
}

.history-item-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 50px;
  margin-top: 3px;
  display: inline-block;
}

.status-pending {
  background: rgba(201, 149, 45, 0.15);
  color: var(--gold-dark);
}

.status-active {
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
}

.status-done {
  background: rgba(29, 122, 63, 0.12);
  color: #1d7a3f;
}

.status-rejected {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.history-empty {
  text-align: center;
  padding: 40px 20px;
}

.history-empty span {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}

.history-empty p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ---- Game Nav Button (center elevated) ---- */
.nav-game-btn {
  position: relative;
  margin-top: -24px;
}

.nav-game-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-shimmer));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(201, 149, 45, 0.4);
  color: var(--white);
  margin-bottom: 2px;
  border: 4px solid var(--white);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-game-btn:hover .nav-game-circle {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(201, 149, 45, 0.5);
}

.nav-game-btn.active .nav-game-circle {
  box-shadow: 0 4px 24px rgba(201, 149, 45, 0.6);
  transform: translateY(-2px);
}

.nav-game-btn span {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-dark) !important;
  text-transform: uppercase;
  margin-top: -2px;
}

.dark-theme .nav-game-circle {
  border-color: var(--white);
}

/* ---- Game Page ---- */
.game-reward-card {
  margin: 0 16px 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
}

.game-reward-label {
  font-size: 15px;
  font-weight: 700;
}

.game-reward-sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

.game-reward-btn {
  background: rgba(255, 255, 255, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  border-radius: 50px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.game-reward-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.game-reward-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.game-card {
  margin: 0 16px 16px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.game-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.game-card-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.game-card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.game-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Coin Flip */
.coin-flip-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 12px;
  gap: 12px;
}

.coin {
  width: 80px;
  height: 80px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.coin.flipping {
  animation: coinSpin 1s ease-out forwards;
}

@keyframes coinSpin {
  0% {
    transform: rotateY(0);
  }

  50% {
    transform: rotateY(900deg);
  }

  100% {
    transform: rotateY(1800deg);
  }
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  backface-visibility: hidden;
}

.coin-face.heads {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-shimmer));
}

.coin-face.tails {
  background: linear-gradient(135deg, #888, #ccc);
  transform: rotateY(180deg);
}

.coin-result {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.game-bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.game-bet-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.game-bet-chips {
  display: flex;
  gap: 8px;
}

.bet-chip {
  padding: 5px 14px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.bet-chip.active {
  border-color: var(--gold);
  background: rgba(201, 149, 45, 0.1);
  color: var(--gold-dark);
}

.game-actions {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}

.game-btn {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.heads-btn {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(201, 149, 45, 0.3);
}

.heads-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(201, 149, 45, 0.4);
}

.tails-btn {
  background: linear-gradient(135deg, #555, #888);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tails-btn:hover {
  transform: translateY(-1px);
}

/* Spin Wheel */
.spin-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
  position: relative;
}

.spin-wheel {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(#c9952d 0deg 60deg,
      #e2be6a 60deg 120deg,
      #a67b1e 120deg 180deg,
      #f0d680 180deg 240deg,
      #888 240deg 300deg,
      #c9952d 300deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--gold-dark);
  box-shadow: 0 4px 24px rgba(201, 149, 45, 0.4);
  transition: transform 3s cubic-bezier(0.17, 0.67, 0.24, 1);
  position: relative;
}

.spin-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.spin-pointer {
  font-size: 24px;
  color: var(--gold-dark);
  margin-top: -4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.spin-result {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px 12px;
}

/* Points Card */
.game-points-card {
  margin: 0 16px 32px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--off-white), var(--white));
  border: 1.5px solid var(--gold-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.game-points-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.game-points-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.game-points-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-top: 2px;
}

.game-convert-btn {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--gold);
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-dark);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.game-convert-btn:hover {
  background: rgba(201, 149, 45, 0.08);
}

/* ---- Invest Toggle Switch ---- */
.invest-toggle-wrap {
  padding: 0 16px 20px;
}

.invest-toggle {
  position: relative;
  display: flex;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 4px;
  gap: 0;
}

.invest-toggle-btn {
  flex: 1;
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 0;
  cursor: pointer;
  transition: color 0.25s ease;
}

.invest-toggle-btn.active {
  color: var(--white);
}

.invest-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(201, 149, 45, 0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.invest-toggle-slider.right {
  transform: translateX(calc(100% + 8px));
}

/* ---- Active Plan Summary ---- */
.active-plan-summary {
  display: flex;
  align-items: center;
  margin: 0 16px 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(201, 149, 45, 0.08), var(--white));
  border: 1.5px solid var(--gold-light);
  border-radius: 18px;
}

.aps-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.aps-icon {
  font-size: 22px;
}

.aps-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.aps-val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.aps-val.green {
  color: #1d7a3f;
}

.aps-divider {
  width: 1px;
  height: 44px;
  background: var(--border);
  margin: 0 12px;
}

/* ---- Full Page Slide (Invest Modal) ---- */
.full-page-slide {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.34, 1.06, 0.64, 1);
  overflow: hidden;
}

.full-page-slide.open {
  transform: translateX(0);
}

.full-page-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}


/* ---- Invest Modal ---- */
.invest-modal-plan {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--off-white);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 20px;
}

.invest-modal-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.invest-modal-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.invest-modal-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.invest-min-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 6px;
  margin-bottom: 20px;
}

.invest-profit-preview {
  background: linear-gradient(135deg, rgba(201, 149, 45, 0.06), var(--white));
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}

.ipp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

.ipp-row:last-child {
  margin-bottom: 0;
}

.ipp-row span:first-child {
  color: var(--text-muted);
}

.ipp-row span.green {
  color: #1d7a3f;
  font-weight: 600;
}

.ipp-row.total {
  font-weight: 700;
  font-size: 15px;
  margin-top: 6px;
}

.ipp-row.total span:first-child {
  color: var(--text);
}

.ipp-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ---- Mini Switch Toggle ---- */
.mini-switch-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.mini-switch-label {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

.mini-switch {
  position: relative;
  width: 34px;
  height: 20px;
  background: #ddd;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.mini-switch.on {
  background: var(--gold);
}

.mini-switch-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.mini-switch.on .mini-switch-handle {
  transform: translateX(14px);
}

/* Download Certificate Button */
.btn-download-cert {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.btn-download-cert:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  filter: brightness(1.1);
}

.btn-download-cert:active {
  transform: translateY(0);
}



/* ---- MODALS & OVERLAYS ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--white);
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .page {
    padding: 20px 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .brand-name {
    font-size: 32px;
  }

  .brand-name.small {
    font-size: 24px;
  }
}

/* ---- Colour Trading Premium Buttons ---- */
.ct-btns-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.ct-btn-premium {
  height: 48px;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.ct-btn-premium:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ct-btn-premium.green {
  background: #10b981;
  border-radius: 12px 12px 12px 0;
}

.ct-btn-premium.violet {
  background: #8b5cf6;
  border-radius: 10px;
}

.ct-btn-premium.red {
  background: #ef4444;
  border-radius: 12px 12px 0 12px;
}

.ct-btn-premium.green-violet {
  background: linear-gradient(135deg, #10b981 50%, #8b5cf6 50%);
  border-radius: 12px;
}

.ct-btn-premium.red-violet {
  background: linear-gradient(135deg, #ef4444 50%, #8b5cf6 50%);
  border-radius: 12px;
}

.ct-btn-premium.big {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ct-btn-premium.small {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ct-btn-premium.number-select {
  background: linear-gradient(135deg, #64748b, #475569);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.ct-btn-premium:active {
  transform: scale(0.96);
}

/* Lotery Ball Design for Numbers */
.ct-num-ball {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset -2px -2px 6px rgba(0, 0, 0, 0.2);
}

.ct-num-ball::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 8px;
  width: 14px;
  height: 10px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  filter: blur(1px);
}

.ct-num-ball.green {
  background: radial-gradient(circle at 40% 40%, #10b981 30%, #059669 90%);
}

.ct-num-ball.red {
  background: radial-gradient(circle at 40% 40%, #ef4444 30%, #dc2626 90%);
}

.ct-num-ball.violet {
  background: radial-gradient(circle at 40% 40%, #8b5cf6 30%, #7c3aed 90%);
}

.ct-num-ball.red-violet {
  background: linear-gradient(135deg, #ef4444 50%, #8b5cf6 50%);
}

.ct-num-ball.green-violet {
  background: linear-gradient(135deg, #10b981 50%, #8b5cf6 50%);
}

.ct-num-ball:active {
  transform: scale(0.9);
}

/* ---- Countdown Overlay ---- */
.ct-countdown-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  pointer-events: none;
  border-radius: 20px;
  border: 1px solid rgba(201, 149, 45, 0.3);
}

.ct-countdown-number {
  font-family: var(--font-heading);
  font-size: 80px;
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px var(--gold);
  line-height: 1;
  margin-bottom: 10px;
  animation: countdownPulse 1s ease-out infinite;
}

@keyframes countdownPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.ct-countdown-text {
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Cache buster v=9 */

/* ---- Game Icons Animations ---- */
.game-icon-container {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(201, 149, 45, 0.2));
  animation: floatingIcon 3s ease-in-out infinite;
  z-index: 2;
}

@keyframes floatingIcon {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

.game-icon-glow {
  position: absolute;
  width: 50px;
  height: 50px;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  filter: blur(15px);
  opacity: 0.3;
  z-index: 1;
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.6);
    opacity: 0.5;
  }
}

/* ---- Layout Stability Fixes ---- */
#ct-history-table-view table, #ct-trade-table-view table, #ld-history-view table {
  table-layout: fixed !important;
  width: 100% !important;
}

#ct-results-table, #ct-trade-results-table, #ld-history-table {
  min-height: var(--table-min-height);
}

#ct-history-table-view, #ct-trade-table-view, #ld-history-view {
  min-height: var(--table-min-height);
  contain: layout !important;
}

#ct-timer, #lottery-timer, .plan-countdown {
  font-family: 'Courier New', Courier, monospace !important;
  display: inline-block;
  min-width: 5ch; /* enough for 00:00 */
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#lottery-timer {
  min-width: 8ch; /* enough for 00:00:00 */
}
/* ---- Pagination ---- */
.pagination-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.pagination-btn:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
  transform: translateY(-1px);
}
.pagination-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
  box-shadow: var(--shadow-gold);
}
.pagination-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Service Modal ---- */
.service-modal {
  width: 92%;
  max-width: 340px;
  background: var(--white);
  border-radius: 24px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: modalSlideUp 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  border: 1.5px solid var(--border);
}
