/* =============================================
   CRYPTOBOT STYLE — CLEAN & MINIMAL
   ============================================= */

/* GLOBAL SMOOTHING */
*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  scroll-behavior: smooth;
}

:root {
  /* Colors */
  --bg: #0e0e0e;
  --bg-secondary: #1c1c1e;
  --bg-tertiary: #2c2c2e;
  --bg-primary: var(--bg);
  --bg-card: var(--bg-secondary);

  /* RGB versions for rgba() */
  --bg-rgb: 14, 14, 14;
  --bg-secondary-rgb: 28, 28, 30;
  --bg-tertiary-rgb: 44, 44, 46;

  --text: #ffffff;
  --text-secondary: #8e8e93;
  --text-tertiary: #636366;

  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --accent-glow: rgba(0, 122, 255, 0.4);
  --accent-light: rgba(0, 122, 255, 0.08);
  --accent-rgb: 0, 122, 255;

  --green: #30d158;
  --green-soft: rgba(48, 209, 88, 0.12);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.12);
  --orange: #ff9f0a;
  --orange-soft: rgba(255, 159, 10, 0.12);

  --border: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.05);

  /* Radius system */
  --radius-s: 12px;
  --radius-m: 16px;
  --radius-l: 22px;
  --radius-xl: 28px;
  --radius-2xl: 24px;
  --radius-3xl: 40px;
  --radius-full: 100px;

  /* Layout */
  --nav-height: 68px;
  --header-height: 60px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* Blur system */
  --blur-sm: 8px;
  --blur-md: 20px;
  --blur-lg: 40px;
  --blur-xl: 80px;

  /* Shadow system */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.2);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5), 0 8px 16px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 20px rgba(0, 122, 255, 0.3);

  /* Glassmorphism */
  --glass-bg: rgba(28, 28, 30, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(40px);
  --glass-highlight: inset 0 0.5px 0 rgba(255, 255, 255, 0.1);

  /* Neumorphism */
  --neu-light: rgba(255, 255, 255, 0.05);
  --neu-dark: rgba(0, 0, 0, 0.4);
  --neu-inset-light: inset 2px 2px 4px rgba(255, 255, 255, 0.03);
  --neu-inset-dark: inset -2px -2px 4px rgba(0, 0, 0, 0.3);

  /* Spacing */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  /* Typography */
  --font-xs: 11px;
  --font-s: 13px;
  --font-m: 15px;
  --font-l: 17px;
  --font-xl: 20px;
  --font-2xl: 28px;
  --font-3xl: 36px;
  --font-4xl: 42px;

  /* Animation easings */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-modal: cubic-bezier(0.32, 0.72, 0, 1);

  /* Animation durations */
  --duration-fast: 0.15s;
  --duration-normal: 0.25s;
  --duration-slow: 0.4s;
  --duration-page: 0.35s;

  /* Theme-overridable */
  --card-glass-opacity: 0.6;
  --card-glass-blur: var(--blur-md);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--bg-primary, var(--bg));
  font-family: 'Inter', -apple-system, 'SF Pro Display', BlinkMacSystemFont, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, .page, .card, .btn, .input, .chip {
  transition: opacity 0.15s ease;
}

::-webkit-scrollbar { width: 0; }
input, button { font-family: inherit; outline: none; border: none; }

/* === SPLASH === */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.4s, visibility 0.4s;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
}
.splash-icon {
  font-size: 64px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.splash-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.splash-loader {
  width: 120px;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}
.splash-loader::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 10px;
  animation: loading 1s ease-in-out infinite;
}
@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* === APP === */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.app.hidden { display: none; }
.hidden { display: none !important; }

/* === HEADER === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  padding-inline: var(--space-l);
  background: rgba(var(--bg-rgb), 0.72);
  backdrop-filter: blur(var(--blur-lg)) saturate(1.8);
  -webkit-backdrop-filter: blur(var(--blur-lg)) saturate(1.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}
.header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.3);
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-name {
  font-size: var(--font-l);
  font-weight: 600;
}
.header-right {
  display: flex;
  gap: var(--space-s);
}
.header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring), background var(--duration-fast);
}
.header-btn:active {
  transform: scale(0.88);
  background: var(--bg-tertiary);
}
.header-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* === PAGES === */
.pages {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  overflow-y: auto;
}
.page {
  animation: pageEnter var(--duration-page) var(--ease-out-expo);
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes pageExit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(var(--bg-rgb), 0.65);
  backdrop-filter: blur(var(--blur-xl)) saturate(1.8);
  -webkit-backdrop-filter: blur(var(--blur-xl)) saturate(1.8);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-sizing: border-box;
  overflow: visible;
  width: 100%;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  flex-shrink: 1;
  min-width: 0;

  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: color var(--duration-normal), transform var(--duration-fast) var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-item:active {
  transform: scale(0.88);
}
.nav-item.active {
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
}
.nav-item svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.nav-item .nav-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: opacity var(--duration-fast) ease;
  filter: brightness(0) saturate(100%) invert(55%);
  opacity: 0;
}
.nav-item .nav-icon.loaded {
  opacity: 1;
  transition-delay: 0s;
}
.nav-item.active .nav-icon {
  filter: none;
}
.nav-item.active .nav-icon.loaded {
  filter: none;
  opacity: 1;
}
.nav-item span {
  font-size: var(--font-xs);
  font-weight: 500;
}

/* === NAVBAR ICON CSS ANIMATIONS (NO GIF) === */
.nav-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

/* Settings: smooth rotation */
@keyframes nav-rotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.nav-icon-wrapper.anim-rotate {
  animation: nav-rotate 0.7s ease-in-out 1;
}

/* Home: gentle pulse */
@keyframes nav-bounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.nav-icon-wrapper.anim-bounce {
  animation: nav-bounce 0.5s ease-in-out 1;
}

/* History: rotate 360 */
.nav-icon-wrapper.anim-rotate {
  animation: nav-rotate 0.7s ease-in-out 1;
}

/* Checks: SVG draw animation */
.nav-icon-svg-check {
  width: 24px;
  height: 24px;
  display: block;
  opacity: 1 !important;
  filter: none !important;
}
.nav-icon-svg-check .nav-check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s ease-out;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item .nav-icon-svg-check .nav-check-path {
  stroke: #8e8e93;
}
.nav-item.active .nav-icon-svg-check .nav-check-path {
  stroke: #000;
}
.nav-icon-wrapper.anim-check .nav-check-path {
  animation: nav-check-draw 0.5s ease-out forwards;
}
@keyframes nav-check-draw {
  0%   { stroke-dashoffset: 30; }
  100% { stroke-dashoffset: 0; }
}

/* === BALANCE CARD === */
.balance-card {
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-md), var(--glass-highlight);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
}
.balance-label {
  font-size: var(--font-s);
  color: var(--text-secondary);
  margin-bottom: var(--space-s);
}
.balance-amount {
  font-size: var(--font-4xl);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: var(--space-xs);
}
.balance-change {
  font-size: 14px;
  color: var(--text-secondary);
}
.balance-change.up { color: var(--green); }
.balance-change.down { color: var(--red); }

/* === ACTIONS === */
.actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  padding: 0 4px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-m) var(--space-s);
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border-radius: var(--radius-xl);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring), background var(--duration-fast), box-shadow var(--duration-fast);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-sm), var(--glass-highlight);
}

.action-btn:active {
  transform: scale(0.9);
  background: var(--bg-tertiary);
}

.action-btn.primary {
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.8));
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.35), var(--glass-highlight);
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.action-btn.primary .action-icon {
  background: rgba(255,255,255,0.2);
}

.action-label {
  font-size: var(--font-xs);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* === SECTION === */
.section {
  margin-bottom: 24px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
}
.section-link {
  font-size: 14px;
  color: var(--accent);
  background: none;
  cursor: pointer;
}

/* === COIN LIST === */
.coin-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.coin-item {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: 14px;
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}
.coin-item:active {
  background: var(--bg-tertiary);
  transform: scale(0.97);
}
.coin-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.coin-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.coin-info {
  flex: 1;
  min-width: 0;
}
.coin-name {
  font-size: 15px;
  font-weight: 600;
}
.coin-ticker {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.coin-balance {
  text-align: right;
}
.coin-amount {
  font-size: 15px;
  font-weight: 600;
}
.coin-value {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* === INPUTS === */
.input-group {
  margin-bottom: var(--space-l);
}
.input-label {
  font-size: var(--font-s);
  color: var(--text-secondary);
  margin-bottom: var(--space-s);
  display: block;
}
.input {
  width: 100%;
  padding: 14px var(--space-l);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-l);
  color: var(--text);
  font-size: 16px;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
  box-shadow: var(--neu-inset-dark), var(--neu-inset-light);
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--neu-inset-dark);
}
.input::placeholder {
  color: var(--text-tertiary);
}
.input-big {
  font-size: var(--font-3xl);
  font-weight: 800;
  text-align: center;
  background: transparent;
  border: none;
  padding: var(--space-xl);
}

/* === BUTTONS === */
.btn {
  width: 100%;
  padding: 18px;
  border-radius: var(--radius-l);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  transition: transform var(--duration-fast) var(--ease-spring), opacity var(--duration-fast), box-shadow var(--duration-normal);
  box-shadow: var(--shadow-sm);
}
.btn:active {
  transform: scale(0.96);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.85));
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-secondary {
  background: rgba(var(--bg-secondary-rgb), 0.7);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-danger {
  background: var(--red-soft);
  color: var(--red);
}
.btn-success {
  background: var(--green-soft);
  color: var(--green);
}
.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  color: var(--text);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
}

