/* Shop, thema's en Letterbits-animatie */
.shop-open-button {
  min-height: 50px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 17px;
  color: white;
  background: rgba(255,255,255,.12);
  font-weight: 850;
  backdrop-filter: blur(8px);
}
.shop-open-button:active { transform: scale(.985); }

#shop { padding-top: 20px; }
.shop-page { width: min(100%, 760px); margin: 0 auto; padding-bottom: 30px; }
.shop-heading { padding: 30px 2px 18px; }
.shop-heading h1 { margin-bottom: 12px; font-size: clamp(38px, 9vw, 58px); letter-spacing: -.055em; line-height: .98; }
.shop-heading > p:last-child { max-width: 560px; color: var(--muted); line-height: 1.55; }
.shop-wallet-card {
  margin-bottom: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(11,92,255,.12);
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
.shop-wallet-card > div { display: grid; gap: 1px; margin-right: auto; }
.shop-wallet-card > div span,
.shop-wallet-card > span:last-child { color: var(--muted); font-size: 12px; font-weight: 750; }
.shop-wallet-card strong { color: var(--blue-900); font-size: 25px; line-height: 1; }
.shop-grid { display: grid; gap: 14px; }
.shop-item-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 112px 1fr;
  min-height: 154px;
  border: 1px solid rgba(11,92,255,.11);
  border-radius: 24px;
  background: rgba(255,255,255,.93);
  box-shadow: var(--shadow);
}
.shop-item-card.is-active { border-color: rgba(11,92,255,.36); }
.shop-item-preview { min-height: 100%; position: relative; overflow: hidden; }
.shop-item-preview::after {
  content: "";
  position: absolute;
  width: 54px;
  height: 54px;
  right: -8px;
  bottom: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.25);
  box-shadow: -28px -38px 0 -8px rgba(255,255,255,.18);
  transform: rotate(12deg);
}
.shop-preview-default { background: linear-gradient(145deg, #eaf2ff 0%, #2875ff 100%); }
.shop-preview-ocean { background: linear-gradient(145deg, #d8fbf6 0%, #19b9b0 55%, #087f87 100%); }
.shop-preview-night { background: radial-gradient(circle at 30% 20%, #4068a9 0 4%, transparent 5%), linear-gradient(145deg, #172846 0%, #07111f 100%); }
.shop-preview-glow { background: radial-gradient(circle, #d9e8ff 0 15%, #62a2ff 36%, #0b5cff 64%, #061b44 100%); }
.shop-preview-glow::after { box-shadow: 0 0 34px 13px rgba(255,255,255,.5), -28px -38px 0 -8px rgba(255,255,255,.2); }
.shop-item-content { padding: 17px; display: grid; align-content: center; gap: 10px; }
.shop-item-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.shop-item-title-row strong { color: var(--blue-950); font-size: 20px; letter-spacing: -.025em; }
.shop-item-title-row span { color: var(--blue-700); font-size: 12px; font-weight: 850; white-space: nowrap; }
.shop-item-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.shop-action-button {
  width: fit-content;
  min-width: 104px;
  min-height: 39px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--blue-700);
  font-size: 12px;
  font-weight: 850;
}
.shop-action-button:disabled { color: var(--muted); background: var(--blue-100); opacity: 1; }
.shop-item-card.is-active .shop-action-button:disabled { color: var(--success); background: var(--success-bg); }
.shop-status { min-height: 22px; margin: 14px 2px 0; color: var(--muted); font-size: 13px; font-weight: 750; }
.shop-status.error { color: var(--error); }
.shop-status.success { color: var(--success); }

.bit-flight {
  position: fixed;
  z-index: 1000;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--blue-600);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 0 0 5px rgba(40,117,255,.13), 0 6px 16px rgba(11,92,255,.35);
  will-change: transform, opacity;
}
.wallet-pop { animation: wallet-pop .34s ease both; }
@keyframes wallet-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.11); }
  100% { transform: scale(1); }
}

html[data-theme="ocean"] {
  --blue-950: #063e42;
  --blue-900: #075e64;
  --blue-700: #078f95;
  --blue-600: #12aaa8;
  --blue-100: #dff7f4;
  --blue-050: #f1fbfa;
  --ink: #0b3135;
  --muted: #5d777a;
}
html[data-theme="ocean"] body {
  background: radial-gradient(circle at 100% 0%, rgba(28,190,180,.18), transparent 38%), linear-gradient(180deg, #f7fffd 0%, #eaf8f6 100%);
}
html[data-theme="ocean"] .shop-preview,
html[data-theme="ocean"] .account-overview {
  background: linear-gradient(135deg, #063e42, #078f95 70%, #1bbab0);
}

html[data-theme="night"] {
  --blue-950: #eef4ff;
  --blue-900: #dce8ff;
  --blue-700: #7aaaff;
  --blue-600: #94bcff;
  --blue-100: #172d50;
  --blue-050: #10213b;
  --ink: #f3f6fc;
  --muted: #aab8cc;
  --white: #0e1c31;
  --success: #6edbb3;
  --success-bg: #12382f;
  --error: #ff9b91;
  --error-bg: #3b2026;
}
html[data-theme="night"] body {
  background: radial-gradient(circle at 100% 0%, rgba(79,126,206,.22), transparent 36%), linear-gradient(180deg, #07111f 0%, #0b1729 100%);
}
html[data-theme="night"] .training-card,
html[data-theme="night"] .exercise-card,
html[data-theme="night"] .result-card,
html[data-theme="night"] .account-panel,
html[data-theme="night"] .shop-item-card,
html[data-theme="night"] .shop-wallet-card,
html[data-theme="night"] .auth-card {
  background: rgba(13,29,52,.96);
  border-color: rgba(132,174,242,.18);
}
html[data-theme="night"] .wallet,
html[data-theme="night"] .account-button,
html[data-theme="night"] .icon-button,
html[data-theme="night"] .back-button,
html[data-theme="night"] .secondary-button,
html[data-theme="night"] .danger-button {
  color: var(--blue-900);
  background: #10213b;
  border-color: #263e60;
}
html[data-theme="night"] .shop-preview,
html[data-theme="night"] .account-overview {
  background: linear-gradient(135deg, #07111f, #16335d 70%, #244c86);
}
html[data-theme="night"] .card-body strong,
html[data-theme="night"] .question-sentence,
html[data-theme="night"] .result-card h2,
html[data-theme="night"] .shop-item-title-row strong,
html[data-theme="night"] .account-panel h2,
html[data-theme="night"] .stats-total strong,
html[data-theme="night"] .progress-card strong { color: var(--ink); }
html[data-theme="night"] .progress-card,
html[data-theme="night"] .stats-total div {
  background: #10213b;
  border-color: #263e60;
}
html[data-theme="night"] .account-button:hover,
html[data-theme="night"] .shop-action-button:hover { filter: brightness(1.08); }

body.has-glow .brand-mark,
body.has-glow .wallet,
body.has-glow .training-card,
body.has-glow .exercise-card,
body.has-glow .result-card,
body.has-glow .account-panel,
body.has-glow .shop-item-card {
  box-shadow: 0 0 0 1px rgba(76,142,255,.14), 0 14px 44px rgba(42,116,255,.22), 0 0 28px rgba(74,145,255,.13);
}

@media (min-width: 720px) {
  .shop-grid { grid-template-columns: 1fr 1fr; }
  .shop-preview { grid-template-columns: 1fr auto; align-items: center; }
}
@media (max-width: 560px) {
  .shop-item-card { grid-template-columns: 92px 1fr; }
  .shop-item-content { padding: 15px; }
  .shop-item-title-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .shop-open-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-pop { animation: none; }
}
