/* ===== RESET & BASE ===== */
:root {
  --bg-outer: #0d0d0d;
  --bg: #1a1a1a;
  --fg: #f0f0f0;
  --accent: #e63946;
  --accent-dim: #a82832;
  --border: #444;
  --input-bg: #222;
  --card-bg: #1e1e1e;
  --muted: #ddd;
  --success: #4caf50;
  --tab-active-bg: #252525;
  --titlebar-bg: #2a2a2a;
  --window-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  --anim-speed: 0.35s;
  --warn: #f59e0b;
  --info-shell-bg: transparent;
  --info-card-bg: var(--card-bg);
  --info-box-bg: var(--input-bg);
  --info-input-bg: var(--input-bg);
  --tier-active-border: #f59e0b;
  --error: #e63946;
  --error-bg: rgba(230,57,70,0.08);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-outer: #ededed;
    --bg: #ffffff;
    --fg: #111111;
    --accent: #111111;
    --accent-dim: #000000;
    --border: #d8d8d8;
    --input-bg: #f7f7f7;
    --card-bg: #ffffff;
    --muted: #666666;
    --success: #16a34a;
    --tab-active-bg: #f2f2f2;
    --titlebar-bg: #f6f6f6;
    --window-shadow: 0 18px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --warn: #c47b2a;
    --info-shell-bg: #f3f3f3;
    --info-card-bg: #ffffff;
    --info-box-bg: #fafafa;
    --info-input-bg: #ffffff;
    --tier-active-border: #c47b2a;
    --error: #dc2626;
    --error-bg: rgba(220,38,38,0.06);
  }
}

[data-theme="light"] {
  --bg-outer: #ededed;
  --bg: #ffffff;
  --fg: #111111;
  --accent: #111111;
  --accent-dim: #000000;
  --border: #d8d8d8;
  --input-bg: #f7f7f7;
  --card-bg: #ffffff;
  --muted: #666666;
  --success: #16a34a;
  --tab-active-bg: #f2f2f2;
  --titlebar-bg: #f6f6f6;
  --window-shadow: 0 18px 48px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --warn: #c47b2a;
  --info-shell-bg: #f3f3f3;
  --info-card-bg: #ffffff;
  --info-box-bg: #fafafa;
  --info-input-bg: #ffffff;
  --tier-active-border: #c47b2a;
  --error: #dc2626;
  --error-bg: rgba(220,38,38,0.06);
}

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

body {
  background: var(--bg-outer);
  color: var(--fg);
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Cascadia Code', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  font-size: 14px;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 10px 18px;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:hover { background: var(--accent); color: var(--bg); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: var(--accent); }

.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-default { border-color: var(--border); color: var(--fg); }
.btn-default:hover { background: var(--border); color: var(--fg); }

.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s, transform 0.15s;
}
.btn-icon:hover { opacity: 1; color: var(--accent); transform: scale(1.1); }

/* ===== TERMINAL WINDOW ===== */
.window-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  min-height: 100vh;
}

.terminal-window {
  width: 100%;
  max-width: 680px;
  background: var(--bg);
  border-radius: 10px;
  box-shadow: var(--window-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s;
  position: relative;
}

/* Title bar */
.terminal-titlebar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--border);
  min-height: 42px;
  gap: 12px;
  transition: background 0.3s;
}

.traffic-lights { display: flex; gap: 7px; flex-shrink: 0; }

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: none; padding: 0;
}
.dot-close {
  background: #ff5f57;
  cursor: pointer;
  position: relative;
}
.dot-close::before {
  content: '\00d7';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  line-height: 1;
  color: #4a0000;
  font-weight: 700;
}
.dot-close:hover { opacity: 0.7; transform: scale(1.15); }
.dot-minimize { background: #febc2e; }
.dot-maximize { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.terminal-title .accent, .accent { color: var(--accent); font-weight: 700; }

.titlebar-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ===== STEP BAR ===== */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.step {
  color: var(--muted);
  opacity: 0.4;
  font-weight: 600;
  transition: opacity 0.3s, color 0.3s;
}
.step.active { opacity: 1; color: var(--accent); }
.step.done { opacity: 0.7; color: var(--success); }

.step-arrow {
  color: var(--muted);
  opacity: 0.3;
  font-size: 14px;
}

/* ===== SHOP PAGES ===== */
.shop-page {
  display: none;
  animation: pageFadeIn var(--anim-speed) ease;
}
.shop-page.active { display: block; }

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.shop-content {
  padding: 16px;
}

/* ===== PRODUCT LIST ===== */
.product-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 16px;
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.product-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 6px 16px rgba(0,0,0,0.18);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.product-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--fg);
}