/* === CARDS === */
.card {
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  padding: var(--space-l);
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md), var(--glass-highlight);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-amount {
  font-size: 18px;
  font-weight: 700;
}
.card-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.card-status.active { background: var(--green-soft); color: var(--green); }
.card-status.pending { background: var(--orange-soft); color: var(--orange); }
.card-status.expired { background: var(--red-soft); color: var(--red); }
.card-meta {
  font-size: 13px;
  color: var(--text-secondary);
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.card-actions .btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

/* === TRANSACTION LIST === */
.tx-list {
  display: flex;
  flex-direction: column;
}
.tx-date-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s ease;
}
.tx-item:last-child {
  border-bottom: none;
}
.tx-item:active {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-s);
}
.tx-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tx-icon.in { background: var(--green-soft); }
.tx-icon.out { background: var(--red-soft); }
.tx-info {
  flex: 1;
  min-width: 0;
}
.tx-title {
  font-size: 15px;
  font-weight: 600;
}
.tx-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-amount {
  text-align: right;
}
.tx-value {
  font-size: 15px;
  font-weight: 600;
}
.tx-value.in { color: var(--green); }
.tx-value.out { color: var(--red); }
.tx-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* === QR === */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}
.qr-box {
  background: #fff;
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
}
.address-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: 14px var(--space-l);
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-l);
  margin-bottom: var(--space-m);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
}
.address-text {
  flex: 1;
  font-family: monospace;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.5;
}
.copy-btn {
  padding: 10px 16px;
  background: var(--accent);
  border-radius: var(--radius-s);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}
.copy-btn:active {
  transform: scale(0.95);
}

/* === MODAL === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity var(--duration-normal), visibility var(--duration-normal);
}
.modal.hidden {
  opacity: 0;
  visibility: hidden;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
}
.modal-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  background: rgba(var(--bg-secondary-rgb), 0.85);
  backdrop-filter: blur(var(--blur-xl)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--blur-xl)) saturate(1.5);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  padding: 12px 20px 24px;
  padding-bottom: calc(24px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-modal);
  overflow-y: auto;
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4), var(--glass-highlight);
}
.modal:not(.hidden) .modal-sheet {
  transform: translateY(0);
}
.modal-handle {
  width: 40px;
  height: 5px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  margin: 0 auto var(--space-l);
}
.modal-title {
  font-size: var(--font-xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* === THEMES MODAL (scrollable) === */
.themes-modal-body {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}

/* Hide duplicate modal handle inside themes modal */
.modal:has(.themes-modal-body) .modal-handle {
  display: none !important;
}

.themes-modal-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* === TOAST === */
.toasts {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: var(--space-l);
  right: var(--space-l);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  pointer-events: none;
}
.toast {
  padding: 14px var(--space-l);
  border-radius: var(--radius-l);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  backdrop-filter: blur(var(--blur-md));
  -webkit-backdrop-filter: blur(var(--blur-md));
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.4s var(--ease-spring);
}
.toast.success { background: rgba(48, 209, 88, 0.85); color: #fff; }
.toast.error { background: rgba(255, 69, 58, 0.85); color: #fff; }
.toast.info { background: rgba(0, 122, 255, 0.85); color: #fff; }
.toast.hide { animation: toastOut 0.25s ease forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* === SETTINGS === */
.settings-group {
  margin-bottom: var(--space-2xl);
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm), var(--glass-highlight);
  overflow: hidden;
}
.settings-title {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-s);
  padding-left: 16px;
  padding-right: 16px;
}
.settings-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--space-l);
  background: transparent;
  cursor: pointer;
  transition: background var(--duration-fast), transform var(--duration-fast) var(--ease-spring);
}
.settings-item:first-of-type {
  border-radius: 0;
}
.settings-item:last-of-type {
  border-radius: 0;
}
.settings-item:only-of-type {
  border-radius: 0;
}
.settings-item + .settings-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.settings-item:active {
  background: rgba(255, 255, 255, 0.03);
  transform: scale(0.98);
}
.settings-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--bg-tertiary), rgba(var(--bg-tertiary-rgb), 0.6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.settings-label {
  flex: 1;
  font-size: var(--font-m);
  font-weight: 500;
}
.settings-value {
  font-size: 14px;
  color: var(--text-secondary);
}
.settings-arrow {
  color: var(--text-tertiary);
}

/* === TOGGLE === */
.toggle {
  width: 52px;
  height: 32px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background 0.3s var(--ease-spring);
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.3s var(--ease-spring);
}
.toggle.on {
  background: var(--green);
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.3);
}
.toggle.on::after {
  transform: translateX(20px);
}

/* === TABS === */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(var(--bg-secondary-rgb), 0.5);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border-radius: var(--radius-l);
  margin-bottom: var(--space-l);
  border: 1px solid var(--glass-border);
}
.tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border-radius: var(--radius-m);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-spring);
}
.tab.active {
  background: rgba(var(--bg-tertiary-rgb), 0.8);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

/* === CHIPS === */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  padding: var(--space-s) var(--space-l);
  background: rgba(var(--bg-secondary-rgb), 0.5);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-spring);
  box-shadow: var(--shadow-xs);
}
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* === SKELETON === */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-s);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === RESPONSIVE === */
@media (min-width: 440px) {
  .pages {
    max-width: 440px;
    margin: 0 auto;
  }
}

/* === NAVBAR CENTER BUTTON === */
.nav-center {
  margin-top: -28px;
  overflow: visible;
}
.nav-center-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(var(--accent-rgb), 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(var(--accent-rgb), 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  border: 4px solid var(--bg);
  transition: transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast);
  animation: float 3s ease-in-out infinite;
}
.nav-center:active .nav-center-btn {
  transform: scale(0.88);
  box-shadow: 0 2px 12px rgba(var(--accent-rgb), 0.3);
  animation: none;
}
.nav-center-btn svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
  stroke-width: 2.5;
  fill: none;
}
.nav-center span {
  display: none;
}
.nav-center::before {
  display: none;
}

