/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-light: #60a5fa;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --green: #34d399;
  --green-dark: #10b981;
  --red: #f87171;
  --red-dark: #ef4444;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.12);
  --radius: 20px;
  --radius-sm: 12px;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

/* === Main Page Header === */
.app-header {
  text-align: center;
  padding: 32px 0 40px;
}

.app-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
}

.header-emoji {
  display: inline-block;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

/* === Kid Cards (Main Page) === */
.kids-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5vw;
}

@media (max-width: 480px) {
  .kids-grid {
    grid-template-columns: 1fr;
  }
}

.kid-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.kid-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.kid-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.kid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

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

.kid-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.kid-card-avatar {
  font-size: 2.5rem;
  line-height: 1;
  position: absolute;
  top: 14px;
  right: 16px;
}

.kid-card-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
}

.kid-card-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.15em;
  margin: 12px 0 4px;
  font-family: 'Courier New', monospace;
}

.kid-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.kid-card-expiry {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kid-card-expiry-label {
  font-size: 0.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kid-card-expiry-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  font-family: 'Courier New', monospace;
}

.kid-card-balance {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* === Kid Detail Page Header === */
.kid-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 8px;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform 0.1s ease;
  flex-shrink: 0;
}

.back-btn:active {
  transform: scale(0.9);
}

.kid-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kid-avatar {
  font-size: 2.5rem;
  line-height: 1;
}

.kid-title h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
}

/* === Balance Card === */
.balance-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px 24px 28px;
  text-align: left;
  margin: 20px 0 28px;
  color: white;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.balance-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.balance-card-avatar {
  font-size: 2.5rem;
  line-height: 1;
  position: absolute;
  top: 14px;
  right: 16px;
}

.balance-card-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.balance-card-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
  font-family: 'Courier New', monospace;
}

.balance-card-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.balance-card-expiry {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.balance-card-expiry-label {
  font-size: 0.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.balance-card-expiry-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  font-family: 'Courier New', monospace;
}

.balance-label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.7;
  margin-bottom: 4px;
}

.balance-amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold-light);
}

/* === Sections === */
.section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

/* === Chips Grid === */
.chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--card-bg);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
  text-align: center;
  min-height: 80px;
}

.chip:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.chip:active {
  transform: scale(0.95);
}

.chip-label {
  line-height: 1.2;
}

.chip .chip-amount {
  color: var(--green-dark);
  font-weight: 800;
}

.chip-add {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.chip-add:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.chip-wrapper {
  position: relative;
  display: flex;
}

.chip-wrapper .chip {
  width: 100%;
  padding-top: 24px;
}

.chip-delete {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: white;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.1s ease;
  z-index: 1;
}

.chip-wrapper:hover .chip-delete,
.chip-wrapper:focus-within .chip-delete {
  opacity: 1;
}

.chip-delete:hover {
  background: var(--red-dark);
}

.chip-delete:active {
  transform: scale(0.9);
}

@media (hover: none) {
  .chip-delete {
    opacity: 1;
  }
}

/* Chip flash animation */
.chip.flash {
  animation: chipFlash 0.4s ease;
}

@keyframes chipFlash {
  0% { background: var(--card-bg); }
  30% { background: var(--green); color: white; }
  100% { background: var(--card-bg); }
}

/* === Withdraw === */
.withdraw-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.withdraw-btn:active {
  transform: scale(0.97);
}

.withdraw-form {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 12px;
}

/* === Forms === */
.form-input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  transition: border-color 0.15s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--blue-light);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease;
}

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

.btn-cancel {
  background: #e5e7eb;
  color: var(--text-light);
}

.btn-confirm {
  background: var(--blue);
  color: white;
}

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

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-task-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

