/* Страница премиума — дополняет home.css */

.prem-page .home { padding-bottom: calc(96px + var(--safe-b)); }

.topbar .back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--card);
}
.topbar .back svg,
.lb-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--text);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Шапка премиума ─── */
.p-hero {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(255, 149, 213, 0.38), transparent 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(255, 154, 139, 0.22), transparent 60%),
    linear-gradient(160deg, #3a2148 0%, #22172e 100%);
  border: 1px solid rgba(255, 149, 213, 0.25);
}
.p-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 149, 213, 0.16);
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
}
.p-hero h1 {
  margin: 12px 0 10px;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 900;
}
.p-price { display: flex; align-items: baseline; gap: 8px; }
.p-price b {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.p-price span { color: var(--muted); font-size: 15px; font-weight: 700; }

.p-gift {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(20, 15, 28, 0.55);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.p-gift:active { transform: scale(.98); }
.p-gift-icon { font-size: 28px; line-height: 1; }
.p-gift-text { flex: 1; font-size: 13.5px; line-height: 1.3; color: var(--muted); font-weight: 700; }
.p-gift-text b { color: var(--text); font-size: 15px; }
.p-gift-see {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--grad);
  color: #2a1029;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* ─── Группы привилегий ─── */
.perk-group {
  margin-top: 12px;
  padding: 14px 16px 6px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.perk-group h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 900;
}
.g-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--card-2);
  font-size: 17px;
}
.perk-group ul { margin: 0; padding: 0; list-style: none; }
.perk-group li {
  position: relative;
  padding: 9px 0 9px 26px;
  font-size: 14.5px;
  line-height: 1.35;
  color: #e6d9ee;
}
.perk-group li + li { border-top: 1px solid var(--line); }
.perk-group li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 9px;
  color: var(--pink);
  font-weight: 900;
}
.cmds li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-left: 0; }
.cmds li::before { display: none; }
.cmds code {
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--card-2);
  color: var(--pink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.cmds span { color: var(--muted); font-size: 13.5px; text-align: right; }

/* ─── Оформление ─── */
.checkout {
  margin-top: 22px;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}
.checkout-title { margin: 0 0 14px; font-size: 20px; font-weight: 900; }
.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#userid {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  font: 800 19px/1 "Nunito", sans-serif;
  -moz-appearance: textfield;
}
#userid::-webkit-outer-spin-button,
#userid::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#userid:focus { border-color: var(--pink); }

.nickname {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.nickname.ok  { background: rgba(76, 175, 80, 0.14); color: #8fe39a; }
.nickname.bad { background: rgba(255, 107, 138, 0.14); color: #ff8fa6; }
.id-hint { margin: 8px 2px 20px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.id-hint b { color: var(--text); }

.methods { display: flex; flex-direction: column; gap: 8px; }
.pay-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font: 800 15.5px "Nunito", sans-serif;
  text-align: left;
  cursor: pointer;
}
.pay-button::after {
  content: "";
  width: 20px;
  height: 20px;
  margin-left: auto;
  border: 2px solid var(--muted);
  border-radius: 50%;
  flex: none;
}
.pay-button.active { border-color: var(--pink); background: rgba(255, 149, 213, 0.08); }
.pay-button.active::after { border-color: var(--pink); background: var(--pink); box-shadow: inset 0 0 0 3px var(--bg); }
.m-icon { width: 24px; text-align: center; font-size: 18px; }

.methods.shake { animation: shake .35s ease; }
@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

.after-pay {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.after-pay b { display: block; margin-bottom: 4px; color: var(--text); font-size: 14px; }
.after-pay a, .offer a { color: var(--pink); text-decoration: underline; }
.offer { margin: 14px 2px 0; color: var(--muted); font-size: 12px; text-align: center; }

/* ─── Нижняя панель покупки ─── */
.buybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(24, 18, 33, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.buybar-price { display: flex; flex-direction: column; line-height: 1.1; }
.buybar-price b { font-size: 22px; font-weight: 900; }
.buybar-price span { color: var(--muted); font-size: 12px; font-weight: 700; }
.buy-btn {
  flex: 1;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--grad);
  color: #2a1029;
  font: 900 17px "Nunito", sans-serif;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s, transform .12s;
}
.buy-btn.ready { opacity: 1; box-shadow: 0 10px 24px -10px rgba(255, 140, 190, 0.9); }
.buy-btn:active { transform: scale(.98); }
.buy-btn:disabled { opacity: .7; }

@media (min-width: 600px) {
  .buybar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 20px 20px 0 0; border: 1px solid var(--line); }
}

/* ─── Превью подарка ─── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 6, 14, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
#lightbox.active { display: flex; }
.lb-inner {
  position: relative;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
}
.lb-inner img { width: 100%; height: auto; min-height: 120px; }
.lb-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 15, 28, 0.7);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.lb-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.lb-caption { padding: 12px 14px; font-weight: 800; text-align: center; }
