* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pri: #6366f1;
  --pri-h: #4f46e5;
  --bg: #f8fafc;
  --sf: #ffffff;
  --sf-h: #f1f5f9;
  --tx: #1e293b;
  --tx2: #64748b;
  --bd: #e2e8f0;
  --r: 10px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--tx);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
  padding: 14px 24px;
  text-align: center;
}
.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
header h1 { font-size: 22px; font-weight: 700; }
header .subtitle { color: var(--tx2); font-size: 13px; margin-top: 2px; }
.user-area {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.user-beans {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 12px;
}
.user-email {
  color: var(--tx2);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-text {
  background: none;
  border: none;
  color: var(--tx2);
  cursor: pointer;
  font-size: 12px;
}
.btn-text:hover { color: var(--pri); }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--pri);
  color: var(--pri);
  border-radius: 6px;
  cursor: pointer;
  transition: .2s;
}
.btn-outline:hover { background: var(--pri); color: #fff; }

/* ── Highlights strip ── */
.highlights-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.hl-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(99,102,241,.04));
  border: 1px solid rgba(99,102,241,.18);
  border-radius: 20px;
  font-size: 12px;
  color: var(--pri);
  font-weight: 500;
  white-space: nowrap;
  transition: .2s;
}
.hl-tag:hover {
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(99,102,241,.08));
  transform: translateY(-1px);
}

/* ── Layout ── */
main {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px;
  gap: 16px;
}

/* ── Sidebar ── */
.controls {
  width: 270px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.controls section {
  background: var(--sf);
  border-radius: var(--r);
  border: 1px solid var(--bd);
  padding: 14px;
}
.controls h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Drop zone ── */
.drop-zone {
  border: 2px dashed var(--bd);
  border-radius: var(--r);
  padding: 28px 12px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  color: var(--tx2);
  font-size: 13px;
  line-height: 1.7;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--pri);
  background: rgba(99,102,241,.04);
  color: var(--pri);
}

/* ── Preview ── */
.preview-container {
  margin-top: 10px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--bd);
}
.preview-container img { width: 100%; display: block; }
.hidden { display: none !important; }

/* ── Form controls ── */
.control-group { margin-bottom: 10px; }
.control-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 3px;
}
.control-group small { font-size: 11px; color: var(--tx2); }
.control-group select, .control-group input[type="range"] { width: 100%; }
select {
  padding: 5px 8px;
  border: 1px solid var(--bd);
  border-radius: 4px;
  font-size: 13px;
  background: var(--sf);
}
input[type="range"] { margin-top: 3px; }
.control-group label input[type="checkbox"] { margin-right: 5px; }

/* ── Buttons ── */
.btn {
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: .2s;
  margin-bottom: 6px;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--pri); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--pri-h); }
.btn-secondary { background: var(--sf); color: var(--tx); border: 1px solid var(--bd); }
.btn-secondary:hover:not(:disabled) { background: var(--sf-h); }

/* ── Gallery button ── */
.btn-gallery {
  width: 100%;
  padding: 8px 14px;
  border: 1px dashed var(--pri);
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(99,102,241,.04);
  color: var(--pri);
  margin-top: 6px;
  transition: .2s;
}
.btn-gallery:hover {
  background: rgba(99,102,241,.10);
  border-style: solid;
}

/* ── Gallery modal ── */
.gallery-box {
  background: var(--sf);
  border-radius: 14px;
  padding: 0;
  max-width: 680px;
  width: 94%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}