.product-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
}
.product-badge.hot { background: var(--warn); }

.product-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.product-price .currency { font-size: 14px; opacity: 0.7; }

.product-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.feature-tag {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--input-bg);
}

.product-select-hint {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.5;
  margin-top: 4px;
}

/* ===== TOPUP PAGE LAYOUT ===== */
.topup-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: stretch; /* 两列等高，上下完全对齐 */
}

.topup-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.topup-fields .form-group {
  margin-bottom: 0;
}

.tier-card-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tier-card-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.tier-card-inline {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  background: var(--input-bg);
  min-width: 200px;
  flex: 1; /* 填满剩余空间，底部对齐第二个输入框 */
  display: flex;
  align-items: center;
}

.tier-list {
  display: grid;
  /* 4列: 数字左对齐 | USD纵向对齐 | 箭头 | 结果 */
  grid-template-columns: auto auto auto 1fr;
  row-gap: 7px;
  column-gap: 6px;
  align-items: center;
  font-size: 13px;
}

.tier-val {
  font-weight: 600;
  color: var(--fg);
  text-align: left;
}

.tier-unit {
  color: var(--muted);
  font-weight: 600;
}

.tier-arrow {
  color: var(--muted);
}

.tier-viloze {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

/* ===== VILOZE PREVIEW ===== */
.viloze-preview {
  text-align: center;
  margin: 16px 0 8px;
  padding: 12px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border);
}

.viloze-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.viloze-amount {
  display: block;
  font-size: 2.4em;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 2px;
}

/* ===== INFO CARD ===== */
.info-card, .pay-card, .done-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: var(--card-bg);
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.info-header, .info-row, .pay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.info-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.form-group .muted { opacity: 0.6; font-size: 11px; }

.form-group input {
  width: 100%;
  padding: 10px 12px;
  background: var(--input-bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--muted); opacity: 0.4; }

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

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 312px;
  gap: 12px;
  margin: 8px 0 4px;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
}

.security-grid.single-column {
  grid-template-columns: 1fr;
}

.security-box {
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  min-height: 96px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.security-box label {
  margin-bottom: 8px;
}

.security-box-password {
  justify-content: center;
}

.security-box-password label {
  margin-bottom: 10px;
}

.security-help {
  margin-top: 8px;
  line-height: 1.45;
  min-height: 2.9em;
}

.security-box-turnstile {
  padding: 8px 6px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.security-box-turnstile .turnstile-label {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.security-box-turnstile #turnstile-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.security-box-turnstile #turnstile-container:empty {
  display: flex;
  margin: 0;
}

.security-box-turnstile #turnstile-container iframe {
  margin: 0 auto;
  display: block;
  max-width: 100%;
  pointer-events: auto;
  touch-action: auto;
}

.security-box-turnstile #turnstile-container > div {
  max-width: 100% !important;
  overflow: hidden;
}

#topup-error, #pay-error {
  color: var(--error);
  font-size: 12px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  transition: all 0.2s ease;
}
#topup-error:not(:empty), #pay-error:not(:empty) {
  padding: 6px 10px;
  margin-top: 4px;
  margin-bottom: 4px;
  background: var(--error-bg);
  border-left: 3px solid var(--error);
  min-height: 1.4em;
}
#topup-error {
  margin-left: 14px;
}
#topup-error a {
  color: var(--error);
  text-decoration: underline;
}

#topup-error:empty, #pay-error:empty {
  min-height: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-row .btn { flex: 1; }

/* ===== PAY METHODS ===== */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.pay-method {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--input-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.15s;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.pay-method:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--input-bg));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.pay-method.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.pay-method-name { font-weight: 600; font-size: 14px; }

/* ===== PAY AREA ===== */
.pay-area { text-align: center; }
.pay-area.hidden { display: none; }

.pay-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 6px auto 12px;
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}
.pay-jump-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}
.pay-jump-btn:active {
  transform: translateY(0);
  opacity: 1;
}

.pay-crypto-info {
  margin-bottom: 12px;
}
.crypto-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}
.crypto-label {
  font-size: 13px;
  color: var(--muted);
}
.crypto-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.crypto-unit {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.7;
}
.crypto-addr-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
  margin-bottom: 8px;
}
.crypto-addr-row:hover { background: var(--input-bg); }
.crypto-addr {
  font-size: 11px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--fg);
  word-break: break-all;
  max-width: 320px;
  text-align: center;
  user-select: all;
}