/* === TX CARD === */
.tx-card {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: 14px;
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-s);
  transition: transform var(--duration-fast) var(--ease-spring), background var(--duration-fast);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm), var(--glass-highlight);
}
.tx-card.clickable {
  cursor: pointer;
}
.tx-card.clickable:active {
  transform: scale(0.96);
  background: var(--bg-tertiary);
}
.tx-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.tx-card-icon.in { background: var(--green-soft); color: var(--green); }
.tx-card-icon.out { background: var(--red-soft); color: var(--red); }
.tx-card-icon.swap { background: var(--accent-soft); color: var(--accent); }
.tx-card-icon.check { background: var(--orange-soft); color: var(--orange); }
.tx-card-icon.invoice { background: var(--accent-soft); color: var(--accent); }
.tx-card-info {
  flex: 1;
  min-width: 0;
}
.tx-card-title {
  font-size: 15px;
  font-weight: 600;
}
.tx-card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-card-right {
  text-align: right;
  flex-shrink: 0;
}
.tx-card-amount {
  font-size: 15px;
  font-weight: 600;
}
.tx-card-amount.in { color: var(--green); }
.tx-card-amount.out { color: var(--red); }
.tx-card-time {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* === TX DETAILS === */
.tx-details-header {
  text-align: center;
  padding: 20px 0;
}
.tx-details-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.tx-details-amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}
.tx-details-amount.in { color: var(--green); }
.tx-details-amount.out { color: var(--red); }
.tx-details-usd {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.tx-details-status {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}
.tx-details-status.completed { background: var(--green-soft); color: var(--green); }
.tx-details-status.pending { background: var(--orange-soft); color: var(--orange); }
.tx-details-status.failed { background: var(--red-soft); color: var(--red); }
.tx-details-list {
  background: var(--bg-tertiary);
  border-radius: var(--radius-m);
  padding: 4px 16px;
  margin: 20px 0;
}
.tx-details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.tx-details-row:last-child {
  border-bottom: none;
}
.tx-details-row span:first-child {
  color: var(--text-secondary);
  font-size: 14px;
}
.tx-details-row span:last-child {
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}
.tx-details-row .mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
}
.tx-details-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* === INVOICE STYLES === */
.invoice-header {
  text-align: center;
  padding: 30px 0;
}
.invoice-icon {
  font-size: 56px;
  margin-bottom: 16px;
}
.invoice-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.invoice-amount {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}
.invoice-usd {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.invoice-comment {
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-m);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.invoice-details {
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  padding: 4px 16px;
  margin-bottom: 20px;
}
.invoice-success {
  text-align: center;
  padding: 20px 0;
}
.invoice-success .success-icon {
  width: 72px;
  height: 72px;
  background: var(--green-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  color: var(--green);
}
.invoice-success .success-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.invoice-amount-display {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.invoice-link-box {
  margin: 20px 0;
}
.invoice-link-box .input {
  text-align: center;
  font-size: 12px;
  font-family: monospace;
}
.invoice-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* === SUCCESS ANIMATION === */
.success-animation {
  text-align: center;
  padding: 30px 0;
}
.success-animation .success-check {
  width: 80px;
  height: 80px;
  background: var(--green-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 20px;
  color: var(--green);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes successPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.success-animation .success-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.success-animation .success-details {
  margin-bottom: 24px;
}

/* === INFO BOX === */
.info-box {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-m);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.info-box.warn {
  background: var(--orange-soft);
  color: var(--orange);
}
.info-box b {
  color: var(--accent);
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s, background 0.15s;
}
.back-btn:active {
  transform: scale(0.9);
  background: var(--bg-tertiary);
}
.page-header .page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

/* === DETAIL ROW === */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-row span:first-child {
  color: var(--text-secondary);
}

/* === LOADING SPINNER IN BUTTON === */
.btn .loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === SETTINGS PAGE === */
.settings-page {
  padding-bottom: 40px;
}

/* Profile Card Large */
.profile-card {
  text-align: center;
  padding: var(--space-3xl) var(--space-2xl);
  background: rgba(var(--bg-secondary-rgb), var(--card-glass-opacity));
  backdrop-filter: blur(var(--card-glass-blur));
  -webkit-backdrop-filter: blur(var(--card-glass-blur));
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-2xl);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md), var(--glass-highlight);
}

.profile-avatar-large {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  margin: 0 auto var(--space-l);
  overflow: hidden;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2), 0 4px 20px rgba(var(--accent-rgb), 0.35);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-size: 32px;
  font-weight: 700;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-username {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
}

.profile-id {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: monospace;
}

/* Language Grid */
.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.language-btn {
  padding: 20px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

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

.language-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.language-flag {
  font-size: 32px;
  margin-bottom: 8px;
}

.language-name {
  font-size: 14px;
  font-weight: 600;
}

/* Currency List */
.currency-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.currency-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-m);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.currency-btn:active {
  transform: scale(0.98);
}

.currency-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.currency-symbol {
  font-size: 24px;
  width: 40px;
  text-align: center;
}

.currency-info {
  flex: 1;
  text-align: left;
}

.currency-code {
  font-size: 16px;
  font-weight: 700;
}

.currency-name {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.currency-check {
  color: var(--accent);
  font-size: 20px;
}

/* Seed Display */
.seed-display {
  padding: 8px 0;
}

.seed-warning {
  padding: 12px;
  background: var(--orange-soft);
  color: var(--orange);
  border-radius: var(--radius-m);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 20px;
}

.seed-words {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

.seed-word {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-s);
}

.seed-word-num {
  font-size: 11px;
  color: var(--text-tertiary);
  min-width: 20px;
}

.seed-word-text {
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
}

.settings-footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-tertiary);
  font-size: 13px;
  line-height: 1.8;
}

/* === PIN OVERLAY === */
.pin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pin-overlay.visible {
  opacity: 1;
}

.pin-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.pin-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(var(--bg-secondary-rgb), 0.85);
  backdrop-filter: blur(var(--blur-xl)) saturate(1.5);
  -webkit-backdrop-filter: blur(var(--blur-xl)) saturate(1.5);
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  padding: var(--space-xl) var(--space-xl);
  padding-bottom: calc(var(--space-2xl) + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-modal);
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
}

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

.pin-header {
  text-align: center;
  margin-bottom: 16px;
}

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

.pin-dots-container {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  transition: all 0.25s var(--ease-spring);
}

.pin-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 16px var(--accent-glow);
}

.pin-dot.error {
  background: var(--red);
  border-color: var(--red);
  animation: shakeDot 0.4s ease;
}

@keyframes shakeDot {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.pin-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.pin-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-spring);
  user-select: none;
  box-shadow: 4px 4px 8px var(--neu-dark), -2px -2px 6px var(--neu-light);
}

.pin-btn:active {
  transform: scale(0.88);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: var(--neu-inset-dark), var(--neu-inset-light);
}

.pin-btn-empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

.pin-btn-del {
  background: transparent;
  color: var(--text-secondary);
}

.pin-btn-del:active {
  background: var(--red-soft);
  color: var(--red);
}

.pin-cancel-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pin-cancel-btn:active {
  opacity: 0.6;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-primary, var(--bg, #0a0a0f));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 5;
}

.loading-bolt {
  opacity: 0;
  transform: scale(0);
  animation: bolt-strike 2s ease-out forwards;
}

.loading-bolt svg {
  filter: drop-shadow(0 0 40px var(--accent, rgba(124, 58, 237, 0.9)))
          drop-shadow(0 0 80px var(--accent, rgba(124, 58, 237, 0.5)));
  animation: bolt-glow-pulse 1.5s ease-in-out infinite 0.3s;
}

.loading-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-glow, #c4b5fd), var(--accent, #7c3aed));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(10px);
  animation: title-fade 2s ease-out forwards;
}

.loading-dots {
  display: flex;
  gap: 8px;
  opacity: 0;
  animation: dots-appear 2s ease-out forwards;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #7c3aed);
  animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bolt-strike {
  0% { opacity: 0; transform: scale(0); }
  8% { opacity: 1; transform: scale(1.5); }
  12% { transform: scale(0.85); }
  16% { transform: scale(1.1); }
  20% { transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes bolt-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 40px var(--accent, rgba(124, 58, 237, 0.9))) drop-shadow(0 0 80px var(--accent, rgba(124, 58, 237, 0.5))); }
  50% { filter: drop-shadow(0 0 60px var(--accent, rgba(124, 58, 237, 1))) drop-shadow(0 0 120px var(--accent, rgba(124, 58, 237, 0.7))); }
}

@keyframes title-fade {
  0%, 15% { opacity: 0; transform: translateY(10px); }
  25% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes dots-appear {
  0%, 20% { opacity: 0; }
  30% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg, #0e0e0e);
  color: var(--text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease, background 0.3s ease, color 0.3s ease;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

  opacity: 0;
  transform: scale(0);
  animation: bolt-strike 2s ease-out forwards;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-glow, #c4b5fd), var(--accent, #7c3aed));
  clip-path: polygon(56% 6%, 25% 50%, 37% 50%, 37% 100%, 75% 50%, 56% 50%, 70% 6%);
  filter: drop-shadow(0 0 40px var(--accent, rgba(124, 58, 237, 0.9)))
          drop-shadow(0 0 80px var(--accent, rgba(124, 58, 237, 0.5)));
  filter: drop-shadow(0 0 20px var(--accent, rgba(124, 58, 237, 0.6)));
  transition: filter 0.3s ease;
}

.loading-title {
  color: var(--text, #ffffff);
  transition: color 0.3s ease;
}

/* === THEMES IN SETTINGS === */

.themes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.theme-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-m);
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-normal);
}

.theme-card:active { transform: scale(0.92); }

.theme-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(var(--accent-rgb), 0.25);
}

.theme-card-bg {
  width: 100%;
  height: 100%;
}

.theme-card-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(var(--blur-sm));
  -webkit-backdrop-filter: blur(var(--blur-sm));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.theme-card-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}

.theme-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3px 4px 5px;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
}

.theme-card-price {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 4px;
  background: rgba(0,0,0,0.65);
  border-radius: 5px;
  font-size: 7px;
  font-weight: 700;
  color: #fbbf24;
}

.theme-category {
  margin-top: 16px;
  margin-bottom: 4px;
}

.theme-category-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme-preview-modal {
  text-align: center;
  padding: 8px 0;
}

.theme-preview-large {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-xl);
  margin: 0 auto var(--space-m);
  box-shadow: var(--shadow-lg);
}

.theme-preview-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.theme-preview-price {
  font-size: 15px;
  color: #fbbf24;
  font-weight: 600;
  margin-bottom: 16px;
}

.theme-preview-free { color: var(--green); }

.theme-preview-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Wallpaper overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--wallpaper, none);
  opacity: var(--wallpaper-opacity, 0);
  transition: opacity 0.3s ease;
}

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

/* ═══ ANIMATED THEME BACKGROUND ═══ */
.theme-animated-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: var(--theme-wallpaper);
  background-size: 200% 200%;
  animation: var(--theme-animation);
  overflow: hidden;
}

/* Theme @keyframes removed — single source of truth is themes.js injectAnimationStyles() */

