/* ===== Checkout success ===== */
.success-check { display: flex; justify-content: center; color: var(--success); }

/* ===== Store category tabs ===== */
#category-tabs .category-tab { padding: 12px 22px; font-size: 14.5px; }
#category-tabs .category-tab svg { flex-shrink: 0; }

/* ===== Shared form bits ===== */
.text-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.text-input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(155,92,246,0.2); }
.form-label { display: block; font-size: 13px; color: var(--text-faint); margin: 16px 0 6px; }
.form-hint { font-size: 12.5px; color: var(--text-faint); margin: 6px 0 0; }

/* ===== Gift-to-another-player toggle (checkout) ===== */
.gift-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}
.gift-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary-light); cursor: pointer; }
.gift-fields {
  margin-top: 12px;
  padding: 14px 16px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
}
.gift-fields .form-label { margin-top: 0; }

/* ===== Donation goal ===== */
.goal-panel { padding: 26px 30px; }
.goal-head { margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.goal-amount { font-family: var(--font-heading); font-weight: 700; font-size: 18px; }
.goal-bar { height: 14px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; border: 1px solid var(--border); }
.goal-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 16px rgba(155,92,246,0.6);
}

/* ===== Daily reward / gift card ===== */
.daily-card { display: flex; flex-direction: column; justify-content: space-between; }

/* ===== Item cards ===== */
.item-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  animation: itemIn 0.35s ease both;
}
@keyframes itemIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.item-card-top { display: flex; align-items: center; gap: 14px; }
.item-icon { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-deep); }
.item-name { font-family: var(--font-heading); font-weight: 600; font-size: 16px; margin-bottom: 2px; }
.item-price { color: var(--accent); font-weight: 700; font-family: var(--font-mono); }
.item-stock { font-size: 12px; color: var(--text-faint); }
.item-stock.low { color: var(--warning); }
.item-stock.out { color: var(--danger); }
.item-short-desc { font-size: 13.5px; flex: 1; }
.item-card-actions { display: flex; gap: 8px; }
.item-card-actions .btn { flex: 1; }

/* ===== Top donator spotlight ===== */
.spotlight-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 100% at 15% 50%, rgba(155,92,246,0.28), transparent 70%),
    linear-gradient(180deg, var(--bg-panel-light), var(--bg-panel));
}
.spotlight-pose-wrap {
  position: relative;
  width: 120px;
  height: 150px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.spotlight-pose-wrap::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,209,102,0.35), transparent 70%);
  filter: blur(6px);
}
.spotlight-pose {
  position: relative;
  height: 150px;
  image-rendering: pixelated;
  animation: spotlightFloat 6s ease-in-out infinite;
}
@keyframes spotlightFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight-pose { animation: none; }
}
.spotlight-info { flex: 1; min-width: 0; }
.spotlight-info .badge { margin-bottom: 8px; }
.spotlight-name { font-family: var(--font-heading); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.spotlight-sub { font-size: 14px; margin-bottom: 0; }
.spotlight-total { font-family: var(--font-mono); font-size: 20px; color: var(--gold); flex-shrink: 0; text-align: right; }
.spotlight-total span { display: block; font-size: 11.5px; color: var(--text-faint); font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; }

@media (max-width: 620px) {
  .spotlight-card { flex-direction: column; text-align: center; padding: 26px 20px; }
  .spotlight-total { text-align: center; }
}

/* ===== Donator / supporter lists ===== */
.donator-list { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: rank; }
.donator-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.donator-list li:last-child { border-bottom: none; }
.donator-rank {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-family: var(--font-heading);
  background: var(--bg-deep); color: var(--text-faint); flex-shrink: 0;
}
.donator-rank.r1 { background: linear-gradient(135deg,#ffd166,#f7a600); color: #3a2600; }
.donator-rank.r2 { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color: #1f2937; }
.donator-rank.r3 { background: linear-gradient(135deg,#d3986b,#a3672f); color: #2b1a0c; }
.donator-head, .supporter-head { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.donator-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.donator-total { font-family: var(--font-mono); color: var(--accent); font-size: 14px; }

.supporter-list { list-style: none; margin: 16px 0 0; padding: 0; }
.supporter-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.supporter-list li:last-child { border-bottom: none; }
.donator-empty, .supporter-empty { color: var(--text-faint); font-size: 14px; padding: 10px 0; border-bottom: none !important; }
.supporter-text { flex: 1; font-size: 14px; }
.supporter-text strong { color: var(--text-primary); }
.supporter-time { font-size: 12px; color: var(--text-faint); white-space: nowrap; }

/* ===== Add-to-cart toast ===== */
.cart-toast {
  position: fixed;
  right: 26px;
  bottom: 100px;
  z-index: 240;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(525px, calc(100vw - 40px));
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--bg-panel-light), var(--bg-panel));
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.2,.8,.2,1), opacity 0.28s ease;
}
.cart-toast.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.cart-toast-icon { width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--border); flex-shrink: 0; }
.cart-toast-info { display: flex; flex-direction: column; font-size: 13.5px; flex-shrink: 0; }
.cart-toast-info strong { font-size: 14px; color: var(--text-primary); }
.cart-toast-info span { color: var(--text-faint); }
.cart-toast-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: nowrap; }
.cart-toast-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-faint); font-size: 16px; cursor: pointer; line-height: 1;
}
@media (max-width: 560px) {
  .cart-toast { left: 20px; right: 20px; bottom: 96px; flex-wrap: wrap; max-width: none; }
  .cart-toast-actions { width: 100%; margin-left: 0; }
  .cart-toast-actions .btn { flex: 1; }
}

/* ===== Cart FAB + drawer ===== */
.cart-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 250;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  border: none; color: #0d0620; font-size: 22px; cursor: pointer;
  box-shadow: 0 10px 30px rgba(155,92,246,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.cart-fab:hover { transform: scale(1.08); }
.cart-fab-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-void);
}

.drawer-overlay {
  position: fixed; inset: 0; z-index: 260;
  background: rgba(5,3,17,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 270;
  width: min(420px, 100vw);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  padding: 26px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.cart-drawer-head .modal-close { position: static; }

.cart-items { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.cart-item { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.cart-item-icon { width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--border); flex-shrink: 0; }
.cart-item-name { font-weight: 600; font-size: 14px; }
.cart-item-price { font-size: 12.5px; color: var(--text-faint); }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-deep); color: var(--text-primary); cursor: pointer;
}
.cart-remove { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 16px; }
.cart-remove:hover { color: var(--danger); }
.cart-empty { text-align: center; color: var(--text-faint); font-size: 14px; padding: 30px 10px; display: none; }
.cart-summary { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }

.platform-toggle { display: flex; gap: 10px; }
.platform-btn {
  flex: 1; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-deep); color: var(--text-muted);
  font-weight: 600; cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.platform-btn svg { flex-shrink: 0; }
.platform-btn.active { border-color: var(--primary-light); color: var(--text-primary); background: rgba(155,92,246,0.15); }
.checkout-summary { margin: 18px 0; padding: 14px; border-radius: var(--radius-sm); background: var(--bg-deep); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 480px) {
  .cart-drawer { width: 100vw; padding: 20px; }
}
