@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&display=swap');

:root {
  /* Typography */
  font-family: 'Outfit', -apple-system, sans-serif;
  color-scheme: light;

  /* Palette Colors */
  --bg-main: #fcfbfd;
  --purple-light: #f1ecfc;
  --purple-primary: #8b5cf6;
  --purple-dark: #6d28d9;
  --purple-neon: #a78bfa;
  --purple-btn: #7e22ce;
  --text-dark: #37373a4f;
  --text-gray: #a8a4b8;
  --card-bg: #ffffff;
  --card-radius: 48px;
  --card-padding: 40px;
  --card-shadow: 0 20px 60px -10px rgba(66, 72, 116, 0.2);
  --card-border: 0 0 0 1px rgba(255, 255, 255, 1);
  /* Layout */
  --gap-md: 24px;
  --gap-sm: 10px;

  /* User-chosen accent (falls back to brand purple) */
  --accent-color: #8b5cf6;
  --pf-case-color: #f0f0f0;
  --pf-btn-color: #c8c8c8;

  /* Global Defaults */
  color: var(--text-dark);
  background-color: var(--bg-lightest);
}

::selection {
  background-color: var(--text-dark);
  /* Deep Purple */
  color: var(--bg-lightest);
  /* Lightest Background color */
}

body.theme-dark {
  color-scheme: dark;
  --bg-main: #0a0a0a;
  --bg-lightest: #0f0f0f;
  --text-dark: #f0f0f0;
  --text-gray: #888888;
  --card-bg: #1a1a2a;
  --purple-light: rgba(139, 92, 246, 0.12);
  --card-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.5);
  --card-border: 0 0 0 1px rgba(255, 255, 255, 0.05);
  background-color: #050505;
  background-image:
    radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100vh);
  /* Clean Gradient with Palette */
  background-color: #f7f6f9;
  background-image:
    radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
  overflow: hidden;
  /* Prevent scrolling on mobile */
  user-select: none;
  /* Prevent text selection */
  -webkit-user-select: none;
  font-family: 'Outfit', sans-serif;
}

#app {
  width: 100%;
  height: 100vh;
  height: var(--tg-viewport-stable-height, 100vh);
  display: flex;
  flex-direction: column;
  position: relative;
  /* Ensure absolute children are relative to this */
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Ensure #app itself never scrolls, only its children do */
}

/* --- Desktop View --- */
.desktop-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

.desktop-view h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  /* specific visual adjust, ok to keep or var */
  color: var(--text-dark);
}

.qr-wrapper {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  /* Solid White Rounded Card */
  background: var(--card-bg);
  box-shadow:
    var(--card-shadow),
    var(--card-border);
}

.bot-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: opacity 0.2s, color 0.2s;
  border-bottom: 2px solid var(--accent-medium);
}

.bot-link:hover {
  opacity: 0.8;
  border-bottom-color: var(--text-dark);
}

.version {
  color: var(--accent-medium);
  font-family: monospace;
  font-size: 0.75rem;
  margin-top: var(--gap-sm);
  font-weight: 600;
}

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

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

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pageExit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    filter: blur(2px);
  }
}

.page-enter {
  animation: pageEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-exit {
  animation: pageExit 0.18s cubic-bezier(0.55, 0, 1, 0.45) both;
  pointer-events: none;
}

/* --- Top Bar (chain pills + settings) --- */
.top-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
  z-index: 10;
  position: relative;
  width: 100%;
}

/* Row of 3 chain pills */
.chain-pills-row {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.chain-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg, #f4f3fa);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  padding: 7px 8px;
  opacity: 0.45;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}

.chain-pill-active {
  opacity: 1;
  background: var(--chain-bg);
  border-color: var(--chain-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--chain-color) 30%, transparent);
}

.chain-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chain-color);
  flex-shrink: 0;
}

.chain-pill-label {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--chain-color);
  flex-shrink: 0;
}

.chain-pill-amt {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-primary, #1a1a2e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chain-pill-active .chain-pill-amt {
  color: var(--chain-color);
}

/* Settings ⚙ wheel button — compact icon only */
.settings-btn {
  width: 40px;
  min-width: 40px;
  background: var(--card-bg);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--accent-color, var(--purple-primary));
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.07);
  transition: background 0.2s, box-shadow 0.2s, transform 0.3s;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
}

.settings-btn:hover {
  background: var(--purple-light);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
}

/* --- Game View --- */
.game-view {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  padding: 10px;
  background-color: #f7f6fb;
}

/* Background Intersecting Circles Effect */
.game-view::before,
.game-view::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

/* Bottom-Left Circle Arc */
.game-view::before {
  width: 140vw;
  height: 140vw;
  max-width: 800px;
  max-height: 800px;
  left: -50vw;
  bottom: -40vw;
}

/* Top-Right Circle Arc */
.game-view::after {
  width: 120vw;
  height: 120vw;
  max-width: 700px;
  max-height: 700px;
  right: -40vw;
  top: -30vw;
}

/* --- Header --- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(244, 238, 255, 0.8);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.05);
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-color, var(--purple-neon)), var(--pf-btn-color, var(--purple-primary)));
  transition: background 0.25s;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: #1e1e24;
}

.user-rank {
  font-size: 0.75rem;
  color: var(--purple-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profit-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: var(--purple-light);
  padding: 5px 10px;
  border-radius: 10px;
  min-width: 90px;
}

.profit-label {
  font-size: 0.65rem;
  color: var(--purple-neon);
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 2px;
}

.profit-amount {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--purple-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Content --- */
.game-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 78px 0;
  z-index: 10;
  position: relative;
}

.total-coins-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.coin-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  padding: 4px 16px 4px 8px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.08);
}

.coin-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, var(--purple-neon)), var(--pf-btn-color, #8b5cf6));
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.6);
  transition: background 0.25s;
}

.coin-inner {
  width: 12px;
  height: 12px;
  border: 3px solid white;
  border-radius: 50%;
  border-right-color: transparent;
  transform: rotate(-45deg);
}

.score-display {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1e1e24;
  line-height: 1;
  letter-spacing: -1px;
}

.total-coins-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* --- Main Tap Button --- */
.clicker-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto 0;
  padding-bottom: 10px;
}

.clicker-circle {
  width: 185px;
  height: 185px;
  border-radius: 50%;
  background: var(--pf-btn-color, #5b21b6);
  box-shadow: 0 14px 0 var(--pf-btn-color, #4c1d95), 0 24px 36px rgba(91, 33, 182, 0.4);
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s, box-shadow 0.08s, background 0.25s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.clicker-inner {
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color, var(--purple-neon)), var(--accent-color, var(--purple-primary)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: white;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  box-shadow: inset 0 10px 20px rgba(255, 255, 255, 0.3);
  transition: top 0.08s, background 0.25s;
}

.clicker-circle:active,
.clicker-circle.active {
  transform: translateY(8px);
  box-shadow: 0 6px 0 var(--pf-btn-color, #4c1d95), 0 10px 20px rgba(91, 33, 182, 0.4);
}

.clicker-circle:active .clicker-inner,
.clicker-circle.active .clicker-inner {
  top: 0px;
}

.tap-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 1px;
}

/* Floating Animations */
.floating-number {
  position: absolute;
  color: #fff;
  font-size: 2.8rem;
  font-weight: 900;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  animation: floatUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 20;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-100px) scale(1.3);
    opacity: 0;
  }
}

/* --- Energy Section --- */
.energy-section {
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.energy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 800;
}

.energy-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #1e1e24;
}

.energy-icon {
  background: var(--accent-color, var(--purple-primary));
  color: white;
  border-radius: 5px;
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.6rem;
  transition: background 0.25s;
}

.energy-value {
  font-size: 1rem;
  color: var(--purple-primary);
}

.energy-max {
  color: #a8a4b8;
  font-size: 0.85rem;
}

.energy-bar-bg {
  width: 100%;
  height: 14px;
  background: var(--purple-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
}

.energy-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pf-btn-color, var(--purple-primary)), var(--accent-color, var(--purple-neon)));
  border-radius: 12px;
  transition: width 0.1s linear, background 0.25s;
}