/* ═══ АНИМИРОВАННЫЕ ТЕМЫ - ПРИМЕНЕНИЕ К ЭЛЕМЕНТАМ ═══ */

/* === PULSE NEON === */
body.theme-pulse-active .card,
body.theme-pulse-active .settings-group,
body.theme-pulse-active .balance-card,
body.theme-pulse-active .btn-primary {
  animation: ui-pulse 4s ease-in-out infinite;
}

@keyframes ui-pulse {
  0%, 100% { box-shadow: 0 0 5px var(--accent-glow); filter: brightness(1); }
  50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-soft); filter: brightness(1.05); }
}

/* === RAINBOW WAVE === */
body.theme-rainbow-active {
  animation: theme-rainbow-element 8s linear infinite;
}

body.theme-rainbow-active .card,
body.theme-rainbow-active .settings-group,
body.theme-rainbow-active .balance-card,
body.theme-rainbow-active .btn-primary,
body.theme-rainbow-active .asset-item,
body.theme-rainbow-active .navbar {
  animation: theme-rainbow-element 8s linear infinite;
}

@keyframes theme-rainbow-element {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* === BREATHING === */
body.theme-breathing-active .card,
body.theme-breathing-active .settings-group,
body.theme-breathing-active .balance-card {
  animation: ui-breathe 6s ease-in-out infinite;
}

@keyframes ui-breathe {
  0%, 100% { opacity: 0.85; box-shadow: 0 0 5px var(--accent-soft); }
  50% { opacity: 1; box-shadow: 0 0 20px var(--accent-glow); }
}

/* === AURORA DANCE === */
body.theme-aurora-active .card,
body.theme-aurora-active .settings-group,
body.theme-aurora-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-aurora-active .card::after,
body.theme-aurora-active .settings-group::after,
body.theme-aurora-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(16,185,129,0.15) 0%, 
    rgba(6,182,212,0.1) 30%, 
    rgba(139,92,246,0.15) 60%, 
    transparent 100%
  );
  background-size: 100% 200%;
  animation: ui-aurora 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@keyframes ui-aurora {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

/* === ELECTRIC STORM === */
body.theme-storm-active .card,
body.theme-storm-active .settings-group,
body.theme-storm-active .balance-card,
body.theme-storm-active .btn-primary {
  animation: ui-lightning 3s ease-in-out infinite;
}

@keyframes ui-lightning {
  0%, 88%, 100% { 
    box-shadow: 0 0 5px var(--accent-soft); 
    filter: brightness(1); 
  }
  90% { 
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px var(--accent-soft); 
    filter: brightness(1.3); 
  }
  92% { 
    filter: brightness(1); 
  }
  94% { 
    box-shadow: 0 0 20px var(--accent-glow); 
    filter: brightness(1.2); 
  }
  96% { 
    filter: brightness(1); 
  }
}

/* === LAVA FLOW === */
body.theme-lava-active .card,
body.theme-lava-active .settings-group,
body.theme-lava-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-lava-active .card::after,
body.theme-lava-active .settings-group::after,
body.theme-lava-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(127,29,29,0.2) 0%, 
    rgba(185,28,28,0.15) 30%, 
    rgba(249,115,22,0.2) 60%,
    rgba(251,191,36,0.1) 100%
  );
  background-size: 100% 300%;
  animation: ui-lava 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@keyframes ui-lava {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

/* === COSMIC DRIFT === */
body.theme-drift-active .card,
body.theme-drift-active .settings-group,
body.theme-drift-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-drift-active .card::after,
body.theme-drift-active .settings-group::after,
body.theme-drift-active .balance-card::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 30%, rgba(168,85,247,0.15) 0%, transparent 40%), 
              radial-gradient(ellipse at 70% 70%, rgba(124,58,237,0.12) 0%, transparent 40%);
  animation: ui-drift 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes ui-drift {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === HEARTBEAT === */
body.theme-heartbeat-active .card,
body.theme-heartbeat-active .settings-group,
body.theme-heartbeat-active .balance-card,
body.theme-heartbeat-active .btn-primary {
  animation: ui-heartbeat 1.5s ease-in-out infinite;
}

@keyframes ui-heartbeat {
  0%, 100% { transform: scale(1); box-shadow: 0 0 5px var(--accent-soft); }
  10% { transform: scale(1.01); box-shadow: 0 0 15px var(--accent-glow); }
  20% { transform: scale(1); box-shadow: 0 0 5px var(--accent-soft); }
  30% { transform: scale(1.008); box-shadow: 0 0 12px var(--accent-glow); }
  40% { transform: scale(1); }
}

/* === GLITCH === */
body.theme-glitch-active .card,
body.theme-glitch-active .settings-group,
body.theme-glitch-active .balance-card {
  animation: ui-glitch 5s steps(1) infinite;
  position: relative;
  overflow: hidden;
}

body.theme-glitch-active .card::after,
body.theme-glitch-active .settings-group::after,
body.theme-glitch-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    transparent 0%,
    rgba(0,255,0,0.03) 2%,
    transparent 3%,
    transparent 20%,
    rgba(255,0,0,0.02) 21%,
    transparent 22%,
    transparent 50%,
    rgba(0,0,255,0.03) 51%,
    transparent 52%,
    transparent 80%,
    rgba(0,255,0,0.02) 81%,
    transparent 82%
  );
  animation: glitch-scanline 0.1s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

body.theme-glitch-active .balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0,255,0,0.5);
  animation: glitch-line 4s steps(1) infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes ui-glitch {
  0%, 92%, 100% { transform: translate(0); filter: none; }
  93% { transform: translate(-4px, 1px) skewX(-1deg); filter: hue-rotate(90deg); }
  94% { transform: translate(4px, -1px) skewX(1deg); filter: hue-rotate(-90deg); }
  95% { transform: translate(-2px, -2px); filter: hue-rotate(180deg) saturate(2); }
  96% { transform: translate(3px, 0) skewX(-0.5deg); filter: hue-rotate(0deg); }
  97% { transform: translate(0); filter: none; }
  98% { transform: translate(-5px, 1px) skewX(2deg); filter: hue-rotate(-45deg) brightness(1.3); }
  99% { transform: translate(2px, -1px); filter: saturate(3) hue-rotate(90deg); }
}

@keyframes glitch-scanline {
  0% { background-position: 0 0; }
  100% { background-position: 0 100%; }
}

@keyframes glitch-line {
  0%, 90%, 100% { top: 0; opacity: 0; }
  91% { top: 15%; opacity: 1; width: 60%; left: 10%; }
  92% { top: 45%; opacity: 0.8; width: 80%; left: 5%; }
  93% { top: 70%; opacity: 0; }
  95% { top: 30%; opacity: 1; width: 40%; left: 30%; }
  96% { top: 85%; opacity: 0.6; width: 90%; left: 0; }
  97% { opacity: 0; }
}

/* Глитч текста */
body.theme-glitch-active .balance-value,
body.theme-glitch-active .profile-name {
  animation: glitch-text 4s steps(1) infinite;
  position: relative;
}

@keyframes glitch-text {
  0%, 93%, 100% { text-shadow: none; transform: none; }
  94% { text-shadow: -2px 0 #ff0000, 2px 0 #00ffff; transform: skewX(-2deg); }
  95% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; transform: skewX(1deg); }
  96% { text-shadow: -1px 0 #00ff00, 1px 0 #ff00ff; transform: skewX(-1deg); }
  97% { text-shadow: none; transform: none; }
}

/* Глитч навбар */
body.theme-glitch-active .navbar {
  animation: glitch-navbar 6s steps(1) infinite;
}

@keyframes glitch-navbar {
  0%, 95%, 100% { transform: none; filter: none; }
  96% { transform: translate(-2px, 0); filter: hue-rotate(90deg); }
  97% { transform: translate(2px, 0); filter: hue-rotate(-90deg); }
  98% { transform: none; filter: none; }
}

/* Мерцание экрана */
body.theme-glitch-active::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.1) 0px,
    rgba(0,0,0,0.1) 1px,
    transparent 1px,
    transparent 2px
  );
  animation: glitch-screen 8s steps(1) infinite;
  pointer-events: none;
  z-index: 99999;
  opacity: 0.3;
}

@keyframes glitch-screen {
  0%, 94%, 100% { opacity: 0.3; transform: none; }
  95% { opacity: 0.5; transform: translateX(-1px); }
  96% { opacity: 0.2; transform: translateX(2px); }
  97% { opacity: 0.6; transform: translateY(1px); }
  98% { opacity: 0.3; transform: none; }
}

/* === MATRIX === */
body.theme-matrix-active::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,255,0,0.03) 0px,
    rgba(0,255,0,0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  background-size: 100% 6px;
  animation: ui-matrix 0.5s linear infinite;
  pointer-events: none;
  z-index: 99999;
  opacity: 0.4;
}

@keyframes ui-matrix {
  0% { background-position: 0 0; }
  100% { background-position: 0 6px; }
}

