/* ============================================================
   Sets — custom styles
   - iOS Safari optimizations
   - Animation primitives
   - Form input polish
   ============================================================ */

:root {
  --lime: #c6f432;
  --gold: #d4af37;
  --bg: #09090b;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 20% -10%, rgba(198, 244, 50, 0.04), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(212, 175, 55, 0.025), transparent 35%),
    #09090b;
}

/* --- Touch targets: enforce 44px minimum + kill 300ms delay --- */
.touch-target {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  min-height: 44px;
  min-width: 44px;
}

/* --- Inputs: 16px+ to prevent iOS auto-zoom on focus --- */
input,
select,
textarea {
  font-size: 16px;
  touch-action: manipulation;
}

/* Remove iOS default input styling */
input[type="text"],
input[type="number"],
input[type="search"],
select {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* Number-style inputs: tabular */
input[inputmode="numeric"],
input[inputmode="decimal"] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Hide number spinner */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* --- Scrollbars: invisible on mobile, subtle on desktop --- */
.overflow-y-auto::-webkit-scrollbar { width: 0; }
@media (hover: hover) {
  .overflow-y-auto::-webkit-scrollbar { width: 6px; }
  .overflow-y-auto::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
  }
}

/* --- PR glow animation --- */
@keyframes prGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(212, 175, 55, 0.4),
      0 0 20px -2px rgba(212, 175, 55, 0.25),
      inset 0 0 12px -6px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(212, 175, 55, 0.7),
      0 0 28px -2px rgba(212, 175, 55, 0.45),
      inset 0 0 16px -6px rgba(212, 175, 55, 0.5);
  }
}

.pr-glow {
  animation: prGlow 2.2s ease-in-out infinite;
  background: linear-gradient(
    180deg,
    rgba(212, 175, 55, 0.07),
    rgba(212, 175, 55, 0.02)
  ) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}

.pr-glow .pr-badge {
  display: inline-flex !important;
}

.pr-badge { display: none; }

/* --- Fade-in for new blocks --- */
@keyframes blockIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.block-enter {
  animation: blockIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Modal slide-up --- */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
#modal-exercise:not(.hidden) > div:last-child {
  animation: slideUp 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Toast --- */
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
#toast:not(.hidden) {
  animation: toastIn 200ms ease-out;
}

/* --- Trend chart polish --- */
#trend-chart svg { display: block; width: 100%; height: auto; }
#trend-chart .bar { transition: opacity 200ms; }
#trend-chart .bar:hover { opacity: 0.85; }

/* --- Layout helper --- */
section.flex-col.hidden { display: none !important; }
section.flex-col:not(.hidden) { display: flex; }