.gallery-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--bd);
  position: relative;
}
.gallery-header h2 { font-size: 18px; font-weight: 700; }
.gallery-sub { font-size: 13px; color: var(--tx2); margin-top: 2px; }
.gallery-header .modal-close {
  position: absolute;
  top: 12px; right: 16px;
}
.gallery-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--bd);
  overflow-x: auto;
  flex-shrink: 0;
}
.gallery-tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--tx2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: .15s;
}
.gallery-tab:hover { color: var(--tx); }
.gallery-tab.active {
  color: var(--pri);
  border-bottom-color: var(--pri);
  font-weight: 600;
}
.gallery-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  align-content: start;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid var(--bd);
  cursor: pointer;
  transition: .15s;
  text-align: center;
}
.gallery-item:hover {
  border-color: var(--pri);
  background: rgba(99,102,241,.04);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,.10);
}
.gallery-item img {
  width: 56px; height: 56px;
  object-fit: contain;
}
.gallery-item span {
  font-size: 11px;
  color: var(--tx2);
  line-height: 1.3;
}

/* ── Stats ── */
.stats-section .stat-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--bd);
}
.stats-section .stat-item:last-child { border-bottom: none; }
.stat-value { font-weight: 600; }

/* ── Pattern area ── */
.pattern-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pattern-container {
  position: relative;
  border-radius: var(--r);
}
.pattern-container canvas { display: none; width: 100%; height: 100%; }
.pattern-container.has-pattern {
  height: 55vh;
  background: var(--sf);
  border: 1px solid var(--bd);
  resize: vertical;
  overflow: auto;
  min-height: 200px;
  max-height: 85vh;
}
.pattern-container.has-pattern canvas { display: block; }
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx2);
  font-size: 15px;
  pointer-events: none;
  padding: 12px 0;
}

/* ── Feature showcase ── */
.feature-showcase {
  max-width: 100%;
  pointer-events: auto;
}
.feature-showcase h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 12px;
  text-align: center;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.feature-card {
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  transition: .2s;
}
.feature-card:hover {
  border-color: var(--pri);
  box-shadow: 0 2px 8px rgba(99,102,241,.10);
  transform: translateY(-1px);
}
.fc-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.feature-card h4 {
  font-size: 11px;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 2px;
}
.feature-card p {
  font-size: 10px;
  line-height: 1.4;
  color: var(--tx2);
}
.showcase-cta {
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: var(--pri);
  font-weight: 600;
}

/* ── Legend ── */
.legend-section {
  background: var(--sf);
  border-radius: var(--r);
  border: 1px solid var(--bd);
  padding: 14px;
}
.legend-section h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.legend-content { display: flex; flex-wrap: wrap; gap: 6px; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid var(--bd);
  font-size: 12px;
  background: var(--bg);
}
.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,.12);
  flex-shrink: 0;
}
.legend-code { font-weight: 600; }
.legend-name { color: var(--tx2); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-count { color: var(--tx2); }
.legend-bags {
  color: var(--pri);
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}

/* ── Bead tooltip ── */
.bead-tooltip {
  position: fixed;
  background: rgba(30,41,59,.92);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.tip-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,.4);
  vertical-align: middle;
  margin-right: 4px;
}