/* --- Bottom Navbar --- */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  padding: 6px 10px max(14px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -1px 0 rgba(0,0,0,0.04), 0 -8px 32px rgba(139, 92, 246, 0.06);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  flex: 1;
  padding: 6px 4px 5px;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}

.nav-item.active {
  color: var(--accent-color, var(--purple-primary));
  background: rgba(139, 92, 246, 0.08);
}

.nav-icon-wrapper {
  width: 26px;
  height: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active .nav-icon-wrapper {
  color: var(--accent-color, var(--purple-primary));
  transform: scale(1.12) translateY(-1px);
}

.nav-item:active .nav-icon-wrapper {
  transform: scale(0.9);
}

.nav-icon-wrapper svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.nav-item.active .nav-icon-wrapper svg {
  stroke-width: 2.5;
}

.nav-label {
  font-size: 0.57rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1;
}

/* Page section title row (used below shared header on Tasks/Airdrop) */
.page-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
  margin: 10px 0 4px 0;
  padding: 0 2px;
}

/* --- Earn Page Wrapper: Full-height column layout --- */
.earn-page-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* No outer scroll */
  background-color: #f7f6fb;
}

/* --- Earn View (scrollable content area) --- */
.earn-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: clip;
  /* clip doesn't create scroll context, so inner overflow-x:auto still works */
  box-sizing: border-box;
  padding: 10px 10px 110px 10px;
  background-color: transparent;
}

/* Intersecting Background logic applies to earn-view as well! */
.earn-view::before,
.earn-view::after {
  content: '';
  position: absolute;
  /* Absolute within earn-view only, won't go outside */
  background: #ffffff;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.earn-view::before {
  width: 140vw;
  height: 140vw;
  max-width: 800px;
  max-height: 800px;
  left: -50vw;
  bottom: -40vw;
}

.earn-view::after {
  width: 120vw;
  height: 120vw;
  max-width: 700px;
  max-height: 700px;
  right: -40vw;
  top: -30vw;
}

/* The items themselves need relative positioning */
.earn-view>* {
  z-index: 10;
  position: relative;
}

/* Earn Header */
.earn-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.earn-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.earn-balance {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--purple-light);
  color: var(--purple-primary);
  display: flex;
  justify-content: center;
  align-items: center;
}

.wallet-icon-wrapper svg {
  width: 20px;
  height: 20px;
}

.earn-amount {
  font-size: 2.5rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: -2px;
}

.earn-today-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--purple-light);
  color: var(--purple-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Upgrade Card (Recommended) */
.upgrade-card.recommended-card {
  background: linear-gradient(135deg, #8146ff 0%, #6d28d9 100%);
  border-radius: 24px;
  padding: 24px 20px 72px 20px;
  /* bottom padding leaves room for absolute buy button */
  min-height: 190px;
  /* ensures card is tall enough for all abs elements */
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(109, 40, 217, 0.3);
  margin-bottom: 20px;
}

.recommended-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.upgrade-content {
  display: flex;
  flex-direction: column;
  width: 65%;
  /* Text only takes left portion */
}

.upgrade-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.upgrade-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.upgrade-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin-bottom: 0;
}

.upgrade-bottom {
  /* Not used anymore, buy btn is absolute */
  display: none;
}

.upgrade-efficiency {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
}

.eff-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

.eff-value {
  font-size: 1.1rem;
  font-weight: 800;
}

.upgrade-buy-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: white;
  color: var(--purple-dark);
  border: none;
  padding: 11px 22px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  font-family: inherit;
  z-index: 5;
}

.upgrade-icon-large {
  /* No longer needed for layout, glass is absolutely positioned */
  display: none;
}

.rocket-bg {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -30px;
  bottom: -30px;
  color: rgba(255, 255, 255, 1);
  opacity: 0.12;
  transform: rotate(-15deg);
  z-index: 0;
}

.rocket-glass {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 4;
}

.rocket-glass svg {
  width: 34px;
  height: 34px;
  color: white;
  transform: rotate(-35deg);
}

/* Hardware List */
.hardware-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hardware-title {
  font-size: 1.2rem;
  font-weight: 900;
  color: #1e1e24;
  margin: 0;
}

.view-all-link {
  font-size: 0.85rem;
  color: var(--purple-primary);
  font-weight: 800;
  text-decoration: none;
}

.hardware-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hardware-item {
  display: flex;
  align-items: center;
  background: var(--card-bg);
  padding: 12px 16px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(244, 238, 255, 0.8);
}

.hw-icon-wrapper {
  width: 44px;
  height: 44px;
  min-width: 44px;
  /* prevent shrink */
  border-radius: 50%;
  background: var(--purple-light);
  color: var(--purple-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 16px;
  flex-shrink: 0;
  /* never shrink */
}

.hw-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hw-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #1e1e24;
}

.hw-eff {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--purple-primary);
}

.hw-eff svg {
  width: 14px;
  height: 14px;
}

.hw-buy-btn {
  background: var(--purple-primary);
  color: white;
  border: none;
  min-width: 56px;
  padding: 10px 16px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
  font-family: inherit;
  transition: transform 0.1s;
  flex-shrink: 0;
  /* never shrink */
  white-space: nowrap;
}

.hw-buy-btn:active {
  transform: scale(0.95);
}

/* Utility */
.hidden {
  display: none !important;
}

/* Category list = same as hardware list */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* --- Earn Stats Strip (replaces the old profit-info row) --- */
.earn-stats-strip {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.earn-stat-pill {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--card-bg-subtle, rgba(246, 245, 255, 0.8));
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  gap: 4px;
  min-width: 0;
}

.earn-stat-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-gray, #9ca3af);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.earn-stat-value {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dark, #1a1a2e);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: auto;
}

body.theme-dark .earn-stat-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .earn-stat-value {
  color: #e2e0f0;
}

/* --- Earn Category Tabs --- */
.earn-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 0 8px 0;
  margin-bottom: 12px;
  scrollbar-width: none;
  min-height: 48px;
  /* ensure tabs are always visible */
  align-items: center;
}

.earn-category-tabs::-webkit-scrollbar {
  display: none;
}

.earn-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 20px;
  border: 2px solid #e8e4f5;
  background: white;
  color: #a78bfa;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  /* don't let tabs shrink */
  transition: all 0.2s;
  min-height: 38px;
}

.earn-tab svg {
  width: 14px;
  height: 14px;
}

.earn-tab.active {
  background: var(--purple-primary);
  border-color: var(--purple-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* --- Upgrade Mini Card Grid --- */
.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.upgrade-mini-card {
  background: white;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(244, 238, 255, 0.9);
  transition: transform 0.15s;
}

.upgrade-mini-card:active {
  transform: scale(0.97);
}

.upgrade-mini-card.locked {
  opacity: 0.6;
}

.upgrade-mini-card.completed {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}

.umc-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
}

.umc-icon svg {
  width: 22px;
  height: 22px;
}

.umc-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1e1e24;
  line-height: 1.2;
}

.umc-eff {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-primary);
}

.umc-eff svg {
  width: 12px;
  height: 12px;
}

.umc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.umc-level {
  font-size: 0.7rem;
  color: #a0a0b8;
  font-weight: 700;
}

.umc-buy {
  background: var(--purple-primary);
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s;
}

.umc-buy:active {
  transform: scale(0.92);
}

.umc-buy.special-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.umc-buy.locked-btn {
  background: #e2e0ea;
  cursor: not-allowed;
}

.umc-buy.done-btn {
  background: #10b981;
  cursor: not-allowed;
  font-size: 0.68rem;
  padding: 6px 8px;
}


/* --- Desktop / QR Code View --- */
.desktop-view {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #e8e6f0;
  background-image:
    radial-gradient(circle at 60% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(109, 40, 217, 0.06) 0%, transparent 45%);
}

.desktop-view h1 {
  font-size: 2rem;
  font-weight: 900;
  color: #424874;
  margin: 0;
  letter-spacing: -0.02em;
}