/* === FIRE === */
body.theme-fire-active .card,
body.theme-fire-active .settings-group,
body.theme-fire-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-fire-active .card::after,
body.theme-fire-active .settings-group::after,
body.theme-fire-active .balance-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(180deg, 
    transparent 0%,
    rgba(255,69,0,0.15) 40%,
    rgba(255,165,0,0.1) 70%,
    rgba(255,215,0,0.08) 100%
  );
  animation: ui-fire 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@keyframes ui-fire {
  0%, 100% { opacity: 0.7; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* === SNOW === */
body.theme-snow-active .card,
body.theme-snow-active .settings-group,
body.theme-snow-active .balance-card {
  animation: ui-snow-glow 4s ease-in-out infinite;
}

@keyframes ui-snow-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255,255,255,0.05); }
  50% { box-shadow: 0 0 20px rgba(255,255,255,0.1), 0 0 40px rgba(255,255,255,0.05); }
}

/* === RAIN === */
body.theme-rain-active {
  background-color: #0a0a12;
  background-image: 
    linear-gradient(95deg, transparent 94%, rgba(174, 194, 224, 0.3) 94.5%, transparent 95%),
    linear-gradient(95deg, transparent 96%, rgba(174, 194, 224, 0.4) 96.5%, transparent 97%),
    linear-gradient(95deg, transparent 93%, rgba(174, 194, 224, 0.25) 93.5%, transparent 94%),
    linear-gradient(95deg, transparent 95%, rgba(174, 194, 224, 0.35) 95.5%, transparent 96%);
  background-size: 
    65px 35px,
    85px 45px,
    50px 28px,
    70px 40px;
  background-position: 0 0, 20px 15px, 40px 5px, 10px 30px;
  animation: bg-rain 0.4s linear infinite !important;
}

body.theme-rain-active .card,
body.theme-rain-active .balance-card {
  overflow: hidden;
}

body.theme-rain-active .card::after,
body.theme-rain-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(95deg, transparent 94%, rgba(174, 194, 224, 0.4) 94.5%, transparent 95%),
    linear-gradient(95deg, transparent 96%, rgba(174, 194, 224, 0.5) 96.5%, transparent 97%),
    linear-gradient(95deg, transparent 93%, rgba(174, 194, 224, 0.35) 93.5%, transparent 94%),
    linear-gradient(95deg, transparent 95%, rgba(174, 194, 224, 0.45) 95.5%, transparent 96%),
    linear-gradient(95deg, transparent 97%, rgba(174, 194, 224, 0.3) 97.5%, transparent 98%);
  background-size: 
    40px 20px,
    55px 28px,
    30px 18px,
    45px 22px,
    60px 30px;
  background-position: 0 0, 10px 8px, 25px 3px, 5px 15px, 35px 20px;
  animation: card-rain 0.3s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

@keyframes bg-rain {
  0% { background-position: 0 0, 20px 15px, 40px 5px, 10px 30px; }
  100% { background-position: 0 35px, 20px 60px, 40px 33px, 10px 70px; }
}

@keyframes card-rain {
  0% { background-position: 0 0, 10px 8px, 25px 3px, 5px 15px, 35px 20px; }
  100% { background-position: 0 20px, 10px 36px, 25px 21px, 5px 37px, 35px 50px; }
}

/* === SMOKE === */
body.theme-smoke-active {
  background-color: #0a0a0a;
  background-image: 
    radial-gradient(ellipse at 15% 80%, rgba(50,50,50,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(40,40,40,0.25) 0%, transparent 50%);
  background-size: 300% 300%;
  animation: bg-smoke-drift 20s ease-in-out infinite alternate;
}

body.theme-smoke-active .card,
body.theme-smoke-active .settings-group,
body.theme-smoke-active .balance-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
}

body.theme-smoke-active .card::after,
body.theme-smoke-active .settings-group::after,
body.theme-smoke-active .balance-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 40%, rgba(200,200,200,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(150,150,150,0.1) 0%, transparent 50%);
  animation: smoke-wisp 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
  filter: blur(30px);
  border-radius: 50%;
}

@keyframes bg-smoke-drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

@keyframes smoke-wisp {
  0% { transform: translate(-10%, -10%) scale(1); opacity: 0.6; }
  100% { transform: translate(15%, 5%) scale(1.2); opacity: 0.9; }
}

/* === HOLOGRAPHIC === */
body.theme-holographic-active .card,
body.theme-holographic-active .settings-group,
body.theme-holographic-active .balance-card,
body.theme-holographic-active .btn-primary {
  position: relative;
  overflow: hidden;
}

body.theme-holographic-active .card::after,
body.theme-holographic-active .settings-group::after,
body.theme-holographic-active .balance-card::after,
body.theme-holographic-active .btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(255,0,0,0.08) 0%,
    rgba(255,165,0,0.08) 17%,
    rgba(255,255,0,0.08) 33%,
    rgba(0,255,0,0.08) 50%,
    rgba(0,0,255,0.08) 67%,
    rgba(75,0,130,0.08) 83%,
    rgba(255,0,0,0.08) 100%
  );
  background-size: 300% 300%;
  animation: ui-holographic 6s linear infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@keyframes ui-holographic {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 300%; }
}

/* === CHAMELEON === */
body.theme-chameleon-active {
  animation: theme-rainbow-element 15s linear infinite;
}

body.theme-chameleon-active .card,
body.theme-chameleon-active .settings-group,
body.theme-chameleon-active .balance-card,
body.theme-chameleon-active .navbar,
body.theme-chameleon-active .btn-primary {
  animation: theme-rainbow-element 15s linear infinite;
}

/* === DIAMOND === */
body.theme-diamond-active {
  background: #07070e;
  background-image: radial-gradient(circle at 50% 0%, rgba(120, 160, 255, 0.08) 0%, transparent 60%);
}

body.theme-diamond-active .card,
body.theme-diamond-active .settings-group,
body.theme-diamond-active .balance-card,
body.theme-diamond-active .btn-primary {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: diamond-glow 4s ease-in-out infinite;
}

/* Блик преломления света (пробегает по диагонали) */
body.theme-diamond-active .card::before,
body.theme-diamond-active .settings-group::before,
body.theme-diamond-active .balance-card::before,
body.theme-diamond-active .btn-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 60px;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: rotate(25deg);
  animation: diamond-sweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
  filter: blur(2px);
}

@keyframes diamond-glow {
  0%, 100% { 
    box-shadow: 0 0 8px rgba(100, 180, 255, 0.15), inset 0 0 4px rgba(255, 255, 255, 0.05); 
  }
  50% { 
    box-shadow: 0 0 20px rgba(150, 200, 255, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.1); 
  }
}

@keyframes diamond-sweep {
  0% { left: -150%; opacity: 0; }
  10% { opacity: 1; }
  50% { left: 150%; opacity: 0; }
  100% { left: 150%; opacity: 0; }
}

/* === VOID === */
body.theme-void-active {
  background: #020204;
}
body.theme-void-active .card,
body.theme-void-active .settings-group,
body.theme-void-active .balance-card {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(20, 10, 40, 0.8), inset 0 0 20px rgba(99, 102, 241, 0.1);
  animation: void-pull 6s ease-in-out infinite;
}
body.theme-void-active .card::before,
body.theme-void-active .settings-group::before,
body.theme-void-active .balance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(20, 10, 40, 0.6) 80%);
  animation: void-spin 12s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
@keyframes void-pull {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(20, 10, 40, 0.8), inset 0 0 20px rgba(99, 102, 241, 0.05); }
  50% { transform: scale(0.98); box-shadow: 0 0 60px rgba(20, 10, 40, 1), inset 0 0 30px rgba(99, 102, 241, 0.15); }
}
@keyframes void-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === NEON 3D === */
body.theme-neon-active {
  background: #050505;
}
body.theme-neon-active .card,
body.theme-neon-active .settings-group,
body.theme-neon-active .balance-card,
body.theme-neon-active .btn-primary {
  border: 1px solid var(--accent);
  box-shadow: 
    0 0 5px var(--accent),
    0 5px 0 -1px var(--accent-glow),
    0 10px 0 -2px rgba(var(--accent-rgb), 0.5),
    0 15px 0 -3px rgba(var(--accent-rgb), 0.2);
  animation: neon-float 4s ease-in-out infinite;
}
@keyframes neon-float {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 5px var(--accent), 0 5px 0 -1px var(--accent-glow), 0 10px 0 -2px rgba(var(--accent-rgb), 0.5), 0 15px 0 -3px rgba(var(--accent-rgb), 0.2); }
  50% { transform: translateY(-4px); box-shadow: 0 0 15px var(--accent), 0 9px 0 -1px var(--accent-glow), 0 18px 0 -2px rgba(var(--accent-rgb), 0.5), 0 27px 0 -3px rgba(var(--accent-rgb), 0.2), 0 20px 30px rgba(var(--accent-rgb), 0.3); }
}