/* --- Filter chips (history screen) --- */
.filter-chip {
  flex-shrink: 0;
  height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(39, 39, 42, 0.6);
  border: 1px solid #27272a;
  color: #a1a1aa;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}
.filter-chip:active {
  transform: scale(0.96);
}
.filter-chip.active {
  background: rgba(198, 244, 50, 0.12);
  border-color: rgba(198, 244, 50, 0.3);
  color: #C6F432;
}
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Spin animation */
.animate-spin {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================
   Muscle Split Chart
   ============================================================ */
.muscle-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.muscle-bar-label {
  width: 90px;
  font-size: 12px;
  color: #a1a1aa;
}
.muscle-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(39, 39, 42, 0.4);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.muscle-bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.muscle-bar-fill.push { background: #06b6d4; }
.muscle-bar-fill.pull { background: #8b5cf6; }
.muscle-bar-fill.legs { background: #f59e0b; }
.muscle-bar-fill.core { background: #10b981; }
.muscle-bar-fill.olympic { background: #3b82f6; }
.muscle-bar-fill.overig { background: #6b7280; }

.muscle-bar-count {
  width: 50px;
  text-align: right;
  font-family: monospace;
  font-size: 12px;
  color: #71717a;
}

/* ============================================================
   TQS Cards — Training Quality Score per spiergroep
   ============================================================ */
.tqs-card {
  border: 1px solid #27272a;
  border-radius: 14px;
  padding: 12px;
  background: rgba(9, 9, 11, 0.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tqs-card + .tqs-card { margin-top: 10px; }

.tqs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tqs-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tqs-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.tqs-dot.push { background: #06b6d4; }
.tqs-dot.pull { background: #8b5cf6; }
.tqs-dot.legs { background: #f59e0b; }
.tqs-dot.core { background: #10b981; }

.tqs-label {
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e7;
}
.tqs-zone {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}
.tqs-zone-none    { background: rgba(63, 63, 70, 0.4); color: #71717a; }
.tqs-zone-under   { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.tqs-zone-optimal { background: rgba(198, 244, 50, 0.12); color: #C6F432; }
.tqs-zone-high    { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.tqs-zone-over    { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }

.tqs-badge-wrap {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
}
.tqs-badge-prefix {
  font-size: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
  color: #71717a;
  text-transform: uppercase;
}
.tqs-badge {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  min-width: 26px;
  text-align: right;
}
.tqs-badge-gold  { color: #fbbf24; }
.tqs-badge-lime  { color: #C6F432; }
.tqs-badge-amber { color: #f59e0b; }
.tqs-badge-red   { color: #f87171; }

.tqs-tonnage {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  color: #a1a1aa;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.tqs-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.tqs-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 2px;
  border-radius: 6px;
  background: rgba(24, 24, 27, 0.6);
  border: 1px solid transparent;
}
.tqs-metric-label {
  font-size: 8.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
}
.tqs-metric-value {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tqs-metric-good .tqs-metric-value { color: #C6F432; }
.tqs-metric-mid  .tqs-metric-value { color: #fbbf24; }
.tqs-metric-low  .tqs-metric-value { color: #f87171; }

/* "Beste volgende training" advies */
.nbw-advice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(198, 244, 50, 0.08), rgba(198, 244, 50, 0.02));
  border: 1px solid rgba(198, 244, 50, 0.25);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nbw-advice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.nbw-advice-prefix {
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a1a1aa;
  font-weight: 600;
}
.nbw-advice-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 6px;
  color: #09090b;
}
.nbw-advice-pill.push { background: #06b6d4; }
.nbw-advice-pill.pull { background: #8b5cf6; color: #fafafa; }
.nbw-advice-pill.legs { background: #f59e0b; }
.nbw-advice-pill.core { background: #10b981; }

.nbw-advice-reason {
  font-size: 11px;
  color: #d4d4d8;
  line-height: 1.4;
}

/* Light mode aanpassingen */
html:not(.dark) .tqs-card {
  background: rgba(244, 244, 245, 0.6);
  border-color: #e4e4e7;
}
html:not(.dark) .tqs-label { color: #18181b; }
html:not(.dark) .tqs-tonnage { color: #52525b; }
html:not(.dark) .tqs-metric { background: rgba(228, 228, 231, 0.55); }
html:not(.dark) .tqs-metric-label { color: #52525b; }
html:not(.dark) .nbw-advice-reason { color: #3f3f46; }

/* ============================================================
   Plate Calculator Visual Barbell
   ============================================================ */
.barbell-visualization {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90px;
  background: rgba(9, 9, 11, 0.5);
  border: 1px solid #27272a;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  padding: 10px;
}
.barbell-bar {
  height: 6px;
  background: #a1a1aa;
  width: 90%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 40px;
}
.barbell-collar {
  width: 12px;
  height: 30px;
  background: #52525b;
  border-radius: 3px;
  position: absolute;
  right: 40px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.barbell-sleeve-end {
  width: 4px;
  height: 12px;
  background: #71717a;
  position: absolute;
  right: 0;
  border-radius: 1px;
}
.barbell-plates-holder {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  right: 56px;
  height: 100%;
}
.visual-plate {
  width: 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 9px;
  font-weight: bold;
  color: rgba(0,0,0,0.75);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  text-shadow: 0 0.5px 0.5px rgba(255,255,255,0.3);
  transition: all 0.3s ease;
}
.plate-25  { height: 64px; background: #ef4444; color: #fff; }
.plate-20  { height: 60px; background: #3b82f6; color: #fff; }
.plate-15  { height: 52px; background: #eab308; color: #000; }
.plate-10  { height: 44px; background: #22c55e; color: #fff; }
.plate-5   { height: 36px; background: #ffffff; color: #000; border: 1px solid #d4d4d8; }
.plate-2_5 { height: 28px; background: #52525b; color: #fff; }
.plate-1_25{ height: 24px; background: #cbd5e1; color: #000; }

.percentage-table th, .percentage-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(39, 39, 42, 0.5);
}
.percentage-table tr:last-child td {
  border-bottom: 0;
}

/* Light Mode (applied when root does NOT have .dark class) */
html:not(.dark) {
  --bg: #f4f4f5;
}
html:not(.dark) body {
  background:
    radial-gradient(circle at 20% -10%, rgba(198, 244, 50, 0.08), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(212, 175, 55, 0.05), transparent 35%),
    #f4f4f5 !important;
  color: #18181b !important;
}

/* HTML/Body backgrounds */
html:not(.dark) .bg-zinc-950 { background-color: #f4f4f5 !important; }
html:not(.dark) .text-zinc-50 { color: #18181b !important; }

/* Cards & wrappers */
html:not(.dark) .bg-zinc-900 { background-color: #ffffff !important; }
html:not(.dark) .bg-zinc-900\/60 { background-color: rgba(255, 255, 255, 0.8) !important; }
html:not(.dark) .bg-zinc-900\/50 { background-color: rgba(255, 255, 255, 0.6) !important; }
html:not(.dark) .bg-zinc-900\/20 { background-color: rgba(0, 0, 0, 0.02) !important; }
html:not(.dark) .bg-zinc-900\/40 { background-color: rgba(255, 255, 255, 0.4) !important; }

html:not(.dark) .bg-zinc-950\/80 { background-color: rgba(244, 244, 245, 0.8) !important; }
html:not(.dark) .bg-zinc-950\/95 { background-color: rgba(244, 244, 245, 0.95) !important; }
html:not(.dark) .bg-zinc-950\/40 { background-color: rgba(244, 244, 245, 0.5) !important; }
html:not(.dark) .bg-zinc-800 { background-color: #e4e4e7 !important; }
html:not(.dark) .bg-zinc-800\/60 { background-color: rgba(228, 228, 231, 0.6) !important; }
html:not(.dark) .bg-zinc-800\/50 { background-color: rgba(228, 228, 231, 0.4) !important; }
html:not(.dark) .bg-zinc-800\/40 { background-color: rgba(228, 228, 231, 0.4) !important; }

/* Borders */
html:not(.dark) .border-zinc-800 { border-color: #e4e4e7 !important; }
html:not(.dark) .border-zinc-800\/80 { border-color: rgba(228, 228, 231, 0.8) !important; }
html:not(.dark) .border-zinc-800\/60 { border-color: rgba(228, 228, 231, 0.6) !important; }
html:not(.dark) .border-zinc-700\/80 { border-color: rgba(228, 228, 231, 0.8) !important; }
html:not(.dark) .border-zinc-900 { border-color: #e4e4e7 !important; }
html:not(.dark) .border-zinc-900\/50 { border-color: rgba(228, 228, 231, 0.5) !important; }

/* Text colors */
html:not(.dark) .text-zinc-100 { color: #09090b !important; }
html:not(.dark) .text-zinc-200 { color: #18181b !important; }
html:not(.dark) .text-zinc-300 { color: #27272a !important; }
html:not(.dark) .text-zinc-400 { color: #71717a !important; }
html:not(.dark) .text-zinc-500 { color: #8e8e93 !important; }
html:not(.dark) .text-zinc-600 { color: #a1a1aa !important; }

/* Inputs & placeholders */
html:not(.dark) input {
  color: #18181b !important;
}
html:not(.dark) input::placeholder {
  color: #a1a1aa !important;
}
html:not(.dark) .placeholder\:text-zinc-700::placeholder {
  color: #a1a1aa !important;
}

/* Focus states */
html:not(.dark) .focus\:border-lime-accent:focus {
  border-color: #8fae08 !important;
}

/* Active/Hover states */
html:not(.dark) .active\:bg-zinc-900:active { background-color: #e4e4e7 !important; }
html:not(.dark) .active\:bg-zinc-800:active { background-color: #d4d4d8 !important; }

/* Modals */
html:not(.dark) #modal-exercise > div:last-child,
html:not(.dark) #modal-settings > div:last-child,
html:not(.dark) #modal-1rm-calc > div:last-child,
html:not(.dark) #modal-plate-calc > div:last-child {
  background-color: #ffffff !important;
  border-top-color: #e4e4e7 !important;
}

/* Muscle Split Chart adjustments for light background */
html:not(.dark) .muscle-bar-track {
  background: rgba(228, 228, 231, 0.8) !important;
}
html:not(.dark) .muscle-bar-count {
  color: #71717a !important;
}

/* Barbell visualizer adjustments */
html:not(.dark) .barbell-visualization {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: #e4e4e7 !important;
}
html:not(.dark) .barbell-bar {
  background: #71717a !important;
}
html:not(.dark) .barbell-collar {
  background: #a1a1aa !important;
}
html:not(.dark) .barbell-sleeve-end {
  background: #8e8e93 !important;
}
html:not(.dark) .plate-5 {
  background: #f4f4f5 !important;
  border-color: #cbd5e1 !important;
}

/* Trend Chart (SVG) overrides */
html:not(.dark) #trend-chart text {
  fill: #71717a !important;
}
html:not(.dark) #trend-chart line, html:not(.dark) #trend-chart path {
  stroke: #e4e4e7 !important;
}

/* Filter chips */
html:not(.dark) .filter-chip {
  background: rgba(228, 228, 231, 0.5) !important;
  border-color: #e4e4e7 !important;
  color: #71717a !important;
}
html:not(.dark) .filter-chip.active {
  background: rgba(198, 244, 50, 0.15) !important;
  border-color: rgba(198, 244, 50, 0.4) !important;
  color: #759007 !important;
}

/* Custom utility overrides */
.bottom-fade-gradient {
  background: linear-gradient(to top, #f4f4f5 0%, rgba(244, 244, 245, 0.95) 60%, rgba(244, 244, 245, 0) 100%);
}
.dark .bottom-fade-gradient {
  background: linear-gradient(to top, #09090b 0%, rgba(9, 9, 11, 0.95) 60%, rgba(9, 9, 11, 0) 100%);
}

.workout-bottom-bar {
  border-top: 1px solid #e4e4e7;
  background-color: rgba(244, 244, 245, 0.95);
}
.dark .workout-bottom-bar {
  border-top: 1px solid #27272a;
  background-color: rgba(9, 9, 11, 0.95);
}

.top-ex-bar {
  background-color: rgba(24, 24, 27, 0.05);
}
.dark .top-ex-bar {
  background-color: rgba(228, 228, 231, 0.08);
}

.rotation-row {
  background-color: rgba(9, 9, 11, 0.4);
  border: 1px solid #27272a;
}
html:not(.dark) .rotation-row {
  background-color: rgba(24, 24, 27, 0.04) !important;
  border-color: rgba(24, 24, 27, 0.06) !important;
}

/* ============================================================
   Light Mode Color Contrast Polish
   ============================================================ */

/* Lime accent text elements */
html:not(.dark) .text-lime-accent {
  color: #4d7c0f !important;
}
html:not(.dark) .bg-lime-accent\/10 {
  background-color: rgba(77, 124, 15, 0.12) !important;
}

/* Gold PR text elements */
html:not(.dark) .text-gold-pr {
  color: #b45309 !important;
}
html:not(.dark) .bg-gold-pr\/10 {
  background-color: rgba(180, 83, 9, 0.12) !important;
}

/* Active filter chips */
html:not(.dark) .filter-chip.active {
  background: rgba(77, 124, 15, 0.12) !important;
  border-color: rgba(77, 124, 15, 0.25) !important;
  color: #4d7c0f !important;
}

/* "Beste volgende training" advice box */
html:not(.dark) .nbw-advice {
  background: linear-gradient(135deg, rgba(77, 124, 15, 0.06), rgba(77, 124, 15, 0.02)) !important;
  border-color: rgba(77, 124, 15, 0.2) !important;
}

/* TQS Tiers */
html:not(.dark) .tqs-badge-lime {
  color: #4d7c0f !important;
}
html:not(.dark) .tqs-badge-gold {
  color: #b45309 !important;
}
html:not(.dark) .tqs-badge-amber {
  color: #b45309 !important;
}
html:not(.dark) .tqs-badge-red {
  color: #dc2626 !important;
}

/* TQS Zones */
html:not(.dark) .tqs-zone-optimal {
  background-color: rgba(77, 124, 15, 0.12) !important;
  color: #4d7c0f !important;
}
html:not(.dark) .tqs-zone-under {
  background-color: rgba(220, 38, 38, 0.08) !important;
  color: #dc2626 !important;
}
html:not(.dark) .tqs-zone-over {
  background-color: rgba(220, 38, 38, 0.12) !important;
  color: #dc2626 !important;
}

/* Metric values */
html:not(.dark) .tqs-metric-good .tqs-metric-value {
  color: #4d7c0f !important;
}
html:not(.dark) .tqs-metric-mid .tqs-metric-value {
  color: #b45309 !important;
}
html:not(.dark) .tqs-metric-low .tqs-metric-value {
  color: #dc2626 !important;
}

/* Calendar active indicators */
html:not(.dark) span.bg-lime-accent {
  background-color: #4d7c0f !important;
}

/* ============================================================
   Ladder Competition Styles
   ============================================================ */

.ladder-row {
  position: relative;
  overflow: hidden;
}

/* Animated glow for the user's own row */
.ladder-row-me {
  box-shadow: 0 0 0 1px rgba(198, 244, 50, 0.25), 0 4px 20px rgba(198, 244, 50, 0.08);
  animation: ladder-pulse 3s ease-in-out infinite;
}

@keyframes ladder-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(198, 244, 50, 0.25), 0 4px 20px rgba(198, 244, 50, 0.08); }
  50%       { box-shadow: 0 0 0 1px rgba(198, 244, 50, 0.4),  0 4px 24px rgba(198, 244, 50, 0.16); }
}

/* Light mode overrides for ladder */
html:not(.dark) .ladder-row {
  background-color: rgba(255, 255, 255, 0.8) !important;
  border-color: #e4e4e7 !important;
}
html:not(.dark) .ladder-row-me {
  background-color: rgba(77, 124, 15, 0.06) !important;
  border-color: rgba(77, 124, 15, 0.3) !important;
  box-shadow: 0 0 0 1px rgba(77, 124, 15, 0.2), 0 4px 20px rgba(77, 124, 15, 0.06);
}
html:not(.dark) .ladder-row-me .text-lime-accent {
  color: #4d7c0f !important;
}

/* ============================================================
   Achievements Auras
   ============================================================ */

.aura-bronze {
  --aura-border: rgba(180, 83, 9, 0.2);
  --aura-glow: rgba(180, 83, 9, 0.1);
  --aura-glow-blur: 12px;
  --aura-border-peak: rgba(180, 83, 9, 0.45);
  --aura-glow-peak: rgba(180, 83, 9, 0.25);
  --aura-glow-blur-peak: 22px;
  --aura-inner: inset 0 0 0 transparent;
  --aura-inner-peak: inset 0 0 0 transparent;
  
  box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  animation: aura-pulse-bronze 3s ease-in-out infinite;
}
.dark .aura-bronze {
  --aura-border: rgba(217, 119, 6, 0.2);
  --aura-glow: rgba(217, 119, 6, 0.15);
  --aura-glow-blur: 15px;
  --aura-border-peak: rgba(217, 119, 6, 0.5);
  --aura-glow-peak: rgba(217, 119, 6, 0.35);
  --aura-glow-blur-peak: 28px;
}

.aura-silver {
  --aura-border: rgba(113, 113, 122, 0.2);
  --aura-glow: rgba(113, 113, 122, 0.12);
  --aura-glow-blur: 15px;
  --aura-border-peak: rgba(113, 113, 122, 0.45);
  --aura-glow-peak: rgba(113, 113, 122, 0.3);
  --aura-glow-blur-peak: 28px;
  --aura-inner: inset 0 0 0 transparent;
  --aura-inner-peak: inset 0 0 0 transparent;

  box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  animation: aura-pulse-silver 3s ease-in-out infinite;
}
.dark .aura-silver {
  --aura-border: rgba(161, 161, 170, 0.25);
  --aura-glow: rgba(161, 161, 170, 0.2);
  --aura-glow-blur: 20px;
  --aura-border-peak: rgba(161, 161, 170, 0.55);
  --aura-glow-peak: rgba(161, 161, 170, 0.45);
  --aura-glow-blur-peak: 38px;
}

.aura-gold {
  --aura-border: rgba(202, 138, 4, 0.25);
  --aura-glow: rgba(202, 138, 4, 0.2);
  --aura-glow-blur: 20px;
  --aura-border-peak: rgba(202, 138, 4, 0.55);
  --aura-glow-peak: rgba(202, 138, 4, 0.45);
  --aura-glow-blur-peak: 35px;
  --aura-inner: inset 0 0 8px rgba(202, 138, 4, 0.04);
  --aura-inner-peak: inset 0 0 12px rgba(202, 138, 4, 0.1);

  box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  animation: aura-pulse-gold 3s ease-in-out infinite;
}
.dark .aura-gold {
  --aura-border: rgba(234, 179, 8, 0.3);
  --aura-glow: rgba(234, 179, 8, 0.3);
  --aura-glow-blur: 25px;
  --aura-border-peak: rgba(234, 179, 8, 0.7);
  --aura-glow-peak: rgba(234, 179, 8, 0.65);
  --aura-glow-blur-peak: 50px;
  --aura-inner: inset 0 0 10px rgba(234, 179, 8, 0.05);
  --aura-inner-peak: inset 0 0 16px rgba(234, 179, 8, 0.15);
}

@keyframes aura-pulse-bronze {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  }
  50% {
    box-shadow: 0 0 0 1px var(--aura-border-peak), 0 0 var(--aura-glow-blur-peak) var(--aura-glow-peak), var(--aura-inner-peak);
  }
}

@keyframes aura-pulse-silver {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  }
  50% {
    box-shadow: 0 0 0 1.5px var(--aura-border-peak), 0 0 var(--aura-glow-blur-peak) var(--aura-glow-peak), var(--aura-inner-peak);
  }
}

@keyframes aura-pulse-gold {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--aura-border), 0 0 var(--aura-glow-blur) var(--aura-glow), var(--aura-inner);
  }
  50% {
    box-shadow: 0 0 0 2px var(--aura-border-peak), 0 0 var(--aura-glow-blur-peak) var(--aura-glow-peak), var(--aura-inner-peak);
  }
}

/* ============================================================
   PWA Install Banner
   ============================================================ */

.pwa-install-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 1rem) scale(0.95);
  width: calc(100% - 2rem);
  max-width: 420px;
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(24, 24, 27, 0.75);
  border: 1px solid rgba(63, 63, 70, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

html:not(.dark) .pwa-install-banner {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(228, 228, 231, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.pwa-install-banner.active {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}