.qr-wrapper {
  background: white;
  border-radius: 32px;
  padding: 24px;
  box-shadow:
    0 20px 60px rgba(66, 72, 116, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-link {
  font-size: 1.1rem;
  font-weight: 800;
  color: #424874;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.bot-link:hover {
  text-decoration: underline;
}

.version {
  font-size: 0.78rem;
  color: #a78bfa;
  font-weight: 600;
}

.build {
  font-size: 0.65rem;
  color: #7c3aed;
  opacity: 0.7;
  margin-top: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* --- Loading View (Matrix Style) --- */
.loading-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e8e6f0;
  /* same lavender as QR page */
  background-image:
    radial-gradient(circle at 60% 30%, rgba(139, 92, 246, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(109, 40, 217, 0.06) 0%, transparent 45%);
  z-index: 10000;
  transition: opacity 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Helper to trigger fade */
.loading-view.fade-out {
  opacity: 0;
  pointer-events: none;
  /* Allow clicking through while fading */
}

#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  /* Subtle effect */
}

/* Removed wrapper for cleaner look */
.loading-content-wrapper {
  display: contents;
  /* Removes the box structure */
}

.loading-container-absolute {
  position: absolute;
  bottom: 10%;
  left: 10%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Align to left */
  gap: 12px;
}

.loading-text {
  color: #424874;
  /* same dark purple as QR page title */
  font-weight: 900;
  font-size: 3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
  animation: fadeText 2s ease-in-out infinite alternate;
}

.loading-progress-container {
  width: 300px;
  height: 4px;
  /* Thinner for elegance */
  background: rgba(66, 72, 116, 0.2);
  border-radius: 0;
  /* Sharp edges */
  overflow: hidden;
  position: relative;
}

.loading-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: var(--text-dark);
  animation: fluidLoad 2s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
  transform-origin: left;
}

@keyframes fluidLoad {
  0% {
    transform: scaleX(0);
  }

  50% {
    transform: scaleX(0.7);
  }

  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}

@keyframes pulseText {

  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(66, 72, 116, 0.2);
  }

  50% {
    opacity: 0.5;
    text-shadow: none;
  }
}

/* --- Tasks Page Styles --- */
.tasks-page-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f7f6fb;
}

.tasks-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: clip;
  box-sizing: border-box;
  padding: 16px 16px 110px 16px;
  background-color: transparent;
}

.tasks-view::before,
.tasks-view::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.tasks-view::before {
  width: 140vw;
  height: 140vw;
  max-width: 800px;
  max-height: 800px;
  left: -50vw;
  bottom: -40vw;
}

.tasks-view::after {
  width: 120vw;
  height: 120vw;
  max-width: 700px;
  max-height: 700px;
  right: -40vw;
  top: -30vw;
}

.tasks-view>* {
  z-index: 10;
  position: relative;
}

.tasks-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.tasks-title-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #a78bfa, #7e22ce);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 16px rgba(126, 34, 206, 0.25);
}

.tasks-title-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.tasks-title-text h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
}

.tasks-title-text p {
  font-size: 0.95rem;
  color: #8b85a1;
  margin: 0;
  font-weight: 500;
}

.tasks-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
}

.badge-purple {
  background: #f3e8ff;
  color: #9333ea;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.task-card {
  background: white;
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(244, 238, 255, 0.8);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.task-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.bg-light-purple {
  background: #f3e8ff;
}

.bg-light-orange {
  background: #ffedd5;
}

.bg-light-blue {
  background: #e0f2fe;
}

.bg-light-gray {
  background: #f3f4f6;
}

.bg-light-indigo {
  background: #e0e7ff;
}

.bg-light-pink {
  background: #fce7f3;
}

.task-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: #111827;
}

.task-reward {
  font-size: 0.85rem;
  font-weight: 700;
  color: #8b5cf6;
}

.task-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  color: white;
}

.bg-purple {
  background: #8b5cf6;
}

.checkin-days {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
}

.checkin-days .day {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #d1d5db;
  background: #f9fafb;
}

.checkin-days .day.checked {
  background: #8b5cf6;
  color: white;
}

.checkin-days .day.checked svg {
  width: 16px;
  height: 16px;
}

.checkin-days .day.current {
  background: #f3e8ff;
  color: #8b5cf6;
  border: 1px solid #d8b4fe;
}

.checkin-days .day.gift svg {
  width: 14px;
  height: 14px;
  color: #9ca3af;
}

.btn-primary-purple {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: #7e22ce;
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(126, 34, 206, 0.2);
}

.small-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.task-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.btn-secondary {
  padding: 10px 20px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #111827;
  border: none;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.btn-secondary.tinted-purple {
  background: #f3e8ff;
  color: #8b5cf6;
}

.btn-icon-soft {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.btn-icon-soft svg {
  width: 18px;
  height: 18px;
}

.invite-card .task-progress-text {
  font-weight: 800;
  font-size: 1rem;
  color: #4b5563;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  margin: 4px 0;
}

.progress-bar-fill {
  height: 100%;
  background: #8b5cf6;
  border-radius: 6px;
}

.btn-outline-purple {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: white;
  color: #8b5cf6;
  border: 2px solid #e9d5ff;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

/* --- Airdrop Page Styles --- */
.airdrop-page-wrapper {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #f7f6fb;
}

.airdrop-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  overflow-x: clip;
  box-sizing: border-box;
  padding: 16px 16px 110px 16px;
  background-color: transparent;
}

.airdrop-view::before,
.airdrop-view::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.airdrop-view::before {
  width: 140vw;
  height: 140vw;
  max-width: 800px;
  max-height: 800px;
  left: -50vw;
  bottom: -40vw;
}

.airdrop-view::after {
  width: 120vw;
  height: 120vw;
  max-width: 700px;
  max-height: 700px;
  right: -40vw;
  top: -30vw;
}

.airdrop-view>* {
  z-index: 10;
  position: relative;
}

.airdrop-eligibility {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  margin-top: 10px;
}

.eligibility-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.eligibility-title {
  color: #8b5cf6;
  font-weight: 800;
  font-size: 0.85rem;
}

.eligibility-percentage {
  background: #8b5cf6;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.airdrop-eligibility .progress-bar-container {
  height: 8px;
  background: #f3e8ff;
  border-radius: 4px;
}

.airdrop-eligibility .progress-bar-fill {
  background: #8b5cf6;
  border-radius: 4px;
}

.airdrop-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 24px;
}

.airdrop-title-icon {
  width: 72px;
  height: 72px;
  background: #f3e8ff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.airdrop-title-icon svg {
  width: 32px;
  height: 32px;
}

.airdrop-title-text h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px 0;
  letter-spacing: -0.5px;
}

.airdrop-title-text p {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  padding: 0 10px;
}

.airdrop-card {
  background: white;
  border-radius: 24px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(244, 238, 255, 0.8);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.05);
  margin-bottom: 40px;
}

.spot-icon-wrapper {
  width: 48px;
  height: 48px;
  background: #8b5cf6;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.spot-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.spot-text h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px 0;
}

.spot-text p {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.4;
}

.glow {
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.roadmap-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #e5e7eb;
  transform: translateX(-50%);
  z-index: 1;
}

.phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-bottom: 40px;
  text-align: center;
  background: transparent;
}

.phase-2-margin {
  margin-top: 10px;
}

.phase-3-spacing {
  margin-top: 10px;
}

.phase-4-spacing {
  margin-top: 30px;
}

.phase-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.badge-green {
  background: #22c55e;
  color: white;
}

.badge-purple {
  background: #8b5cf6;
  color: white;
}

.badge-gray {
  background: #cbd5e1;
  color: white;
}

.phase-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
}

.phase-icon.icon-green {
  background: #22c55e;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.phase-icon.icon-green svg {
  width: 34px;
  height: 34px;
}

.phase-icon.icon-purple {
  background: #8b5cf6;
}

.pulse-ring::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  right: -12px;
  bottom: -12px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.2);
  z-index: -1;
}

.phase-icon.icon-purple svg {
  width: 34px;
  height: 34px;
}

.phase-icon.icon-gray {
  background: #f3f4f6;
}