/* === NORTHERN LIGHTS === */
body.theme-northern-active .card,
body.theme-northern-active .settings-group,
body.theme-northern-active .balance-card {
  position: relative;
  overflow: hidden;
}
body.theme-northern-active .card::after,
body.theme-northern-active .settings-group::after,
body.theme-northern-active .balance-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, 
    transparent 30%, 
    rgba(16, 185, 129, 0.15) 35%, 
    rgba(94, 234, 212, 0.1) 40%, 
    rgba(139, 92, 246, 0.12) 45%, 
    transparent 50%
  );
  animation: aurora-wave 6s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
  filter: blur(15px);
  border-radius: inherit;
}
@keyframes aurora-wave {
  0% { transform: translateX(-20%) translateY(-10%) rotate(-5deg); }
  100% { transform: translateX(20%) translateY(10%) rotate(5deg); }
}

/* === STARRY NIGHT === */
body.theme-starry-active {
  background-color: #0b0d17;
  background-image: 
    radial-gradient(1px 1px at 10% 20%, #fff, transparent),
    radial-gradient(1px 1px at 30% 60%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, #a5b4fc, transparent),
    radial-gradient(1px 1px at 70% 40%, #fff, transparent),
    radial-gradient(1px 1px at 90% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 15% 85%, #a5b4fc, transparent),
    radial-gradient(1px 1px at 60% 90%, #fff, transparent);
}
body.theme-starry-active .card,
body.theme-starry-active .settings-group,
body.theme-starry-active .balance-card {
  position: relative;
  overflow: hidden;
  background-color: rgba(11, 13, 23, 0.6);
  border: 1px solid rgba(165, 180, 252, 0.1);
}
body.theme-starry-active .card::after,
body.theme-starry-active .settings-group::after,
body.theme-starry-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 50% 50%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, #a5b4fc, transparent),
    radial-gradient(1px 1px at 40% 80%, #fff, transparent),
    radial-gradient(1px 1px at 70% 70%, #fff, transparent);
  animation: stars-twinkle 3s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}
@keyframes stars-twinkle {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* === OCEAN DEPTH === */
body.theme-ocean-depth-active .card,
body.theme-ocean-depth-active .settings-group,
body.theme-ocean-depth-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-ocean-depth-active .card::after,
body.theme-ocean-depth-active .settings-group::after,
body.theme-ocean-depth-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    transparent 0%,
    rgba(14,165,233,0.08) 50%,
    rgba(14,165,233,0.15) 100%
  );
  animation: ui-waves 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@keyframes ui-waves {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-3px); opacity: 1; }
}

/* === PARTICLES === */
body.theme-particles-active .card,
body.theme-particles-active .balance-card {
  position: relative;
  overflow: hidden;
}

body.theme-particles-active .card::after,
body.theme-particles-active .balance-card::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 20%, var(--accent-soft) 0%, transparent 15%),
              radial-gradient(circle at 80% 80%, var(--accent-soft) 0%, transparent 15%),
              radial-gradient(circle at 50% 50%, var(--accent-soft) 0%, transparent 20%);
  animation: ui-drift 15s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* ═══ 3D ТЕМЫ - ОБЪЁМНЫЕ ЭФФЕКТЫ ═══ */

/* === GLASS (Стекло) === */
body.theme-glassmorphism .card,
body.theme-glassmorphism .settings-group,
body.theme-glassmorphism .balance-card,
body.theme-glassmorphism .settings-item,
body.theme-glassmorphism .asset-item,
body.theme-glassmorphism .tx-item {
  background: rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 
    0 4px 30px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(255,255,255,0.05);
}

body.theme-glassmorphism .btn-primary {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 
    0 4px 15px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

body.theme-glassmorphism .navbar {
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(30px) saturate(1.8);
  -webkit-backdrop-filter: blur(30px) saturate(1.8);
  border-top: 1px solid rgba(255,255,255,0.1);
}

body.theme-glassmorphism .theme-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
}

body.theme-glassmorphism .tabs,
body.theme-glassmorphism .tab {
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* === METAL (Металл) === */
body.theme-metallic .card,
body.theme-metallic .settings-group,
body.theme-metallic .balance-card {
  background: linear-gradient(180deg, 
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.02) 30%,
    rgba(0,0,0,0.05) 60%,
    rgba(255,255,255,0.06) 100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 
    0 2px 10px rgba(0,0,0,0.3),
    0 8px 32px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.2);
}

body.theme-metallic .settings-item {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.04) 0%,
    rgba(0,0,0,0.02) 100%
  ) !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

body.theme-metallic .btn-primary {
  background: linear-gradient(180deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent), black 20%) 100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 
    0 4px 15px var(--accent-glow),
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 0 rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

body.theme-metallic .navbar {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.08) 0%,
    rgba(0,0,0,0.05) 100%
  ) !important;
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

body.theme-metallic .asset-item,
body.theme-metallic .tx-item {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

/* === CRYSTAL (Кристалл) === */
body.theme-crystal .card,
body.theme-crystal .settings-group,
body.theme-crystal .balance-card {
  background: linear-gradient(135deg,
    rgba(167,139,250,0.1) 0%,
    rgba(196,181,253,0.05) 25%,
    rgba(240,171,252,0.08) 50%,
    rgba(196,181,253,0.05) 75%,
    rgba(167,139,250,0.1) 100%
  ) !important;
  border: 1px solid rgba(167,139,250,0.2);
  box-shadow: 
    0 4px 20px rgba(167,139,250,0.15),
    0 8px 40px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 0 20px rgba(167,139,250,0.05);
  position: relative;
  overflow: hidden;
}

body.theme-crystal .card::before,
body.theme-crystal .settings-group::before,
body.theme-crystal .balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.15) 50%,
    rgba(255,255,255,0.08) 55%,
    transparent 60%
  );
  animation: crystal-shine 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes crystal-shine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

body.theme-crystal .btn-primary {
  border: 1px solid rgba(167,139,250,0.3);
  box-shadow: 
    0 4px 15px rgba(167,139,250,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 0 10px rgba(167,139,250,0.1);
}

body.theme-crystal .navbar {
  border-top: 1px solid rgba(167,139,250,0.15);
  box-shadow: 0 -2px 20px rgba(167,139,250,0.1);
}

body.theme-crystal .settings-item {
  border-bottom: 1px solid rgba(167,139,250,0.08);
}

/* === NEON 3D === */
body.theme-neon .card,
body.theme-neon .settings-group,
body.theme-neon .balance-card {
  background: rgba(0,0,0,0.6) !important;
  border: 1px solid var(--accent);
  box-shadow: 
    0 0 10px var(--accent-glow),
    0 0 30px rgba(6,182,212,0.1),
    inset 0 0 10px var(--accent-soft),
    inset 0 1px 0 rgba(6,182,212,0.2);
  animation: neon-glow 3s ease-in-out infinite;
}

@keyframes neon-glow {
  0%, 100% { 
    box-shadow: 
      0 0 5px var(--accent-glow),
      0 0 15px rgba(6,182,212,0.05),
      inset 0 0 5px var(--accent-soft);
    border-color: var(--accent);
  }
  50% { 
    box-shadow: 
      0 0 15px var(--accent-glow),
      0 0 40px rgba(6,182,212,0.15),
      0 0 60px rgba(6,182,212,0.05),
      inset 0 0 15px var(--accent-soft);
    border-color: var(--accent-glow);
  }
}

body.theme-neon .btn-primary {
  border: 1px solid var(--accent);
  box-shadow: 
    0 0 15px var(--accent-glow),
    0 0 30px rgba(6,182,212,0.15),
    inset 0 0 10px var(--accent-soft);
  text-shadow: 0 0 10px var(--accent);
}

body.theme-neon .settings-item {
  border-bottom: 1px solid rgba(6,182,212,0.15);
}

body.theme-neon .navbar {
  background: rgba(0,0,0,0.8) !important;
  border-top: 1px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

body.theme-neon .nav-item.active svg {
  filter: drop-shadow(0 0 8px var(--accent));
}

/* === MARBLE (Мрамор) === */
body.theme-marble .card,
body.theme-marble .settings-group,
body.theme-marble .balance-card {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f8f8f8 25%,
    #f0f0f0 50%,
    #f5f5f5 75%,
    #ffffff 100%
  ) !important;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
}

body.theme-marble .card::before,
body.theme-marble .settings-group::before,
body.theme-marble .balance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(0,0,0,0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0,0,0,0.015) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.01) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body.theme-marble .btn-primary {
  box-shadow: 
    0 2px 8px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

body.theme-marble .settings-item {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

body.theme-marble .navbar {
  background: #ffffff !important;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
}

/* === OBSIDIAN (Обсидиан) === */
body.theme-obsidian .card,
body.theme-obsidian .settings-group,
body.theme-obsidian .balance-card {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.04) 0%,
    rgba(0,0,0,0.2) 50%,
    rgba(255,255,255,0.02) 100%
  ) !important;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 
    0 4px 20px rgba(0,0,0,0.5),
    0 12px 40px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

body.theme-obsidian .card::before,
body.theme-obsidian .settings-group::before,
body.theme-obsidian .balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.03) 50%,
    transparent 100%
  );
  animation: obsidian-reflect 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes obsidian-reflect {
  0%, 100% { left: -100%; }
  50% { left: 200%; }
}