/* === Earn Modal === */
.earn-modal {
  background: linear-gradient(170deg, #1a1f3a 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0;
  text-align: center;
  overflow: hidden;
  max-width: 340px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(99, 102, 241, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: earnModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes earnModalIn {
  from { opacity: 0; transform: scale(0.7) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.earn-modal-hero {
  padding: 28px 0 8px;
  position: relative;
}

.earn-modal-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.earn-modal-emoji {
  font-size: 4rem;
  display: block;
  animation: emojiPop 0.5s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes emojiPop {
  from { transform: scale(0) rotate(-15deg); }
  to { transform: scale(1) rotate(0deg); }
}

.earn-modal-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 4px 0 4px;
}

.earn-modal-subtitle {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  padding: 0 24px;
}

.earn-modal-amount-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 32px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  transition: border-color 0.2s ease;
}

.earn-modal-amount-wrap:focus-within {
  border-color: var(--gold-light);
  background: rgba(255, 255, 255, 0.08);
}

.earn-modal-dollar {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-light);
}

.earn-modal-amount-input {
  font-family: 'Nunito', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  background: none;
  border: none;
  outline: none;
  width: 80px;
  text-align: center;
  -moz-appearance: textfield;
}

.earn-modal-amount-input::-webkit-inner-spin-button,
.earn-modal-amount-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.earn-modal-actions {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.earn-modal-btn {
  flex: 1;
  padding: 18px 16px;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.earn-modal-btn:active {
  transform: scale(0.97);
}

.earn-modal-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 0 0 0 24px;
}

.earn-modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
}

.earn-modal-btn-confirm {
  background: linear-gradient(135deg, var(--green-dark), #06b6d4);
  color: white;
  border-radius: 0 0 24px 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.earn-modal-btn-confirm:hover {
  background: linear-gradient(135deg, #059669, #0891b2);
}

.earn-modal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === Transaction List === */
.txn-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.txn-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

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

.txn-info {
  flex: 1;
  min-width: 0;
}

.txn-label {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-date {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 2px;
}

.txn-amount {
  font-size: 1.15rem;
  font-weight: 800;
  margin-left: 12px;
  flex-shrink: 0;
}

.txn-amount.earn {
  color: var(--green-dark);
}

.txn-amount.withdraw {
  color: var(--red-dark);
}

.txn-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.txn-item:hover .txn-delete,
.txn-item:focus-within .txn-delete {
  opacity: 1;
}

.txn-delete:hover {
  background: var(--red-dark);
}

.txn-delete:active {
  transform: scale(0.9);
}

@media (hover: none) {
  .txn-delete {
    opacity: 1;
  }
}

.txn-empty {
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  padding: 24px 0;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: white;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

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

.toast.error {
  background: var(--red-dark);
}

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

/* === Loading Skeleton === */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === EMV Chip === */
.card-chip {
  width: 36px;
  height: 28px;
  border-radius: 5px;
  background: linear-gradient(135deg, #e8c547 0%, #d4a017 40%, #f0d060 60%, #c8960e 100%);
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), inset 0 -1px 2px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.card-chip::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: rgba(0, 0, 0, 0.12);
  transform: translateY(-0.5px);
}

.card-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

/* === Contactless Icon === */
.card-contactless {
  width: 20px;
  height: 20px;
  position: relative;
  transform: rotate(90deg);
  flex-shrink: 0;
  opacity: 0.5;
}

.card-contactless::before,
.card-contactless::after,
.card-contactless span {
  content: '';
  position: absolute;
  border: 1.5px solid white;
  border-radius: 50%;
  border-left-color: transparent;
  border-bottom-color: transparent;
}

.card-contactless::before {
  width: 8px;
  height: 8px;
  top: 6px;
  left: 4px;
}

.card-contactless::after {
  width: 14px;
  height: 14px;
  top: 3px;
  left: 1px;
}

.card-contactless span {
  width: 20px;
  height: 20px;
  top: 0;
  left: -2px;
}

/* === Visa Logo === */
.card-visa {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  font-weight: 800;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  z-index: 1;
}

/* === Card Theme Classes === */

/* Space — dark navy + star dots */
.theme-space {
  background:
    radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 85%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 35%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 50%, rgba(255,255,255,0.4) 0%, transparent 100%),
    linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%) !important;
}

/* Ocean — deep teal-to-blue + wave pattern */
.theme-ocean {
  background:
    repeating-linear-gradient(
      170deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.06) 4px,
      rgba(255,255,255,0.03) 8px,
      transparent 8px,
      transparent 20px
    ),
    linear-gradient(135deg, #064e3b 0%, #0369a1 100%) !important;
}

/* Sunset — warm orange-to-pink + soft radial glows */
.theme-sunset {
  background:
    radial-gradient(circle at 20% 80%, rgba(255,200,50,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,100,150,0.12) 0%, transparent 50%),
    radial-gradient(circle at 60% 60%, rgba(255,180,80,0.1) 0%, transparent 40%),
    linear-gradient(135deg, #9a3412 0%, #db2777 100%) !important;
}

/* Forest — dark green + diagonal line pattern */
.theme-forest {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 1px,
      transparent 1px,
      transparent 12px
    ),
    linear-gradient(135deg, #14532d 0%, #365314 100%) !important;
}

/* Galaxy — deep purple-to-magenta + sparkle dots */
.theme-galaxy {
  background:
    radial-gradient(1.5px 1.5px at 10% 15%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(200,180,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 65% 25%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 70%, rgba(255,200,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 90%, rgba(255,255,255,0.45) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 20% 40%, rgba(200,180,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 75% 50%, rgba(255,255,255,0.35) 0%, transparent 100%),
    linear-gradient(135deg, #4a1d96 0%, #be185d 100%) !important;
}

/* Lava — dark red-to-orange + angular chevron pattern */
.theme-lava {
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 2px,
      transparent 2px,
      transparent 14px
    ),
    repeating-linear-gradient(
      60deg,
      rgba(255,200,100,0.05) 0px,
      rgba(255,200,100,0.05) 2px,
      transparent 2px,
      transparent 14px
    ),
    linear-gradient(135deg, #7f1d1d 0%, #c2410c 100%) !important;
}

/* Arctic — icy teal-to-light blue + frost crystal pattern */
.theme-arctic {
  background:
    repeating-linear-gradient(
      60deg,
      rgba(255,255,255,0.05) 0px,
      rgba(255,255,255,0.05) 1px,
      transparent 1px,
      transparent 10px
    ),
    repeating-linear-gradient(
      -60deg,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(135deg, #155e75 0%, #bae6fd 100%) !important;
}

/* Candy — magenta-to-pink + bubbly dots */
.theme-candy {
  background:
    radial-gradient(circle 6px at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(circle 8px at 70% 20%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(circle 5px at 40% 75%, rgba(255,255,255,0.1) 0%, transparent 100%),
    radial-gradient(circle 7px at 85% 65%, rgba(255,255,255,0.07) 0%, transparent 100%),
    radial-gradient(circle 4px at 15% 80%, rgba(255,255,255,0.09) 0%, transparent 100%),
    linear-gradient(135deg, #a21caf 0%, #f472b6 100%) !important;
}

/* Storm — dark slate-to-indigo + electric diagonal streaks */
.theme-storm {
  background:
    repeating-linear-gradient(
      160deg,
      rgba(99,102,241,0.08) 0px,
      rgba(99,102,241,0.08) 2px,
      transparent 2px,
      transparent 16px
    ),
    repeating-linear-gradient(
      110deg,
      rgba(255,255,255,0.03) 0px,
      rgba(255,255,255,0.03) 1px,
      transparent 1px,
      transparent 20px
    ),
    linear-gradient(135deg, #1e293b 0%, #6366f1 100%) !important;
}

/* Desert — warm amber-to-gold + dune wave pattern */
.theme-desert {
  background:
    repeating-linear-gradient(
      175deg,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.07) 3px,
      rgba(255,255,255,0.04) 6px,
      transparent 6px,
      transparent 18px
    ),
    radial-gradient(circle at 75% 80%, rgba(255,200,50,0.12) 0%, transparent 50%),
    linear-gradient(135deg, #92400e 0%, #d97706 100%) !important;
}

/* === Theme Picker === */
.theme-picker-wrapper {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.theme-toggle-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s ease, transform 0.15s ease, background 0.2s ease;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-toggle-btn.active {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.12);
}

.theme-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px;
  width: 270px;
  z-index: 10;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  animation: pickerIn 0.15s ease;
}

@keyframes pickerIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.theme-picker.hidden {
  display: none;
}

.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  outline: none;
  padding: 0;
  position: relative;
}

.theme-swatch:hover {
  transform: scale(1.15);
}

.theme-swatch:active {
  transform: scale(0.95);
}

.theme-swatch.active {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

.swatch-space { background: linear-gradient(135deg, #0f172a, #1e3a5f); }
.swatch-ocean { background: linear-gradient(135deg, #064e3b, #0369a1); }
.swatch-sunset { background: linear-gradient(135deg, #9a3412, #db2777); }
.swatch-forest { background: linear-gradient(135deg, #14532d, #365314); }
.swatch-galaxy { background: linear-gradient(135deg, #4a1d96, #be185d); }
.swatch-lava { background: linear-gradient(135deg, #7f1d1d, #c2410c); }
.swatch-arctic { background: linear-gradient(135deg, #155e75, #bae6fd); }
.swatch-candy { background: linear-gradient(135deg, #a21caf, #f472b6); }
.swatch-storm { background: linear-gradient(135deg, #1e293b, #6366f1); }
.swatch-desert { background: linear-gradient(135deg, #92400e, #d97706); }

/* ==============================================
   HOME PAGE — "The Vault" Dark Premium Theme
   ============================================== */

/* --- Dark body background with aurora glows --- */
.home-body {
  background:
    /* Soft aurora glow top-left */
    radial-gradient(ellipse 600px 400px at 15% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 70%),
    /* Warm glow bottom-right */
    radial-gradient(ellipse 500px 350px at 85% 75%, rgba(245, 158, 11, 0.08) 0%, transparent 70%),
    /* Teal accent center */
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(52, 211, 153, 0.05) 0%, transparent 60%),
    /* Subtle dot grid overlay */
    radial-gradient(circle 1px at center, rgba(255, 255, 255, 0.03) 0%, transparent 100%),
    /* Base dark navy gradient */
    linear-gradient(170deg, #0a0e1a 0%, #111827 40%, #1a1f3a 100%);
  background-attachment: fixed;
  color: #e2e8f0;
}

/* --- Enhanced header for dark theme --- */
.home-body .app-header {
  padding: 40px 0 36px;
}

.vault-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(245, 158, 11, 0.15));
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 30px rgba(99, 102, 241, 0.15),
    0 0 60px rgba(245, 158, 11, 0.08),
    inset 0 0 20px rgba(255, 255, 255, 0.03);
  animation: vaultPulse 4s ease-in-out infinite;
}

.vault-logo-emoji {
  font-size: 2.4rem;
  line-height: 1;
  display: block;
  animation: wiggle 2s ease-in-out infinite;
}

@keyframes vaultPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.15), 0 0 60px rgba(245, 158, 11, 0.08), inset 0 0 20px rgba(255, 255, 255, 0.03); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.25), 0 0 80px rgba(245, 158, 11, 0.12), inset 0 0 25px rgba(255, 255, 255, 0.05); }
}

.home-body .app-header h1 {
  color: #f1f5f9;
  font-size: 2.2rem;
  text-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.app-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: #d4a017;
  opacity: 0.7;
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* --- Glow backdrop behind cards --- */
.cards-glow-backdrop {
  position: relative;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.cards-glow-backdrop::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 260px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, rgba(245, 158, 11, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(30px);
  z-index: 0;
}

/* Cards stay above the glow */
.home-body .kids-grid {
  position: relative;
  z-index: 1;
}

/* Enhance card hover on dark background */
.home-body .kid-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.1);
}

/* --- Floating decorative elements --- */
.floating-decorations {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.floater {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.12;
  animation: floatDrift linear infinite;
  will-change: transform;
}

.floater-1 { left: 5%;  top: 10%; font-size: 1.8rem; animation-duration: 18s; animation-delay: 0s; }
.floater-2 { left: 88%; top: 15%; font-size: 1.2rem; animation-duration: 22s; animation-delay: -3s; }
.floater-3 { left: 15%; top: 70%; font-size: 1.4rem; animation-duration: 20s; animation-delay: -7s; }
.floater-4 { left: 75%; top: 60%; font-size: 1rem;  animation-duration: 16s; animation-delay: -2s; }
.floater-5 { left: 45%; top: 85%; font-size: 1.6rem; animation-duration: 24s; animation-delay: -10s; }
.floater-6 { left: 92%; top: 45%; font-size: 1.3rem; animation-duration: 19s; animation-delay: -5s; }
.floater-7 { left: 30%; top: 25%; font-size: 1.1rem; animation-duration: 21s; animation-delay: -8s; }
.floater-8 { left: 60%; top: 5%;  font-size: 1.4rem; animation-duration: 17s; animation-delay: -12s; }

@keyframes floatDrift {
  0% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-30px) translateX(15px) rotate(90deg);
  }
  50% {
    transform: translateY(-10px) translateX(-10px) rotate(180deg);
  }
  75% {
    transform: translateY(-40px) translateX(8px) rotate(270deg);
  }
  100% {
    transform: translateY(0px) translateX(0px) rotate(360deg);
  }
}

/* --- Home footer --- */
.home-footer {
  text-align: center;
  padding: 40px 0 12px;
  position: relative;
  z-index: 1;
}

.home-footer p {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.03em;
}

/* Container sits above floating decorations */
.home-body .container {
  position: relative;
  z-index: 1;
}

/* ==============================================
   KID PAGE — Dark Theme Overrides
   ============================================== */

/* --- Back button --- */
.home-body .back-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.home-body .back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Kid title --- */
.home-body .kid-title h1 {
  color: #f1f5f9;
}

/* --- Section titles --- */
.home-body .section-title {
  color: #e2e8f0;
}

/* --- Chips --- */
.home-body .chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.home-body .chip:hover {
  border-color: var(--blue-light);
  background: rgba(255, 255, 255, 0.1);
}

.home-body .chip .chip-amount {
  color: var(--green);
}

.home-body .chip.flash {
  animation: chipFlashDark 0.4s ease;
}

@keyframes chipFlashDark {
  0% { background: rgba(255, 255, 255, 0.06); }
  30% { background: var(--green); color: white; }
  100% { background: rgba(255, 255, 255, 0.06); }
}

.home-body .chip-add {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}

.home-body .chip-add:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

/* --- Withdraw button & form --- */
.home-body .withdraw-form {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* --- Form inputs --- */
.home-body .form-input {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.home-body .form-input:focus {
  border-color: var(--blue-light);
  background: rgba(255, 255, 255, 0.1);
}

.home-body .form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.home-body .form-label {
  color: rgba(255, 255, 255, 0.5);
}

/* --- Buttons --- */
.home-body .btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.home-body .btn-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* --- Transaction list --- */
.home-body .txn-item {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.home-body .txn-label {
  color: #e2e8f0;
}

.home-body .txn-date {
  color: rgba(255, 255, 255, 0.4);
}

.home-body .txn-amount.earn {
  color: var(--green);
}

.home-body .txn-amount.withdraw {
  color: var(--red);
}

.home-body .txn-empty {
  color: rgba(255, 255, 255, 0.35);
}

/* --- Modal on dark theme --- */
.home-body .modal-overlay {
  background: rgba(5, 8, 18, 0.7);
}

.home-body .modal {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-body .modal-title {
  color: #f1f5f9;
}

.home-body .modal-task-name {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

/* --- Toast on dark theme --- */
.home-body .toast {
  background: #334155;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --- Theme picker swatches on dark bg --- */
.home-body .theme-swatch {
  border-color: rgba(255, 255, 255, 0.1);
}

.home-body .theme-swatch.active {
  border-color: var(--gold-light);
}

/* ==============================================
   PAGE BACKGROUND THEMES (per-kid)
   ============================================== */

.page-bg-space {
  background:
    radial-gradient(ellipse 600px 400px at 15% 20%, rgba(30, 58, 95, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 85% 75%, rgba(99, 102, 241, 0.1) 0%, transparent 70%),
    linear-gradient(170deg, #0a0e1a 0%, #0f172a 40%, #1e3a5f 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-ocean {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(3, 105, 161, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(6, 78, 59, 0.15) 0%, transparent 70%),
    linear-gradient(170deg, #042f2e 0%, #064e3b 40%, #0369a1 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-sunset {
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(255, 200, 50, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 20%, rgba(219, 39, 119, 0.1) 0%, transparent 70%),
    linear-gradient(170deg, #1a0a0a 0%, #9a3412 40%, #7f1d1d 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-forest {
  background:
    radial-gradient(ellipse 600px 400px at 15% 25%, rgba(20, 83, 45, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 85% 70%, rgba(54, 83, 20, 0.2) 0%, transparent 70%),
    linear-gradient(170deg, #0a1a0a 0%, #14532d 40%, #365314 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-galaxy {
  background:
    radial-gradient(ellipse 600px 400px at 25% 25%, rgba(74, 29, 150, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 75% 70%, rgba(190, 24, 93, 0.15) 0%, transparent 70%),
    linear-gradient(170deg, #1a0a2e 0%, #4a1d96 40%, #be185d 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-lava {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(194, 65, 12, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(127, 29, 29, 0.2) 0%, transparent 70%),
    linear-gradient(170deg, #1a0a0a 0%, #7f1d1d 40%, #c2410c 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-arctic {
  background:
    radial-gradient(ellipse 600px 400px at 15% 25%, rgba(21, 94, 117, 0.3) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 85% 70%, rgba(186, 230, 253, 0.08) 0%, transparent 70%),
    linear-gradient(170deg, #0a1a1e 0%, #155e75 40%, #164e63 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-candy {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(162, 28, 175, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(244, 114, 182, 0.12) 0%, transparent 70%),
    linear-gradient(170deg, #1a0a1e 0%, #a21caf 40%, #86198f 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-storm {
  background:
    radial-gradient(ellipse 600px 400px at 20% 25%, rgba(99, 102, 241, 0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(30, 41, 59, 0.3) 0%, transparent 70%),
    linear-gradient(170deg, #0a0e1a 0%, #1e293b 40%, #6366f1 100%) !important;
  background-attachment: fixed !important;
}

.page-bg-desert {
  background:
    radial-gradient(ellipse 600px 400px at 25% 30%, rgba(217, 119, 6, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 75% 75%, rgba(146, 64, 14, 0.2) 0%, transparent 70%),
    linear-gradient(170deg, #1a1008 0%, #92400e 40%, #d97706 100%) !important;
  background-attachment: fixed !important;
}

/* === Solid Page Backgrounds === */
.page-bg-solid-slate {
  background: #1e293b !important;
}

.page-bg-solid-charcoal {
  background: #1c1917 !important;
}

.page-bg-solid-midnight {
  background: #0f172a !important;
}

.page-bg-solid-ink {
  background: #18181b !important;
}

.page-bg-solid-graphite {
  background: #292524 !important;
}

/* === Floater Toggle === */
.floating-decorations.floaters-hidden {
  display: none;
}

/* === Theme Picker Sections === */
.theme-picker-section {
  width: 100%;
  margin-bottom: 8px;
}

.theme-picker-section:last-child {
  margin-bottom: 0;
}

.theme-picker-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  font-family: 'Nunito', sans-serif;
}

.theme-picker-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0 8px;
}

.theme-picker-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Solid colour swatches */
.swatch-solid-slate { background: #1e293b; }
.swatch-solid-charcoal { background: #1c1917; }
.swatch-solid-midnight { background: #0f172a; }
.swatch-solid-ink { background: #18181b; }
.swatch-solid-graphite { background: #292524; }

.swatch-solid-slate,
.swatch-solid-charcoal,
.swatch-solid-midnight,
.swatch-solid-ink,
.swatch-solid-graphite {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Floater toggle row */
.theme-floater-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.theme-floater-toggle-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Nunito', sans-serif;
}

.theme-floater-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.theme-floater-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease, background 0.2s ease;
}

.theme-floater-toggle.active {
  background: var(--green-dark);
}

.theme-floater-toggle.active::after {
  transform: translateX(20px);
  background: white;
}

/* === Coin Burst Animation === */
.coin-burst-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 10;
}

.coin-particle {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 2.4rem;
  line-height: 1;
  opacity: 1;
  animation: fireworkBurst 1s ease-out forwards;
  will-change: transform, opacity;
  pointer-events: none;
}

@keyframes fireworkBurst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  20% {
    transform: translate(
      calc(-50% + var(--dx) * 0.3),
      calc(-50% + var(--dy) * 0.3)
    ) scale(1.3);
    opacity: 1;
  }
  100% {
    transform: translate(
      calc(-50% + var(--dx)),
      calc(-50% + var(--dy))
    ) scale(1);
    opacity: 0;
  }
}

.coin-amount-float {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Nunito', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 2px 8px rgba(52, 211, 153, 0.4);
  animation: amountFloat 1.2s ease-out forwards;
  white-space: nowrap;
  pointer-events: none;
}

@keyframes amountFloat {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-60px);
    opacity: 0;
  }
}