.phase-icon.icon-gray svg {
  width: 32px;
  height: 32px;
}

.phase-icon.icon-dashed {
  background: #fcfbfd;
  border: 3px dashed #e5e7eb;
  box-sizing: border-box;
}

.phase-icon.icon-dashed svg {
  width: 32px;
  height: 32px;
}

.phase-content h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 4px 0;
}

.phase-content p {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  margin: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: #fcfbfd;
  padding: 2px 6px;
  border-radius: 4px;
}

.text-green h3 {
  color: #22c55e;
}

.text-purple h3 {
  color: #8b5cf6;
}

.text-gray h3 {
  color: #9ca3af;
}

/* ===== Settings Modal ===== */
.settings-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  transition: background 0.3s;
}

.settings-modal-overlay.visible {
  background: rgba(0, 0, 0, 0.45);
}

.settings-sheet {
  width: 100%;
  max-height: 90dvh;       /* fallback for full-screen / mobile */
  max-height: 90%;         /* relative to overlay when inside pf-screen */
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 12px 20px 0;
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* When modal is anchored inside pf-screen, constrain height to the frame */
.pf-screen .settings-sheet {
  max-height: 88%;
}

.settings-modal-overlay.visible .settings-sheet {
  transform: translateY(0);
}

.settings-sheet-handle {
  width: 40px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 0 auto 20px;
  flex-shrink: 0;
}

.settings-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.settings-sheet-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e1e24;
}

.settings-close-btn {
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.2s;
}

.settings-close-btn:hover {
  background: #e5e7eb;
}

.settings-section-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #a78bfa;
  text-transform: uppercase;
  margin: 16px 0 8px 0;
}

.settings-section-label.danger-label {
  color: #ef4444;
}

.settings-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid #f3f4f6;
}

.settings-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-info-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--purple-light);
  color: var(--purple-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-info-title {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 2px;
}

.settings-info-value {
  font-size: 0.9rem;
  font-weight: 800;
  color: #1e1e24;
  font-family: 'Outfit', monospace;
}

.settings-copy-btn {
  background: var(--purple-light);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--purple-primary);
  transition: background 0.2s;
  flex-shrink: 0;
}

.settings-copy-btn:hover {
  background: #ddd6fe;
}

.settings-delete-btn {
  width: 100%;
  background: #fff1f2;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ef4444;
  font-weight: 800;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}

.settings-delete-btn:hover {
  background: #fee2e2;
}

.delete-confirm-box {
  background: #fff1f2;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 4px;
}

.delete-confirm-box p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.5;
}

.delete-confirm-actions {
  display: flex;
  gap: 8px;
}

.btn-cancel-delete {
  flex: 1;
  background: #f3f4f6;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
}

.btn-confirm-delete {
  flex: 1;
  background: #ef4444;
  border: none;
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-confirm-delete:hover {
  background: #dc2626;
}

.btn-confirm-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Haptic Slider Settings */
.settings-slider-container {
  background: #f8f6fb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.settings-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e1e24;
  margin-bottom: 12px;
}

.styled-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e2dcf2;
  border-radius: 4px;
  outline: none;
  margin: 10px 0;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple-primary);
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.styled-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #a8a4b8;
  font-weight: 600;
  margin-top: 4px;
}

/* ─── Login Page — mirrors cybercookie.party aesthetic ──────────────────── */

/* Override body scroll lock for login page */
body:has(.lp-root) {
  overflow: auto;
}

#app:has(.lp-root) {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  justify-content: flex-start;
  align-items: stretch;
}

.lp-root {
  width: 100%;
  min-height: 100vh;
  background: #ffffff;
  color: #0a0a0a;
  font-family: 'Outfit', system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: lpFadeIn 0.5s ease both;
}

@keyframes lpFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ── Grid background ── */
.lp-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  color: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.lp-grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lp-grid-vline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.lp-grid-vline-l {
  left: 25%;
}

.lp-grid-vline-r {
  right: 25%;
}

.lp-grid-hline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.lp-grid-hline-t {
  top: 33%;
}

.lp-grid-hline-b {
  top: 66%;
}

.lp-corner {
  position: absolute;
  color: rgba(0, 0, 0, 0.15);
}

.lp-corner-tl {
  top: 32px;
  left: 32px;
}

.lp-corner-tr {
  top: 32px;
  right: 32px;
}

.lp-corner-bl {
  bottom: 32px;
  left: 32px;
}

.lp-corner-br {
  bottom: 32px;
  right: 32px;
}

/* ── Header ── */
.lp-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
}

.lp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-logo-box {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-logo-box-text {
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #0a0a0a;
}

.lp-logo-box-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 5px;
  height: 5px;
  border: 1px solid #0a0a0a;
  background: #ffffff;
}

.lp-logo-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0a0a0a;
}

.lp-header-link {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.lp-header-link:hover {
  color: #0a0a0a;
}

/* ── Main layout ── */
.lp-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

/* ── Card ── */
.lp-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.04);
}

.lp-card-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid #0a0a0a;
  background: #ffffff;
  z-index: 2;
}

.lp-card-dot-tl {
  top: -3px;
  left: -3px;
}

.lp-card-dot-tr {
  top: -3px;
  right: -3px;
}

.lp-card-dot-bl {
  bottom: -3px;
  left: -3px;
}

.lp-card-dot-br {
  bottom: -3px;
  right: -3px;
}

.lp-card-inner {
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Intro ── */
.lp-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 4px 10px;
  width: fit-content;
}

.lp-badge-dot {
  width: 6px;
  height: 6px;
  background: #0a0a0a;
  animation: lpPulse 2s ease-in-out infinite;
}

@keyframes lpPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.lp-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: #0a0a0a;
}

.lp-subtitle {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.45);
  line-height: 1.5;
}

/* ── Error ── */
.lp-error {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ef4444;
  background: #fef2f2;
  color: #dc2626;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Buttons ── */
.lp-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lp-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #ffffff;
  color: #0a0a0a;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  position: relative;
}

.lp-btn:hover {
  background: #f9f9f9;
  border-color: rgba(0, 0, 0, 0.3);
}

.lp-btn:active {
  transform: translateY(1px);
}

.lp-btn-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.lp-btn-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, color 0.2s;
}

.lp-btn:hover .lp-btn-arrow {
  transform: translateX(3px);
  color: #0a0a0a;
}

.lp-btn-discord {
  background: #5865F2;
  border-color: #5865F2;
  color: #ffffff;
}

.lp-btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
}

.lp-btn-discord .lp-btn-arrow {
  color: rgba(255, 255, 255, 0.5);
}

.lp-btn-discord:hover .lp-btn-arrow {
  color: #ffffff;
}

/* ── Separator ── */
.lp-sep {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lp-sep-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

.lp-sep-text {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(0, 0, 0, 0.3);
}

/* ── Telegram link ── */
.lp-tg-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.lp-tg-link:hover {
  color: #0a0a0a;
  border-color: rgba(0, 0, 0, 0.2);
  background: #f9f9f9;
}

/* ── Annotations (like marketing site section markers) ── */
.lp-annotation {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.lp-annotation-left {
  left: 32px;
  bottom: 20px;
  flex-direction: column;
  align-items: flex-start;
}

.lp-annotation-right {
  right: 32px;
  bottom: 20px;
  flex-direction: column;
  align-items: flex-end;
}

.lp-annotation-tick {
  width: 1px;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
  .lp-annotation {
    display: none;
  }
}

/* ── Footer ── */
.lp-footer {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

.lp-footer-copy {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.25);
}

.lp-footer-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lp-footer-version {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.3);
}

.lp-footer-sep {
  color: rgba(0, 0, 0, 0.2);
  font-size: 0.6rem;
}

.lp-footer-build {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.2);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Login Loader ──────────────────────────────────────────────────────── */

.lp-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-family: 'Outfit', system-ui, sans-serif;
  transition: opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lp-loader-out {
  opacity: 0;
  pointer-events: none;
}

/* Grid */
.lp-loader-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.lp-loader-grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lp-loader-corner {
  position: absolute;
  color: rgba(0, 0, 0, 0.18);
}

.lp-loader-corner-tl {
  top: 32px;
  left: 32px;
}

.lp-loader-corner-tr {
  top: 32px;
  right: 32px;
}

.lp-loader-corner-bl {
  bottom: 32px;
  left: 32px;
}

.lp-loader-corner-br {
  bottom: 32px;
  right: 32px;
}

/* Body */
.lp-loader-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding: 0 16px;
  width: 100%;
  max-width: 380px;
}