body.theme-obsidian .btn-primary {
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 
    0 4px 15px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1),
    inset 0 -2px 0 rgba(0,0,0,0.3);
}

body.theme-obsidian .settings-item {
  border-bottom: 1px solid rgba(255,255,255,0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

body.theme-obsidian .navbar {
  background: rgba(9,9,11,0.95) !important;
  border-top: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

/* === CYBERPUNK CITY === */
body.theme-cyberpunk-active .card,
body.theme-cyberpunk-active .settings-group,
body.theme-cyberpunk-active .balance-card {
  background: rgba(13,2,33,0.6) !important;
  border: 1px solid rgba(0,255,245,0.15);
  box-shadow:
    0 0 8px rgba(0,255,245,0.1),
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(0,255,245,0.1);
}

body.theme-cyberpunk-active .card::after,
body.theme-cyberpunk-active .settings-group::after,
body.theme-cyberpunk-active .balance-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(0,255,245,0.3) 0px, rgba(0,255,245,0.3) 2px, transparent 2px, transparent 4px);
  pointer-events: none;
  z-index: 1;
  animation: scanline-move 4s linear infinite;
}

@keyframes scanline-move {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

body.theme-cyberpunk-active .btn-primary {
  border: 1px solid rgba(0,255,245,0.3);
  box-shadow: 0 0 15px rgba(0,255,245,0.3), inset 0 0 8px rgba(0,255,245,0.1);
  text-shadow: 0 0 8px rgba(0,255,245,0.5);
}

body.theme-cyberpunk-active .navbar {
  background: rgba(13,2,33,0.85) !important;
  border-top: 1px solid rgba(0,255,245,0.2);
  box-shadow: 0 0 20px rgba(0,255,245,0.1);
}

/* === DIGITAL RAIN === */
body.theme-digital-rain-active .card,
body.theme-digital-rain-active .settings-group,
body.theme-digital-rain-active .balance-card {
  background: rgba(0,10,0,0.7) !important;
  border: 1px solid rgba(0,255,65,0.12);
  box-shadow: 0 0 10px rgba(0,255,65,0.08), 0 4px 20px rgba(0,0,0,0.3);
}

body.theme-digital-rain-active .btn-primary {
  border: 1px solid rgba(0,255,65,0.3);
  box-shadow: 0 0 15px rgba(0,255,65,0.2);
  text-shadow: 0 0 6px rgba(0,255,65,0.5);
}

body.theme-digital-rain-active .navbar {
  background: rgba(0,10,0,0.9) !important;
  border-top: 1px solid rgba(0,255,65,0.15);
}

/* === SYNTHWAVE === */
body.theme-synthwave-active .card,
body.theme-synthwave-active .settings-group,
body.theme-synthwave-active .balance-card {
  background: rgba(15,0,40,0.65) !important;
  border: 1px solid rgba(255,41,117,0.15);
  box-shadow:
    0 0 10px rgba(255,41,117,0.1),
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,41,117,0.08);
}

body.theme-synthwave-active .btn-primary {
  background: linear-gradient(135deg, #ff2975, #f222ff) !important;
  border: 1px solid rgba(255,41,117,0.4);
  box-shadow: 0 0 20px rgba(255,41,117,0.3), 0 0 40px rgba(242,34,255,0.15);
}

body.theme-synthwave-active .navbar {
  background: rgba(15,0,40,0.9) !important;
  border-top: 1px solid rgba(255,41,117,0.2);
}

/* === LIQUID METAL === */
body.theme-liquid-metal-active .card,
body.theme-liquid-metal-active .settings-group,
body.theme-liquid-metal-active .balance-card {
  background: linear-gradient(180deg,
    rgba(255,255,255,0.08) 0%,
    rgba(255,255,255,0.02) 50%,
    rgba(255,255,255,0.06) 100%
  ) !important;
  border: 1px solid rgba(192,192,192,0.15);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

body.theme-liquid-metal-active .card::before,
body.theme-liquid-metal-active .settings-group::before,
body.theme-liquid-metal-active .balance-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
  animation: metal-shine 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes metal-shine {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

body.theme-liquid-metal-active .navbar {
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.1) 100%) !important;
  border-top: 1px solid rgba(192,192,192,0.12);
}

/* === ARCTIC AURORA === */
body.theme-arctic-aurora-active .card,
body.theme-arctic-aurora-active .settings-group,
body.theme-arctic-aurora-active .balance-card {
  background: rgba(10,22,40,0.6) !important;
  border: 1px solid rgba(103,232,249,0.12);
  box-shadow: 0 0 15px rgba(103,232,249,0.08), 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

body.theme-arctic-aurora-active .card::after,
body.theme-arctic-aurora-active .settings-group::after,
body.theme-arctic-aurora-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(103,232,249,0.05) 0%, transparent 30%, rgba(167,139,250,0.05) 100%);
  animation: aurora-shimmer 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes aurora-shimmer {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

body.theme-arctic-aurora-active .navbar {
  background: rgba(10,22,40,0.9) !important;
  border-top: 1px solid rgba(103,232,249,0.15);
}

/* === TROPICAL SUNSET === */
body.theme-tropical-sunset-active .card,
body.theme-tropical-sunset-active .settings-group,
body.theme-tropical-sunset-active .balance-card {
  background: rgba(26,10,46,0.6) !important;
  border: 1px solid rgba(255,107,53,0.12);
  box-shadow: 0 0 12px rgba(255,107,53,0.08), 0 4px 20px rgba(0,0,0,0.3);
}

body.theme-tropical-sunset-active .btn-primary {
  background: linear-gradient(135deg, #ff6b35, #ffd700) !important;
  box-shadow: 0 4px 20px rgba(255,107,53,0.3);
}

body.theme-tropical-sunset-active .navbar {
  background: rgba(26,10,46,0.9) !important;
  border-top: 1px solid rgba(255,107,53,0.15);
}

/* === CHERRY BLOSSOM === */
body.theme-cherry-blossom-active .card,
body.theme-cherry-blossom-active .settings-group,
body.theme-cherry-blossom-active .balance-card {
  background: rgba(30,16,32,0.6) !important;
  border: 1px solid rgba(255,143,163,0.12);
  box-shadow: 0 0 12px rgba(255,143,163,0.06), 0 4px 20px rgba(0,0,0,0.3);
}

body.theme-cherry-blossom-active .btn-primary {
  background: linear-gradient(135deg, #ff8fa3, #ffb7c5) !important;
  box-shadow: 0 4px 15px rgba(255,143,163,0.3);
}

body.theme-cherry-blossom-active .navbar {
  background: rgba(30,16,32,0.9) !important;
  border-top: 1px solid rgba(255,143,163,0.12);
}

/* === DEEP SPACE === */
body.theme-deep-space-active .card,
body.theme-deep-space-active .settings-group,
body.theme-deep-space-active .balance-card {
  background: rgba(0,0,5,0.7) !important;
  border: 1px solid rgba(129,140,248,0.1);
  box-shadow: 0 0 15px rgba(129,140,248,0.05), 0 4px 20px rgba(0,0,0,0.4);
}

body.theme-deep-space-active .navbar {
  background: rgba(0,0,5,0.95) !important;
  border-top: 1px solid rgba(129,140,248,0.08);
}

/* === GOLD LUXURY === */
body.theme-gold-luxury-active .card,
body.theme-gold-luxury-active .settings-group,
body.theme-gold-luxury-active .balance-card {
  background: linear-gradient(180deg,
    rgba(255,215,0,0.06) 0%,
    rgba(0,0,0,0.3) 50%,
    rgba(255,215,0,0.04) 100%
  ) !important;
  border: 1px solid rgba(255,215,0,0.15);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,215,0,0.15),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

body.theme-gold-luxury-active .card::before,
body.theme-gold-luxury-active .settings-group::before,
body.theme-gold-luxury-active .balance-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(255,215,0,0.08) 50%, transparent 60%);
  animation: gold-shimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes gold-shimmer {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

body.theme-gold-luxury-active .btn-primary {
  background: linear-gradient(135deg, #ffd700, #b8860b) !important;
  border: 1px solid rgba(255,215,0,0.3);
  box-shadow: 0 4px 20px rgba(255,215,0,0.3);
  color: #0a0a0a !important;
}

body.theme-gold-luxury-active .navbar {
  background: rgba(10,10,10,0.95) !important;
  border-top: 1px solid rgba(255,215,0,0.12);
}

/* === ROSE GOLD === */
body.theme-rose-gold-active .card,
body.theme-rose-gold-active .settings-group,
body.theme-rose-gold-active .balance-card {
  background: linear-gradient(180deg,
    rgba(232,160,176,0.06) 0%,
    rgba(0,0,0,0.2) 50%,
    rgba(232,160,176,0.04) 100%
  ) !important;
  border: 1px solid rgba(232,160,176,0.12);
  box-shadow:
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(232,160,176,0.12);
  position: relative;
  overflow: hidden;
}

body.theme-rose-gold-active .card::before,
body.theme-rose-gold-active .settings-group::before,
body.theme-rose-gold-active .balance-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(135deg, transparent 40%, rgba(232,160,176,0.08) 50%, transparent 60%);
  animation: rosegold-shimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes rosegold-shimmer {
  0%, 100% { transform: translateX(-100%) rotate(45deg); }
  50% { transform: translateX(100%) rotate(45deg); }
}

body.theme-rose-gold-active .btn-primary {
  background: linear-gradient(135deg, #e8a0b0, #b76e79) !important;
  box-shadow: 0 4px 15px rgba(232,160,176,0.3);
}

body.theme-rose-gold-active .navbar {
  background: rgba(26,15,16,0.95) !important;
  border-top: 1px solid rgba(232,160,176,0.1);
}

/* === NEON NOIR === */
body.theme-neon-noir-active .card,
body.theme-neon-noir-active .settings-group,
body.theme-neon-noir-active .balance-card {
  background: rgba(0,0,0,0.8) !important;
  border: 1px solid rgba(0,255,255,0.1);
  box-shadow:
    0 0 8px rgba(0,255,255,0.08),
    0 4px 20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(0,255,255,0.06);
}

body.theme-neon-noir-active .btn-primary {
  background: transparent !important;
  border: 2px solid rgba(0,255,255,0.6);
  box-shadow: 0 0 20px rgba(0,255,255,0.3), inset 0 0 10px rgba(0,255,255,0.1);
  text-shadow: 0 0 10px rgba(0,255,255,0.6);
  color: #00ffff !important;
}

body.theme-neon-noir-active .navbar {
  background: rgba(0,0,0,0.95) !important;
  border-top: 1px solid rgba(0,255,255,0.1);
  box-shadow: 0 0 15px rgba(0,255,255,0.05);
}

body.theme-neon-noir-active .nav-item.active svg {
  filter: drop-shadow(0 0 8px rgba(0,255,255,0.6));
}

/* === QUANTUM SHIFT === */
body.theme-quantum-shift-active .card,
body.theme-quantum-shift-active .settings-group,
body.theme-quantum-shift-active .balance-card {
  background: rgba(10,0,32,0.65) !important;
  border: 1px solid rgba(224,64,251,0.12);
  box-shadow: 0 0 15px rgba(224,64,251,0.08), 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

body.theme-quantum-shift-active .card::after,
body.theme-quantum-shift-active .settings-group::after,
body.theme-quantum-shift-active .balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(224,64,251,0.05) 0%, transparent 50%, rgba(0,255,255,0.05) 100%);
  animation: quantum-pulse 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes quantum-pulse {
  0%, 100% { opacity: 0.3; filter: hue-rotate(0deg); }
  50% { opacity: 0.8; filter: hue-rotate(60deg); }
}

body.theme-quantum-shift-active .btn-primary {
  background: linear-gradient(135deg, #e040fb, #00bcd4) !important;
  box-shadow: 0 0 20px rgba(224,64,251,0.3);
}

body.theme-quantum-shift-active .navbar {
  background: rgba(10,0,32,0.9) !important;
  border-top: 1px solid rgba(224,64,251,0.12);
}

/* === RETROWAVE === */
body.theme-retrowave-active .card,
body.theme-retrowave-active .settings-group,
body.theme-retrowave-active .balance-card {
  background: rgba(26,0,48,0.65) !important;
  border: 1px solid rgba(255,110,199,0.15);
  box-shadow:
    0 0 10px rgba(255,110,199,0.08),
    0 4px 20px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,110,199,0.08);
}

body.theme-retrowave-active .btn-primary {
  background: linear-gradient(135deg, #ff6ec7, #ffd319) !important;
  box-shadow: 0 4px 20px rgba(255,110,199,0.3);
  color: #1a0030 !important;
}

body.theme-retrowave-active .navbar {
  background: rgba(26,0,48,0.9) !important;
  border-top: 1px solid rgba(255,110,199,0.15);
}

/* ═══════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════ */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--shadow-md);
}

.glass-material {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--shadow-md);
  position: relative;
}
.glass-material::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  border-radius: inherit;
  pointer-events: none;
}

.neu {
  background: var(--bg-secondary);
  box-shadow: 4px 4px 8px var(--neu-dark), -4px -4px 8px var(--neu-light);
}

.neu-inset {
  box-shadow: var(--neu-inset-dark), var(--neu-inset-light);
}

/* ═══════════════════════════════════════════
   MICRO-INTERACTION KEYFRAMES
   ═══════════════════════════════════════════ */

@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes scaleOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0); opacity: 0; }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes slideDown {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}
@keyframes rubberBand {
  0% { transform: scale(1); }
  30% { transform: scaleX(1.15) scaleY(0.85); }
  40% { transform: scaleX(0.85) scaleY(1.15); }
  50% { transform: scaleX(1.05) scaleY(0.95); }
  65% { transform: scaleX(0.98) scaleY(1.02); }
  75% { transform: scaleX(1.02) scaleY(0.98); }
  100% { transform: scale(1); }
}
@keyframes springPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes shimmerGlass {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pressDown {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════
   STAGGERED ENTRANCE ANIMATION
   ═══════════════════════════════════════════ */

.stagger-item {
  opacity: 0;
  animation: pageEnter var(--duration-page) var(--ease-out-expo) forwards;
}
.stagger-item:nth-child(1) { animation-delay: 0ms; }
.stagger-item:nth-child(2) { animation-delay: 40ms; }
.stagger-item:nth-child(3) { animation-delay: 80ms; }
.stagger-item:nth-child(4) { animation-delay: 120ms; }
.stagger-item:nth-child(5) { animation-delay: 160ms; }
.stagger-item:nth-child(6) { animation-delay: 200ms; }
.stagger-item:nth-child(7) { animation-delay: 240ms; }
.stagger-item:nth-child(8) { animation-delay: 280ms; }
.stagger-item:nth-child(9) { animation-delay: 320ms; }
.stagger-item:nth-child(10) { animation-delay: 360ms; }
/* === HEADER ICON ANIMATIONS === */
.bell-icon {
  transform-origin: top center;
  /* animation triggered by class */
}
@keyframes bell-swing {
  0%, 100% { transform: rotate(0deg); }
  5% { transform: rotate(14deg); }
  10% { transform: rotate(-12deg); }
  15% { transform: rotate(8deg); }
  20% { transform: rotate(-4deg); }
  25% { transform: rotate(0deg); }
}

.qr-icon {
  position: relative;
}
.qr-scan-line {
  stroke: var(--accent);
  stroke-width: 2.5;
  animation: qr-scan 2.5s ease-in-out infinite;
}
@keyframes qr-scan {
  0%, 100% { opacity: 0.2; transform: translateY(-3px); }
  20%, 80% { opacity: 1; }
  50% { transform: translateY(3px); }
}

/* Toast touch fix */
.toast {
  touch-action: pan-y;
  cursor: grab;
}

/* === NOTIFICATION BADGE === */
.header-btn {
  position: relative;
}
#btn-notifications.has-notifications .bell-icon {
  animation: bell-swing 3s ease-in-out infinite;
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 2px;
  box-sizing: border-box;
  border: 1.5px solid var(--bg);
  pointer-events: none;
}
.notif-badge.visible {
  display: flex;
}

/* === NOTIFICATIONS MODAL === */
.notif-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.notif-overlay.visible {
  opacity: 1;
}
.notif-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}
.notif-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: rgba(var(--bg-secondary-rgb), 0.95);
  backdrop-filter: blur(var(--blur-xl));
  border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
  padding: var(--space-xl);
  padding-bottom: calc(var(--space-xl) + var(--safe-b));
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-modal);
  border-top: 0.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}
.notif-overlay.visible .notif-sheet {
  transform: translateY(0);
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-l);
}
.notif-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.notif-close-btn {
  background: var(--bg-tertiary);
  border: none;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}
.notif-list {
  overflow-y: auto;
  flex: 1;
  margin: 0 calc(-1 * var(--space-xl));
  padding: 0 var(--space-xl);
}
.notif-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-s);
  margin-top: var(--space-m);
}
.notif-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-m) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.notif-item.unread {
  color: var(--text);
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--accent-glow);
}
.notif-content {
  flex: 1;
}
.notif-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.notif-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.notif-empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: var(--space-2xl) 0;
  font-size: 14px;
}
.notif-history-btn {
  margin-top: var(--space-l);
  width: 100%;
  padding: 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.notif-history-btn:active {
  background: var(--accent-soft);
}

/* === GREETING FIX === */
.page > div:first-child {
  color: var(--text) !important;
  opacity: 1 !important;
}