/* Starcode: campo da loja/carrinho e as páginas /ytstarcode e /ytstarcode/redeem */

/* ── Campo (loja e carrinho) ───────────────────────────────────── */
.starcode-box [hidden] { display: none !important; }

.shop-starcode {
  max-width: 520px;
  margin: 0 auto 24px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

.starcode-title { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }

.starcode-row { display: flex; gap: 8px; }

.starcode-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.starcode-input::placeholder { color: var(--text-3); }
.starcode-input:focus { border-color: var(--line-3); }

.starcode-btn,
.starcode-remove {
  flex-shrink: 0;
  height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.starcode-btn:hover,
.starcode-remove:hover { background: var(--card-hover); border-color: var(--line-3); }
.starcode-btn:disabled { opacity: .6; cursor: default; }

.starcode-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 0 0 13px;
  border: 1px solid rgba(52, 211, 153, .3);
  border-radius: var(--r-sm);
  background: var(--success-soft);
  font-size: 14px;
  color: var(--text-2);
}
.starcode-applied i, .starcode-applied svg { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; }
.starcode-applied strong { color: var(--text); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.starcode-applied .starcode-remove { margin-left: auto; height: 40px; border: none; border-left: 1px solid rgba(52, 211, 153, .3); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: transparent; }
.starcode-applied .starcode-remove:hover { background: rgba(255, 255, 255, .04); }

.starcode-msg { margin: 8px 0 0; font-size: 13px; color: #fca5a5; }
.starcode-msg:empty { display: none; }

/* plano do link ?plus= / ?access= */
.plan-card.is-starcode-pick { border-color: var(--line-3); }

/* ── Páginas /ytstarcode ───────────────────────────────────────── */
.sc-wrap { max-width: 680px; margin: 0 auto; }
.sc-wrap-wide { max-width: 900px; }

.sc-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
}
.sc-card + .sc-card { margin-top: 16px; }
.sc-card [hidden] { display: none !important; }

.sc-card h2 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; }
.sc-text { color: var(--text-2); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.sc-text.is-warn { color: var(--warning); }
.sc-text.sc-note { margin: 14px 0 0; }

.sc-form { display: flex; flex-direction: column; gap: 14px; }
.sc-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 7px; }
.sc-input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}
.sc-input::placeholder { color: var(--text-3); }
.sc-input:focus { border-color: var(--line-3); }
.sc-hint { margin: 7px 0 0; font-size: 12.5px; color: var(--text-3); }

.sc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.sc-btn:hover { background: var(--primary-hover); }
.sc-btn:disabled { opacity: .6; cursor: default; }
.sc-btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.sc-btn-ghost:hover { background: var(--card); border-color: var(--line-3); }

.sc-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--danger-soft);
  border: 1px solid rgba(238, 52, 59, .3);
  color: #fca5a5;
  font-size: 14px;
}
.sc-error:empty { display: none; }

.sc-copy-row { display: flex; gap: 8px; width: 100%; }
.sc-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px dashed var(--line-3);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  word-break: break-all;
}
.sc-copy-btn {
  flex-shrink: 0;
  min-width: 84px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.sc-copy-btn:hover { background: var(--card-hover); border-color: var(--line-3); }
.sc-copy-btn.is-copied { background: var(--success-soft); border-color: rgba(52, 211, 153, .35); color: var(--success); }

.sc-field + .sc-field { margin-top: 14px; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* painel */
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sc-head h2 { margin: 0; }
.sc-code-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--field-active);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  vertical-align: middle;
}

.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sc-stat {
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.sc-stat span { display: block; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.sc-stat strong { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--text); }

.sc-table-wrap { overflow-x: auto; }
.sc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sc-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.sc-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); white-space: nowrap; }
.sc-table td.is-strong { color: var(--text); font-weight: 600; }
.sc-table tr:last-child td { border-bottom: none; }
.sc-empty { color: var(--text-3); font-size: 14px; margin: 0; }

@media (max-width: 640px) {
  .sc-card { padding: 20px 16px; }
  .sc-stats { grid-template-columns: 1fr; }
  .sc-copy-row { flex-direction: column; }
  .sc-copy-btn { height: 40px; }
  .shop-starcode { padding: 14px; }
}