/* Logo */
.lp-loader-logo {
  animation: lpLoaderFadeUp 0.4s ease both;
}

.lp-loader-logo-box {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-loader-logo-box span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.lp-loader-logo-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border: 1px solid #0a0a0a;
  background: #ffffff;
  animation: lpLoaderDotBlink 0.6s ease infinite alternate;
}

@keyframes lpLoaderDotBlink {
  from {
    background: #ffffff;
  }

  to {
    background: #0a0a0a;
  }
}

/* Content */
.lp-loader-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: lpLoaderFadeUp 0.4s 0.1s ease both;
}

.lp-loader-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
}

/* Progress track */
.lp-loader-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.lp-loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #0a0a0a;
  animation: lpBarFill 1.3s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes lpBarFill {
  0% {
    width: 0%;
  }

  40% {
    width: 45%;
  }

  70% {
    width: 72%;
  }

  100% {
    width: 100%;
  }
}

.lp-loader-scan {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
  animation: lpScan 1s ease-in-out infinite;
}

@keyframes lpScan {
  from {
    left: -40%;
  }

  to {
    left: 140%;
  }
}

/* Steps */
.lp-loader-steps {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lp-loader-step {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.2);
  transition: color 0.3s;
}

.lp-loader-step.lp-loader-step-active {
  color: #0a0a0a;
}

.lp-loader-step-sep {
  font-size: 0.55rem;
  color: rgba(0, 0, 0, 0.15);
}

/* Coordinates */
.lp-loader-coords {
  display: flex;
  gap: 20px;
  animation: lpLoaderFadeUp 0.4s 0.2s ease both;
}

.lp-loader-coord-item {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.2);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

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

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

/* ─── Dark Mode — Login Page & Loader ──────────────────────────────────── */

body.theme-dark .lp-root {
  background: #0a0a0a;
  color: #f0f0f0;
}

body.theme-dark .lp-grid {
  color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .lp-grid-vline {
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.06), transparent);
}

body.theme-dark .lp-grid-hline {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent);
}

body.theme-dark .lp-corner {
  color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .lp-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.85);
}

body.theme-dark .lp-logo-box {
  border-color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .lp-logo-box-text {
  color: #f0f0f0;
}

body.theme-dark .lp-logo-box-dot {
  border-color: rgba(255, 255, 255, 0.25);
  background: #0a0a0a;
}

body.theme-dark .lp-logo-name {
  color: #f0f0f0;
}

body.theme-dark .lp-header-link {
  color: rgba(255, 255, 255, 0.4);
}

body.theme-dark .lp-header-link:hover {
  color: #f0f0f0;
}

body.theme-dark .lp-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: #141414;
  box-shadow: 8px 8px 0 rgba(255, 255, 255, 0.02);
}

body.theme-dark .lp-card-dot {
  border-color: rgba(255, 255, 255, 0.2);
  background: #0a0a0a;
}

body.theme-dark .lp-badge {
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .lp-badge-dot {
  background: #f0f0f0;
}

body.theme-dark .lp-title {
  color: #f0f0f0;
}

body.theme-dark .lp-subtitle {
  color: rgba(255, 255, 255, 0.45);
}

body.theme-dark .lp-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #f87171;
}

body.theme-dark .lp-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: #1a1a1a;
  color: #f0f0f0;
}