.qr-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 12px;
}

.qr-container img {
  width: 180px;
  height: 180px;
  image-rendering: pixelated;
  display: block;
}

.pay-address {
  font-size: 11px;
  color: #333;
  word-break: break-all;
  max-width: 220px;
  margin-top: 6px;
  font-family: inherit;
}

.pay-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.pay-hint {
  font-size: 12px;
  margin-bottom: 12px;
}

.pay-loading {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== DONE CARD ===== */
.done-icon {
  font-size: 48px;
  color: var(--success);
  text-align: center;
  margin-bottom: 8px;
  animation: donePopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes donePopIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.done-title {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 4px;
}

.done-field {
  margin-bottom: 12px;
}
.done-field .label {
  display: block;
  margin-bottom: 4px;
}

.done-viloze-display {
  text-align: center;
  padding: 16px 0;
}

.done-viloze-display .viloze-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.done-viloze-amount {
  display: block;
  font-size: 3em;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  animation: donePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.done-recharge-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.selectable { user-select: all; -webkit-user-select: all; cursor: text; }

.mono { font-family: inherit; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ===== FOOTER ===== */
.shop-footer {
  padding: 10px 16px;
  text-align: center;
  font-size: 11px;
  border-top: 1px solid var(--border);
  background: var(--titlebar-bg);
  border-radius: 0 0 10px 10px;
}
.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  margin-left: 12px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.footer-link:hover { opacity: 1; text-decoration: underline; }

/* ===== QUERY PAGE ===== */
.query-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  opacity: 0.6;
}
.query-order-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
}
.query-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.query-order-header code { font-size: 12px; opacity: 0.7; }
.query-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.status-paid { background: var(--success); color: #fff; }
.status-expired { background: var(--border); color: var(--muted); }
.status-pending { background: var(--warn); color: #000; }
.query-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 13px;
}
.query-order-row .label { min-width: 70px; }

/* ===== SCROLLBAR ===== */

/* ===== TURNSTILE CAPTCHA ===== */
#turnstile-box.hidden { display: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ===== AD FOOTER ===== */
.site-credits {
  width: 100%;
  max-width: 680px;
  margin-top: 12px;
  padding-bottom: 20px;
}

.site-credits-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.credits-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  transition: color 0.2s, opacity 0.2s;
  opacity: 0.7;
}
.credits-link:hover {
  color: var(--accent);
  opacity: 1;
}

.cl-label {
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 9px;
  opacity: 0.6;
}

.cl-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
}

.cl-name {
  font-weight: 700;
  font-size: 12px;
}

.cl-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  opacity: 0.5;
}

/* ===== SPINNER OVERLAY ===== */
.spinner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 100;
  border-radius: 10px;
  backdrop-filter: blur(2px);
}
.spinner-overlay.hidden { display: none; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner-text {
  font-size: 13px;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .window-container { padding: 10px; }
  .terminal-window { border-radius: 0; max-width: 100%; }
  .terminal-titlebar { padding: 10px 12px; gap: 8px; }
  .terminal-title { font-size: 12px; }
  .step-bar { flex-wrap: wrap; gap: 6px; font-size: 11px; padding: 10px 12px; }
  .shop-content { padding: 12px; }
  .info-card, .pay-card, .done-card { padding: 16px; }
  .product-list { grid-template-columns: 1fr; }
  .product-price { font-size: 18px; }
  .topup-input-row { grid-template-columns: 1fr; }
  .tier-card-inline { max-width: 100%; min-width: 0; }
  .viloze-amount { font-size: 1.8em; }
  .done-viloze-amount { font-size: 2.2em; }
  .security-grid { grid-template-columns: 1fr; margin-bottom: 24px; }
  .security-box-turnstile { padding: 8px 10px; }
  .security-box-turnstile #turnstile-container { min-width: 0; width: 100%; max-width: 100%; }
  .pay-methods { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pay-method { font-size: 12px; padding: 9px 8px; }
  .pay-status { flex-direction: column; gap: 4px; }
  .crypto-addr { max-width: 100%; }
  .qr-container img { width: 150px; height: 150px; }
  .btn-row { flex-direction: column; }
  .query-order-header,
  .query-order-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .query-order-row .label { min-width: 0; }
  .site-credits { padding: 0 10px; }
  .site-credits-inner { padding: 8px 12px; gap: 12px; }
}