/* ── Usage info ── */
.usage-info {
  text-align: center;
  font-size: 12px;
  color: var(--tx2);
  padding: 6px 0 2px;
}
.usage-info b { color: var(--pri); font-size: 14px; }
.usage-info.usage-low b { color: #ef4444; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--sf);
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--tx2);
}
.modal-box h2 { font-size: 20px; margin-bottom: 10px; }
.modal-box p { font-size: 14px; color: var(--tx2); line-height: 1.6; }
.modal-box ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.modal-box ul li {
  font-size: 14px;
  padding: 4px 0;
}
.pricing {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}
.price-card {
  flex: 1;
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  position: relative;
}
.price-card.featured {
  border-color: var(--pri);
  background: rgba(99,102,241,0.04);
}
.price-badge {
  position: absolute;
  top: -10px; right: 12px;
  background: var(--pri);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.price-label { font-size: 13px; color: var(--tx2); margin-bottom: 4px; }
.price-amount { font-size: 22px; font-weight: 700; color: var(--tx); }
.price-amount span { font-size: 13px; font-weight: 400; color: var(--tx2); }
.modal-hint { font-size: 11px; color: #aaa; text-align: center; margin-top: 8px; }
.price-desc { font-size: 11px; color: var(--tx2); margin-top: 4px; }

/* ── Auth Modal ── */
.auth-modal-box { max-width: 380px; }
.auth-tabs {
  display: flex;
  gap: 0;
  margin: 16px 0 12px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  overflow: hidden;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--tx2);
  transition: .2s;
}
.auth-tab.active {
  background: var(--pri);
  color: #fff;
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .form-group { width: 100%; }
.auth-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--tx2);
  margin-bottom: 4px;
}
.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: .2s;
  box-sizing: border-box;
}
.auth-form input:focus { border-color: var(--pri); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.auth-form input.input-error { border-color: #ef4444; }
.auth-form input.input-error:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.auth-form input.input-ok { border-color: #22c55e; }
.field-error {
  display: block;
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
  margin-top: 2px;
  transition: .2s;
}
.code-group {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.code-group .code-input-wrap { flex: 1; min-width: 0; }
.code-group input { flex: 1; min-width: 0; }
.send-code-btn {
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--pri);
  color: var(--pri);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: .2s;
  margin-bottom: 1px;
}
.send-code-btn:hover { background: var(--pri); color: #fff; }
.send-code-btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-full { width: 100%; padding: 10px; position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-tip {
  color: var(--tx2);
  font-size: 13px;
  margin-top: 4px;
}
/* Password toggle */
.pw-input-wrap {
  position: relative;
  width: 100%;
}
.pw-input-wrap input { padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  opacity: .5;
  transition: .2s;
}
.pw-toggle:hover { opacity: 1; }
/* Spinner */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
.btn-spinner.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Forgot password */
.forgot-link {
  text-align: center;
  margin-top: 4px;
}
.forgot-link a {
  font-size: 12px;
  color: var(--tx2);
  text-decoration: none;
}
.forgot-link a:hover { color: var(--pri); }
/* Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #22c55e;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  z-index: 2000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.toast.toast-error { background: #ef4444; }
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 800px) {
  main { flex-direction: column; height: auto; }
  .controls { width: 100%; }
  .pattern-container.has-pattern { height: 45vh; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Crop overlay ── */
.preview-container { position: relative; }
.preview-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
}
.preview-img-wrap img { display: block; width: 100%; }
.crop-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: crosshair;
  z-index: 10;
}
.crop-box {
  position: absolute;
  border: 2px dashed #fff;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  background: transparent;
  min-width: 10px;
  min-height: 10px;
  pointer-events: none;
}
.crop-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  position: relative;
  z-index: 20;
}
.crop-btn { margin-top: 4px; position: relative; z-index: 20; }

/* ── Comparison overlay ── */
.compare-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.compare-overlay img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.55;
}
.compare-slider-wrap {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  background: rgba(30,41,59,.8);
  padding: 4px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}
.compare-slider-wrap label { color: #fff; font-size: 12px; }
.compare-slider-wrap input { width: 100px; }

/* ── History ── */
.history-section {
  background: var(--sf);
  border-radius: var(--r);
  border: 1px solid var(--bd);
  padding: 14px;
}
.history-section h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--tx2);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.history-content { display: flex; flex-direction: column; gap: 6px; }
.history-empty { font-size: 12px; color: var(--tx2); text-align: center; }
.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--bd);
  cursor: pointer;
  transition: .15s;
  font-size: 12px;
}
.history-item:hover { background: var(--sf-h); border-color: var(--pri); }
.history-thumb {
  width: 40px; height: 40px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--bd);
}
.history-meta { flex: 1; min-width: 0; }
.history-meta .h-size { font-weight: 600; }
.history-meta .h-date { color: var(--tx2); font-size: 11px; }
.history-del {
  background: none;
  border: none;
  color: var(--tx2);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
}
.history-del:hover { color: #ef4444; }

/* ── Bead picker popup ── */
.bead-picker {
  position: fixed;
  z-index: 600;
  background: var(--sf);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  width: 260px;
  max-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bd);
  font-size: 13px;
  font-weight: 600;
}
.bp-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--tx2); line-height: 1;
}
.bp-search {
  margin: 6px 10px;
  padding: 5px 8px;
  border: 1px solid var(--bd);
  border-radius: 5px;
  font-size: 12px;
  outline: none;
}
.bp-search:focus { border-color: var(--pri); }
.bp-colors {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 4px;
  align-content: start;
}
.bp-swatch {
  width: 36px; height: 36px;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: .15s;
}
.bp-swatch:hover {
  border-color: var(--pri);
  transform: scale(1.15);
  z-index: 1;
}
.bp-swatch.bp-active {
  border-color: var(--pri);
  box-shadow: 0 0 0 2px rgba(99,102,241,.35);
}
.bp-swatch::after {
  content: attr(data-code);
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  white-space: nowrap;
  color: var(--tx2);
  opacity: 0;
  pointer-events: none;
  transition: .15s;
}
.bp-swatch:hover::after { opacity: 1; }