body.theme-dark .lp-btn:hover {
  background: #222;
  border-color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .lp-btn-arrow {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .lp-btn:hover .lp-btn-arrow {
  color: #f0f0f0;
}

body.theme-dark .lp-sep-line {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .lp-sep-text {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .lp-tg-link {
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .lp-tg-link:hover {
  color: #f0f0f0;
  border-color: rgba(255, 255, 255, 0.2);
  background: #1a1a1a;
}

body.theme-dark .lp-annotation {
  color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .lp-annotation-tick {
  background: rgba(255, 255, 255, 0.15);
}

body.theme-dark .lp-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.85);
}

body.theme-dark .lp-footer-copy {
  color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .lp-footer-version {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .lp-footer-sep {
  color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .lp-footer-build {
  color: rgba(255, 255, 255, 0.2);
}

/* Login loader */
body.theme-dark .lp-loader {
  background: #0a0a0a;
  color: #f0f0f0;
}

body.theme-dark .lp-loader-grid {
  color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .lp-loader-corner {
  color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .lp-loader-logo-box {
  border-color: rgba(255, 255, 255, 0.25);
}

body.theme-dark .lp-loader-logo-dot {
  border-color: rgba(255, 255, 255, 0.25);
  background: #0a0a0a;
}

@keyframes lpLoaderDotBlinkDark {
  from { background: #0a0a0a; }
  to   { background: #f0f0f0; }
}
body.theme-dark .lp-loader-logo-dot {
  animation-name: lpLoaderDotBlinkDark;
}

body.theme-dark .lp-loader-label {
  color: rgba(255, 255, 255, 0.35);
}

body.theme-dark .lp-loader-track {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .lp-loader-bar {
  background: #f0f0f0;
}

body.theme-dark .lp-loader-scan {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

body.theme-dark .lp-loader-step {
  color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .lp-loader-step.lp-loader-step-active {
  color: #f0f0f0;
}

body.theme-dark .lp-loader-step-sep {
  color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .lp-loader-coord-item {
  color: rgba(255, 255, 255, 0.2);
}

/* Game loader */
body.theme-dark .gl-loader {
  background: #0a0a0a;
  color: #f0f0f0;
}

body.theme-dark .gl-loader-grid {
  color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .gl-corner {
  color: rgba(255, 255, 255, 0.12);
}

body.theme-dark .gl-loader-logo-box {
  border-color: rgba(255, 255, 255, 0.45);
}

body.theme-dark .gl-loader-logo-dot {
  border-color: rgba(255, 255, 255, 0.45);
  background: #0a0a0a;
}

@keyframes glDotBlinkDark {
  from { background: #0a0a0a; }
  to   { background: #f0f0f0; }
}

body.theme-dark .gl-loader-logo-dot {
  animation-name: glDotBlinkDark;
}

body.theme-dark .gl-loader-label {
  color: rgba(255, 255, 255, 0.4);
}

body.theme-dark .gl-loader-track {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .gl-loader-bar {
  background: #f0f0f0;
}

body.theme-dark .gl-loader-scan {
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.12), transparent);
}

body.theme-dark .gl-step {
  color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .gl-step.gl-step-active {
  color: #f0f0f0;
}

body.theme-dark .gl-step-sep {
  color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .gl-coord {
  color: rgba(255, 255, 255, 0.2);
}

/* ─── Game Architectural Loader (.gl-loader-*) ─────────────────────────── */

.gl-loader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
  font-family: 'Outfit', system-ui, sans-serif;
  transition: opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gl-loader-out {
  opacity: 0;
  pointer-events: none;
}

.gl-loader-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.gl-loader-grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gl-corner {
  position: absolute;
  color: rgba(0, 0, 0, 0.18);
}

.gl-corner-tl {
  top: 32px;
  left: 32px;
}

.gl-corner-tr {
  top: 32px;
  right: 32px;
}

.gl-corner-bl {
  bottom: 32px;
  left: 32px;
}

.gl-corner-br {
  bottom: 32px;
  right: 32px;
}

.gl-loader-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  padding: 0 16px;
  width: 100%;
  max-width: 380px;
}

.gl-loader-logo {
  animation: glFadeUp 0.4s ease both;
}

.gl-loader-logo-box {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gl-loader-logo-box span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.gl-loader-logo-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 6px;
  height: 6px;
  border: 1px solid #0a0a0a;
  background: #ffffff;
  animation: glDotBlink 0.6s ease infinite alternate;
}

@keyframes glDotBlink {
  from {
    background: #ffffff;
  }

  to {
    background: #0a0a0a;
  }
}

.gl-loader-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  animation: glFadeUp 0.4s 0.1s ease both;
}

.gl-loader-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
}

.gl-loader-track {
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.gl-loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #0a0a0a;
  animation: glBarFill 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes glBarFill {
  0% {
    width: 0%;
  }

  30% {
    width: 35%;
  }

  65% {
    width: 70%;
  }

  100% {
    width: 100%;
  }
}

.gl-loader-scan {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
  animation: glScan 1s ease-in-out infinite;
}

@keyframes glScan {
  from {
    left: -40%;
  }

  to {
    left: 140%;
  }
}

.gl-loader-steps {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gl-step {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.2);
  transition: color 0.3s;
}

.gl-step.gl-step-active {
  color: #0a0a0a;
}

.gl-step-sep {
  font-size: 0.55rem;
  color: rgba(0, 0, 0, 0.15);
}

.gl-loader-coords {
  display: flex;
  gap: 20px;
  animation: glFadeUp 0.4s 0.2s ease both;
}

.gl-coord {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.2);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
}

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

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

/* ─── Desktop Phone Frame ────────────────────────────────────────── */

/* Default (login / mobile): all wrappers transparent */
.ds-bg {
  display: contents;
}

.pf-frame {
  display: contents;
}

.pf-btn {
  display: none;
}

.pf-inner {
  display: contents;
}

.pf-status {
  display: none;
}

.pf-chin {
  display: none;
}

.pf-screen {
  display: contents;
}

.ds-panel {
  display: none;
}

.ds-deco {
  display: none;
}

.ds-topbar {
  display: none;
}

.ds-footer {
  display: none;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Custom scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-color, rgba(0,0,0,0.18));
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:active {
  background: var(--accent-color, rgba(0,0,0,0.35));
}
body.theme-dark ::-webkit-scrollbar-thumb {
  background: var(--accent-color, rgba(255,255,255,0.18));
}
body.theme-dark ::-webkit-scrollbar-thumb:active {
  background: var(--accent-color, rgba(255,255,255,0.35));
}

/* ── Game mode on desktop ─────────────────────────────────────────────────── */
@media (min-width: 1024px) {

  body.mode-game {
    overflow: hidden;
    background: #f0f0f0;
    height: 100dvh;
  }

  /* Decorative background layer — same as login page */
  body.mode-game .ds-deco {
    display: block;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    color: rgba(0, 0, 0, 0.06);
    overflow: hidden;
  }

  .ds-deco-grid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .ds-deco-vline {
    position: absolute;
    width: 1px;
    background: rgba(0, 0, 0, 0.08);
  }

  .ds-deco-vline-l {
    left: 32px;
    top: 92px;
    bottom: 92px;
  }

  .ds-deco-vline-r {
    right: 32px;
    top: 92px;
    bottom: 92px;
  }

  .ds-deco-hline {
    position: absolute;
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
  }

  .ds-deco-hline-t {
    top: 32px;
    left: 92px;
    right: 92px;
  }

  .ds-deco-hline-b {
    bottom: 32px;
    left: 92px;
    right: 92px;
  }

  .ds-corner {
    position: absolute;
    color: rgba(0, 0, 0, 0.18);
  }

  .ds-corner-tl {
    top: 32px;
    left: 32px;
  }

  .ds-corner-tr {
    top: 32px;
    right: 32px;
  }

  .ds-corner-bl {
    bottom: 32px;
    left: 32px;
  }

  .ds-corner-br {
    bottom: 32px;
    right: 32px;
  }

  .ds-ann {
    position: absolute;
    display: flex;
    gap: 6px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.2);
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .ds-ann-bl {
    left: 32px;
    bottom: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .ds-ann-br {
    right: 32px;
    bottom: 20px;
    flex-direction: column;
    align-items: flex-end;
  }

  .ds-ann-tick {
    width: 1px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
  }

  .ds-ann-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.08em;
  }

  .ds-ann-dim {
    color: rgba(0, 0, 0, 0.12);
  }

  /* Top header bar */
  body.mode-game .ds-topbar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 54px;
    z-index: 2;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(240, 240, 240, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .ds-topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ds-topbar-logo-box {
    position: relative;
    width: 32px;
    height: 32px;
    border: 1px solid #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ds-topbar-logo-box span {
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    font-family: 'Outfit', system-ui, sans-serif;
    color: #0a0a0a;
  }

  .ds-topbar-logo-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 6px;
    height: 6px;
    border: 1px solid #0a0a0a;
    background: #0a0a0a;
  }

  .ds-topbar-name {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0a0a0a;
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .ds-topbar-link {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
    font-family: 'Outfit', system-ui, sans-serif;
    transition: color 0.2s;
  }

  .ds-topbar-link:hover {
    color: #0a0a0a;
  }

  /* Shell: phone always perfectly centered */
  body.mode-game .ds-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100dvh;
    box-sizing: border-box;
    padding: 54px 0 44px;
    /* topbar + footer */
    position: relative;
    z-index: 1;
  }

  /* Footer bar — same as lp-footer */
  body.mode-game .ds-footer {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 44px;
    z-index: 2;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(240, 240, 240, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .ds-footer-copy {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.25);
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .ds-footer-meta {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .ds-footer-version {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.3);
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .ds-footer-sep {
    color: rgba(0, 0, 0, 0.2);
    font-size: 0.6rem;
  }

  .ds-footer-build {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(0, 0, 0, 0.2);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
  }



  /* Phone frame */
  body.mode-game .pf-frame {
    display: block;
    position: relative;
    flex-shrink: 0;
    width: 393px;
    background: var(--pf-case-color, #f0f0f0);
    border-radius: 54px;
    padding: 14px;
    box-shadow:
      0 0 0 1px rgba(0,0,0,0.1),
      0 0 0 2px rgba(0,0,0,0.06),
      0 32px 80px rgba(0, 0, 0, 0.18),
      0 8px 24px rgba(0, 0, 0, 0.1);
    transition: background 0.25s ease;
  }

  body.mode-game .pf-btn {
    display: block;
    position: absolute;
    background: var(--pf-btn-color, #c8c8c8);
    transition: background 0.25s ease;
  }

  body.mode-game .pf-vol-up {
    left: -3px;
    top: 118px;
    width: 3px;
    height: 36px;
    border-radius: 2px 0 0 2px;
  }

  body.mode-game .pf-vol-dn {
    left: -3px;
    top: 168px;
    width: 3px;
    height: 36px;
    border-radius: 2px 0 0 2px;
  }

  body.mode-game .pf-power {
    right: -3px;
    top: 148px;
    width: 3px;
    height: 64px;
    border-radius: 0 2px 2px 0;
  }

  body.mode-game .pf-inner {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 42px;
    overflow: hidden;
    height: 832px;
  }

  body.mode-game .pf-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 54px;
    padding: 0 24px 0 28px;
    flex-shrink: 0;
    position: relative;
  }

  .pf-time {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0a0a0a;
  }

  .pf-island {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    width: 120px;
    height: 34px;
    background: #0a0a0a;
    border-radius: 20px;
  }

  .pf-status-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #0a0a0a;
  }

  .pf-battery {
    width: 22px;
    height: 11px;
    border: 1.5px solid #0a0a0a;
    border-radius: 2px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 1.5px;
    box-sizing: border-box;
  }

  .pf-battery::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 6px;
    background: #0a0a0a;
    border-radius: 0 1px 1px 0;
  }

  .pf-battery-fill {
    height: 100%;
    width: 75%;
    background: #0a0a0a;
    border-radius: 1px;
  }

  /* Screen captures all position:fixed overlays */
  body.mode-game .pf-screen {
    display: block;
    flex: 1;
    overflow: hidden;
    transform: translateZ(0);
    position: relative;
  }

  body.mode-game #app {
    width: 100%;
    height: 100%;
    min-height: unset;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mode-game .pf-chin {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    flex-shrink: 0;
  }

  .pf-home-bar {
    width: 134px;
    height: 5px;
    background: #0a0a0a;
    border-radius: 3px;
    opacity: 0.2;
  }
}

/* ── Dark mode for desktop game wrapper ────────────────────────────────── */
@media (min-width: 1024px) {
  body.mode-game.theme-dark {
    background: #111111;
  }

  body.mode-game.theme-dark .ds-topbar {
    background: rgba(17, 17, 17, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  body.mode-game.theme-dark .ds-topbar-logo-box {
    border-color: rgba(255, 255, 255, 0.6);
  }

  body.mode-game.theme-dark .ds-topbar-logo-box span,
  body.mode-game.theme-dark .ds-topbar-name {
    color: #f0f0f0;
  }

  body.mode-game.theme-dark .ds-topbar-logo-dot {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.6);
  }

  body.mode-game.theme-dark .ds-topbar-link {
    color: rgba(255, 255, 255, 0.4);
  }

  body.mode-game.theme-dark .ds-topbar-link:hover {
    color: #f0f0f0;
  }

  body.mode-game.theme-dark .ds-footer {
    background: rgba(17, 17, 17, 0.9);
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  body.mode-game.theme-dark .ds-footer-copy,
  body.mode-game.theme-dark .ds-footer-version,
  body.mode-game.theme-dark .ds-footer-build,
  body.mode-game.theme-dark .ds-footer-sep {
    color: rgba(255, 255, 255, 0.25);
  }

  body.mode-game.theme-dark .ds-deco {
    color: rgba(255, 255, 255, 0.04);
  }

  body.mode-game.theme-dark .ds-deco-vline,
  body.mode-game.theme-dark .ds-deco-hline {
    background: rgba(255, 255, 255, 0.06);
  }

  body.mode-game.theme-dark .pf-inner {
    background: #0a0a0a;
  }

  body.mode-game.theme-dark .pf-time {
    color: #f0f0f0;
  }

  body.mode-game.theme-dark .pf-status-icons {
    color: #f0f0f0;
  }

  body.mode-game.theme-dark .pf-battery {
    border-color: #f0f0f0;
  }

  body.mode-game.theme-dark .pf-battery::after {
    background: #f0f0f0;
  }

  body.mode-game.theme-dark .pf-battery-fill {
    background: #f0f0f0;
  }

  body.mode-game.theme-dark .pf-home-bar {
    background: #f0f0f0;
  }
}

/* Scale dynamically on shorter screens */
@media (min-width: 1024px) and (max-height: 980px) {
  body.mode-game .pf-frame {
    transform: scale(0.85);
    transform-origin: center center;
  }
}
@media (min-width: 1024px) and (max-height: 850px) {
  body.mode-game .pf-frame {
    transform: scale(0.75);
    transform-origin: center center;
  }
}
@media (min-width: 1024px) and (max-height: 750px) {
  body.mode-game .pf-frame {
    transform: scale(0.65);
    transform-origin: center center;
  }
}
@media (min-width: 1024px) and (max-height: 650px) {
  body.mode-game .pf-frame {
    transform: scale(0.55);
    transform-origin: center center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE — Game UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Backgrounds ─────────────────────────────────────────────────────────── */
body.theme-dark .game-view {
  background-color: #0d0d12;
}
body.theme-dark .game-view::before,
body.theme-dark .game-view::after {
  background: #131320;
}
body.theme-dark .earn-page-wrapper {
  background-color: #0d0d12;
}
body.theme-dark .earn-view::before,
body.theme-dark .earn-view::after {
  background: #131320;
}
body.theme-dark .tasks-page-wrapper {
  background-color: #0d0d12;
}
body.theme-dark .tasks-view::before,
body.theme-dark .tasks-view::after {
  background: #131320;
}
body.theme-dark .airdrop-page-wrapper {
  background-color: #0d0d12;
}
body.theme-dark .airdrop-view::before,
body.theme-dark .airdrop-view::after {
  background: #131320;
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
body.theme-dark .settings-btn {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .settings-btn:hover {
  background: #22223a;
}

/* ── Game header ─────────────────────────────────────────────────────────── */
body.theme-dark .game-header {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
body.theme-dark .user-name {
  color: #f0f0f0;
}
body.theme-dark .profit-info {
  background: rgba(139, 92, 246, 0.12);
}
body.theme-dark .profit-label {
  color: rgba(167, 139, 250, 0.7);
}

/* ── Score + coins ───────────────────────────────────────────────────────── */
body.theme-dark .coin-display {
  background: #1a1a2a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
body.theme-dark .score-display {
  color: #f0f0f0;
}
body.theme-dark .total-coins-label {
  color: rgba(167, 139, 250, 0.7);
}

/* ── Energy ──────────────────────────────────────────────────────────────── */
body.theme-dark .energy-label {
  color: #f0f0f0;
}
body.theme-dark .energy-bar-bg {
  background: rgba(139, 92, 246, 0.12);
  box-shadow: none;
}

/* ── Bottom navbar ───────────────────────────────────────────────────────── */
body.theme-dark .bottom-navbar {
  background: rgba(18, 18, 30, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.04), 0 -8px 32px rgba(0, 0, 0, 0.4);
}
body.theme-dark .nav-item {
  color: rgba(255, 255, 255, 0.22);
}
body.theme-dark .nav-item.active {
  background: rgba(139, 92, 246, 0.12);
}

/* ── Hardware / Earn cards ───────────────────────────────────────────────── */
body.theme-dark .hardware-item {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
body.theme-dark .hw-name {
  color: #f0f0f0;
}
body.theme-dark .hardware-title {
  color: #f0f0f0;
}
body.theme-dark .hw-icon-wrapper {
  background: rgba(139, 92, 246, 0.15);
}
body.theme-dark .upgrade-mini-card {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
body.theme-dark .umc-name {
  color: #f0f0f0;
}
body.theme-dark .umc-level {
  color: rgba(255, 255, 255, 0.28);
}
body.theme-dark .umc-buy.locked-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
}

/* ── Earn page ───────────────────────────────────────────────────────────── */
body.theme-dark .earn-amount {
  color: #f0f0f0;
}
body.theme-dark .wallet-icon-wrapper {
  background: rgba(139, 92, 246, 0.15);
}
body.theme-dark .earn-tab {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
}
body.theme-dark .earn-tab.active {
  background: var(--accent-color, var(--purple-primary));
  border-color: var(--accent-color, var(--purple-primary));
  color: white;
}

/* ── Tasks page ──────────────────────────────────────────────────────────── */
body.theme-dark .tasks-title-text h1 {
  color: #f0f0f0;
}
body.theme-dark .tasks-title-text p {
  color: rgba(255, 255, 255, 0.4);
}
body.theme-dark .section-header h2 {
  color: #f0f0f0;
}
body.theme-dark .task-card {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
body.theme-dark .task-name {
  color: #f0f0f0;
}
body.theme-dark .progress-bar-container {
  background: rgba(255, 255, 255, 0.08);
}
body.theme-dark .checkin-days .day {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.3);
}
body.theme-dark .checkin-days .day.current {
  background: rgba(139, 92, 246, 0.2);
  color: var(--purple-neon);
  border-color: rgba(139, 92, 246, 0.4);
}
body.theme-dark .invite-card .task-progress-text {
  color: rgba(255, 255, 255, 0.6);
}
body.theme-dark .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f0f0f0;
}
body.theme-dark .btn-secondary.tinted-purple {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-neon);
}
body.theme-dark .btn-icon-soft {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}
body.theme-dark .bg-light-purple { background: rgba(139, 92, 246, 0.15); }
body.theme-dark .bg-light-orange { background: rgba(245, 158, 11, 0.15); }
body.theme-dark .bg-light-blue   { background: rgba(59, 130, 246, 0.15); }
body.theme-dark .bg-light-gray   { background: rgba(255, 255, 255, 0.08); }
body.theme-dark .bg-light-indigo { background: rgba(99, 102, 241, 0.15); }
body.theme-dark .bg-light-pink   { background: rgba(236, 72, 153, 0.15); }

/* ── Airdrop page ────────────────────────────────────────────────────────── */
body.theme-dark .airdrop-title-text h1 {
  color: #f0f0f0;
}
body.theme-dark .airdrop-title-text p {
  color: rgba(255, 255, 255, 0.4);
}
body.theme-dark .airdrop-card {
  background: #1a1a2a;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
body.theme-dark .spot-text h2 {
  color: #f0f0f0;
}
body.theme-dark .spot-text p {
  color: rgba(255, 255, 255, 0.4);
}
body.theme-dark .timeline-line {
  background: rgba(255, 255, 255, 0.1);
}
body.theme-dark .phase-content h3 {
  color: #f0f0f0;
}
body.theme-dark .text-green h3 { color: #22c55e; }
body.theme-dark .text-purple h3 { color: var(--purple-neon); }
body.theme-dark .text-gray h3 { color: rgba(255, 255, 255, 0.35); }
body.theme-dark .phase-content p {
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
body.theme-dark .phase-icon.icon-dashed {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
}
body.theme-dark .phase-icon.icon-gray {
  background: rgba(255, 255, 255, 0.08);
}
body.theme-dark .airdrop-eligibility .progress-bar-container {
  background: rgba(139, 92, 246, 0.15);
}
body.theme-dark .airdrop-title-icon {
  background: rgba(139, 92, 246, 0.15);
}

/* ── Settings modal ──────────────────────────────────────────────────────── */
body.theme-dark .settings-sheet {
  background: #1a1a2a;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
body.theme-dark .settings-sheet-handle {
  background: rgba(255, 255, 255, 0.12);
}
body.theme-dark .settings-sheet-title {
  color: #f0f0f0;
}
body.theme-dark .settings-close-btn {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}
body.theme-dark .settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}
body.theme-dark .settings-section-label {
  color: rgba(167, 139, 250, 0.7);
}
body.theme-dark .settings-info-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}
body.theme-dark .settings-info-icon {
  background: rgba(139, 92, 246, 0.15);
}
body.theme-dark .settings-info-title {
  color: rgba(255, 255, 255, 0.35);
}
body.theme-dark .settings-info-value {
  color: #f0f0f0;
}
body.theme-dark .settings-copy-btn {
  background: rgba(139, 92, 246, 0.15);
}
body.theme-dark .settings-copy-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}
body.theme-dark .settings-slider-container {
  background: rgba(255, 255, 255, 0.04);
}
body.theme-dark .settings-slider-header {
  color: #f0f0f0;
}
body.theme-dark .styled-slider {
  background: rgba(255, 255, 255, 0.12);
}
body.theme-dark .slider-labels {
  color: rgba(255, 255, 255, 0.3);
}
body.theme-dark .settings-delete-btn {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
body.theme-dark .settings-delete-btn:hover {
  background: rgba(239, 68, 68, 0.14);
}
body.theme-dark .delete-confirm-box {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.2);
}
body.theme-dark .delete-confirm-box p {
  color: rgba(255, 255, 255, 0.6);
}
body.theme-dark .btn-cancel-delete {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS MODAL — New Full-Featured Panel
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Sheet body ─────────────────────────────────────────────────────────── */
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 2px 28px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── Profile card ───────────────────────────────────────────────────────── */
.settings-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f9fafb;
  border: 1px solid #f0f0f5;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.settings-avatar-frame {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.settings-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.settings-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  color: #fff;
}

.settings-avatar-frame:hover .settings-avatar-overlay {
  opacity: 1;
}

.settings-profile-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-profile-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-profile-name {
  font-size: 1rem;
  font-weight: 800;
  color: #1e1e24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.settings-profile-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--purple-light, #f1ecfc);
  color: var(--purple-primary, #8b5cf6);
  border: none;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.settings-profile-edit-btn:hover {
  background: #e4d9f9;
}

.settings-profile-rank {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-primary, #8b5cf6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-change-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--purple-primary, #8b5cf6);
  cursor: pointer;
  width: fit-content;
  transition: background 0.15s;
}

.settings-change-photo-btn:hover {
  background: var(--purple-light, #f1ecfc);
}

/* ── Name edit row ──────────────────────────────────────────────────────── */
.settings-name-edit-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.settings-name-input {
  flex: 1;
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: #1e1e24;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.settings-name-input:focus {
  border-color: var(--accent-color, #8b5cf6);
}

.settings-name-save-btn {
  background: var(--accent-color, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.settings-name-save-btn:hover {
  opacity: 0.88;
}

/* ── Language row ───────────────────────────────────────────────────────── */
.settings-lang-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.settings-lang-btn {
  flex: 1;
  min-width: 44px;
  padding: 9px 6px;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.settings-lang-btn:hover {
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--purple-primary, #8b5cf6);
  background: var(--purple-light, #f1ecfc);
}

.settings-lang-btn.active {
  background: var(--accent-color, #8b5cf6);
  border-color: var(--accent-color, #8b5cf6);
  color: #fff;
}

/* ── Preferences card ───────────────────────────────────────────────────── */
.settings-pref-card {
  background: #f9fafb;
  border: 1px solid #f0f0f5;
  border-radius: 16px;
  padding: 14px 16px 12px;
  margin-bottom: 8px;
}

.settings-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.settings-pref-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
}

.settings-pref-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple-primary, #8b5cf6);
  background: var(--purple-light, #f1ecfc);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ── Range slider ───────────────────────────────────────────────────────── */
.settings-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  outline: none;
  cursor: pointer;
}

.settings-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color, #8b5cf6);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.settings-range::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.settings-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-color, #8b5cf6);
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.settings-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #9ca3af;
}

/* ── Toggle row ─────────────────────────────────────────────────────────── */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f9fafb;
  border: 1px solid #f0f0f5;
  border-radius: 16px;
  padding: 13px 16px;
  margin-bottom: 8px;
}

/* ── Toggle switch ──────────────────────────────────────────────────────── */
.settings-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.settings-switch-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 13px;
  transition: background 0.25s;
}

.settings-switch-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.settings-switch input:checked + .settings-switch-slider {
  background: var(--accent-color, #8b5cf6);
}

.settings-switch input:checked + .settings-switch-slider::before {
  transform: translateX(18px);
}

/* ── Case color card ────────────────────────────────────────────────────── */
.settings-case-card {
  background: #f9fafb;
  border: 1px solid #f0f0f5;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
}

.settings-case-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-color-wheel {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  cursor: crosshair;
  flex-shrink: 0;
  touch-action: none;
}

.settings-case-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-case-preview {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  transition: background 0.15s;
}

.settings-lightness-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.settings-lightness-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE — New Settings Panel Elements
   ═══════════════════════════════════════════════════════════════════════════ */

body.theme-dark .settings-profile-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .settings-profile-name {
  color: #f0f0f0;
}

body.theme-dark .settings-profile-edit-btn {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-neon, #a78bfa);
}

body.theme-dark .settings-profile-edit-btn:hover {
  background: rgba(139, 92, 246, 0.25);
}

body.theme-dark .settings-change-photo-btn {
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--purple-neon, #a78bfa);
}

body.theme-dark .settings-change-photo-btn:hover {
  background: rgba(139, 92, 246, 0.12);
}

body.theme-dark .settings-name-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  color: #f0f0f0;
}

body.theme-dark .settings-name-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .settings-lang-btn {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
}

body.theme-dark .settings-lang-btn:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--purple-neon, #a78bfa);
}

body.theme-dark .settings-pref-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .settings-pref-label {
  color: rgba(255, 255, 255, 0.75);
}

body.theme-dark .settings-pref-value {
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple-neon, #a78bfa);
}

body.theme-dark .settings-range {
  background: rgba(255, 255, 255, 0.12);
}

body.theme-dark .settings-range-labels {
  color: rgba(255, 255, 255, 0.3);
}

body.theme-dark .settings-toggle-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .settings-switch-slider {
  background: rgba(255, 255, 255, 0.15);
}

body.theme-dark .settings-case-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .settings-case-preview {
  border-color: rgba(255, 255, 255, 0.1);
}

body.theme-dark .settings-lightness-label {
  color: rgba(255, 255, 255, 0.35);
}