/* edit-mode canvas cursor */
.canvas-edit-mode { cursor: crosshair !important; }
.edit-mode-hint {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(99,102,241,.9);
  color: #fff;
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 4;
}

/* ── Recharge Modal ── */
.recharge-modal-box { max-width: 520px; }
.recharge-balance { font-size: 16px; color: #666; margin-bottom: 16px; }
.recharge-balance b { color: #6366f1; font-size: 20px; }
.recharge-section { margin-bottom: 18px; }
.recharge-section h3 { font-size: 15px; margin-bottom: 10px; color: #333; display: flex; align-items: center; gap: 8px; }
.recharge-desc { font-size: 13px; color: #888; margin: -4px 0 10px; }
.member-badge { font-size: 11px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; padding: 2px 8px; border-radius: 10px; }
.recharge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recharge-card { border: 2px solid #e5e7eb; border-radius: 12px; padding: 14px 8px; text-align: center; cursor: pointer; transition: all .2s; position: relative; }
.recharge-card:hover { border-color: #6366f1; background: #f5f3ff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99,102,241,0.15); }
.recharge-card.featured { border-color: #f59e0b; }
.recharge-card.featured::before { content: '推荐'; position: absolute; top: -10px; right: -6px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 8px; }
.recharge-card .rc-beans { font-size: 22px; font-weight: 700; color: #6366f1; }
.recharge-card .rc-price { font-size: 18px; font-weight: 600; color: #ef4444; margin-top: 4px; }
.recharge-card .rc-price small { font-size: 12px; color: #999; }
.recharge-card .rc-unit { font-size: 11px; color: #999; margin-top: 2px; }
.recharge-card .rc-name { font-size: 13px; color: #666; margin-top: 4px; }

.paying-status { text-align: center; padding: 20px 0; }
.paying-status p { margin: 8px 0; color: #666; }
.pay-hint { font-size: 13px; color: #999 !important; }
.pay-spinner { width: 40px; height: 40px; border: 4px solid #e5e7eb; border-top-color: #6366f1; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 12px; }
.paying-status .btn { margin: 8px 6px 0; }

.nobeans-actions { text-align: center; margin-top: 16px; }
.nobeans-actions .btn { padding: 10px 32px; font-size: 15px; }

/* User recharge button */
.user-recharge-btn { background: none; border: 1px solid #6366f1; color: #6366f1; padding: 3px 10px; border-radius: 14px; font-size: 12px; cursor: pointer; transition: all .2s; }
.user-recharge-btn:hover { background: #6366f1; color: #fff; }

@media (max-width: 600px) {
  .recharge-grid { grid-template-columns: repeat(2, 1fr); }
  .recharge-modal-box { max-width: 95vw; padding: 16px; }
}
