@font-face {
  font-family: 'NK57Mono';
  src: url('fonts/NK57_Monospace_Cd_Rg.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NK57Mono';
  src: url('fonts/NK57_Monospace_Cd_Sb.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'NK57Mono';
  src: url('fonts/NK57_Monospace_Cd_Bd.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Paleta pedida */
  --plum: #411d2b;
  --bg: #110e15;
  --surface: #211720;
  --surface-2: #2a0a11;
  --wine: #430e18;

  --fg: #f2e6ea;
  --fg-muted: rgba(242, 230, 234, 0.55);
  --fg-faint: rgba(242, 230, 234, 0.32);
  --border: rgba(242, 230, 234, 0.1);

  /* Rojo más claro derivado de la paleta, solo para texto/acentos legibles */
  --accent: #c9445e;
  --accent-dim: #9c2f43;
  --danger: #ff6b6b;
  --success: #7fe0a8;
  --discord: #5865f2;
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'NK57Mono', 'Courier New', monospace;
  min-height: 100vh;
}

.mono { font-family: 'NK57Mono', monospace; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- ASCII banner ---------- */
.ascii-banner {
  font-family: 'NK57Mono', monospace;
  font-size: 5px;
  line-height: 1.05;
  white-space: pre;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(201, 68, 94, 0.35);
  margin: 0 0 20px;
  overflow-x: auto;
  user-select: none;
}

@media (min-width: 640px) {
  .ascii-banner { font-size: 7px; }
}

/* ---------- Auth layout (pre-login) ---------- */
.layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(65, 29, 43, 0.35), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(67, 14, 24, 0.4), transparent 60%),
    var(--bg);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}

.brand-panel {
  padding: 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--border);
}

.brand-panel .logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  color: var(--fg-muted);
}

.brand-panel .logo span { color: var(--accent); }

.brand-panel h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 14px;
  max-width: 440px;
  text-transform: lowercase;
}

.brand-panel p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
  max-width: 380px;
  margin: 0 0 32px;
  text-transform: lowercase;
}

.console {
  background: #0a0709;
  border: 1px solid var(--wine);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-family: 'NK57Mono', monospace;
  font-size: 12px;
  line-height: 1.9;
  color: var(--fg-muted);
  max-width: 420px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.console:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px rgba(201, 68, 94, 0.12);
}

.console .ok { color: var(--success); }
.console .accent { color: var(--accent); }
.console .err { color: var(--danger); }
.console .dim { color: var(--fg-faint); }

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.card { width: 100%; max-width: 380px; }

.tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.tab {
  flex: 1;
  background: var(--surface);
  color: var(--fg-muted);
  border: none;
  padding: 12px 0;
  font-family: 'NK57Mono', monospace;
  font-size: 13px;
  text-transform: lowercase;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s, color 0.15s;
}

.tab:last-child { border-right: none; }
.tab.active { background: var(--surface-2); color: var(--fg); }
.tab:hover:not(.active) { background: rgba(67, 14, 24, 0.4); color: var(--fg-muted); }

.panel { display: none; }
.panel.active { display: block; }

.panel h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; text-transform: lowercase; }
.panel .sub { color: var(--fg-muted); font-size: 13px; margin: 0 0 24px; text-transform: lowercase; }

label { display: block; font-size: 12px; color: var(--fg-muted); margin-bottom: 6px; text-transform: lowercase; }

input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  font-family: 'NK57Mono', monospace;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 68, 94, 0.12); }

button.primary {
  width: 100%;
  background: var(--wine);
  color: var(--fg);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  padding: 12px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: lowercase;
  cursor: pointer;
  font-family: 'NK57Mono', monospace;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

button.primary:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 18px rgba(201, 68, 94, 0.28);
}
button.primary:active { transform: scale(0.98); }

button.discord {
  width: 100%;
  background: var(--discord);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'NK57Mono', monospace;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}

button.discord:hover { background: #4a54c9; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-faint);
  font-size: 12px;
  margin-bottom: 18px;
  text-transform: lowercase;
}

.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

button.primary:focus-visible,
button.discord:focus-visible,
.tab:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.msg { font-size: 12px; margin-top: -4px; margin-bottom: 16px; min-height: 16px; text-transform: lowercase; }
.msg.error { color: var(--danger); }
.msg.success { color: var(--success); }

.buy-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  transition: border-color 0.2s, background 0.2s;
}

.buy-box:hover { border-color: var(--accent-dim); background: rgba(67, 14, 24, 0.15); }

.buy-box .price { font-family: 'NK57Mono', monospace; font-size: 26px; margin: 8px 0 4px; }
.buy-box .price span { font-size: 13px; color: var(--fg-muted); }

.pay-methods {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.pay-btn {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  font-family: 'NK57Mono', monospace;
  text-transform: lowercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.pay-btn:hover {
  border-color: var(--accent);
  background: rgba(67, 14, 24, 0.25);
  transform: translateX(2px);
}

.pay-btn .tag {
  font-size: 10px;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hidden { display: none !important; }

/* ---------- Modal de pago ---------- */
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-pop-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 5, 7, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  margin: 20px;
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(201, 68, 94, 0.08);
  animation: modal-pop-in 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--fg-faint);
  font-family: 'NK57Mono', monospace;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--accent); }

.modal-box h2 { font-size: 17px; margin: 0 0 4px; text-transform: lowercase; }
.modal-box .sub { color: var(--fg-muted); font-size: 13px; margin: 0 0 22px; text-transform: lowercase; }

.modal-methods { display: grid; gap: 12px; }

.modal-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-faint);
  font-size: 11px;
  text-transform: lowercase;
  margin: 4px 0;
}

.modal-divider::before, .modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

#paypal-container-627M84EY9T4VJ { min-height: 45px; }
#paypal-container-627M84EY9T4VJ,
#paypal-container-627M84EY9T4VJ * {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

.paypal-wrap { position: relative; }

#paypal-container-627M84EY9T4VJ {
  transition: filter 0.2s, opacity 0.2s;
}

#paypal-container-627M84EY9T4VJ.locked {
  pointer-events: none;
  filter: grayscale(70%);
  opacity: 0.55;
}

.paypal-lock {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 5;
}

.paypal-lock.unlocked { display: none; }

@keyframes label-flash {
  0%, 100% { color: var(--fg-muted); }
  25%, 75% { color: var(--danger); }
}

#buy-email-label.flash { animation: label-flash 0.5s ease 2; }

#buy-email.flash { border-color: var(--danger); animation: label-flash 0.5s ease 2; }

/* ---------- Dashboard (post-login) ---------- */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#dashboard {
  position: relative;
  min-height: 100vh;
  padding: 56px 24px 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 35% at 85% 5%, rgba(67, 14, 24, 0.35), transparent 60%),
    radial-gradient(ellipse 55% 35% at 5% 95%, rgba(65, 29, 43, 0.3), transparent 60%),
    var(--bg);
}

#dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'%3E%3Cpath d='M42 0 L84 24 L84 72 L42 96 L0 72 L0 24 Z' fill='none' stroke='%23c9445e' stroke-opacity='0.05' stroke-width='1'/%3E%3C/svg%3E");
  background-position: center top;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, black 0%, transparent 75%);
  pointer-events: none;
}

.dash-wrap {
  position: relative;
  width: 100%;
  max-width: 760px;
  padding-bottom: 32px;
}

.dash-ascii {
  animation: rise-in 0.5s ease both;
}

.dash-top {
  margin-bottom: 8px;
  color: var(--fg-faint);
  font-size: 12px;
  text-transform: lowercase;
  animation: rise-in 0.5s ease both;
}

.dash-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 4px 0 24px;
  text-transform: lowercase;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.05s;
}

.dash-title span { color: var(--accent); }

.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.1s;
}

.dash-tab {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-family: 'NK57Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  text-transform: lowercase;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s;
}

.dash-tab.active { color: var(--fg); border-bottom-color: var(--accent); }
.dash-tab:hover:not(.active) { color: var(--accent); }

.dash-panel { display: none; }
.dash-panel.active { display: block; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr; }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.15s;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.stat-card:hover {
  border-color: var(--accent-dim);
  background: rgba(67, 14, 24, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 68, 94, 0.1);
}

.stat-card .icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.stat-card .icon svg { width: 12px; height: 12px; stroke: var(--accent); }

.stat-card .label {
  font-size: 11px;
  color: var(--fg-faint);
  margin-bottom: 6px;
  text-transform: lowercase;
}

.stat-card .value { font-size: 19px; font-weight: 700; word-break: break-all; }
.stat-card .hint { font-size: 11px; color: var(--fg-faint); margin-top: 4px; text-transform: lowercase; }

.waiting-badge {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--fg-faint);
}

.waiting-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-faint);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.key-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.2s;
  transition: border-color 0.2s, background 0.2s;
}

.key-card:hover { border-color: var(--accent-dim); background: rgba(67, 14, 24, 0.12); }

.key-card .label {
  font-size: 11px;
  color: var(--fg-faint);
  margin-bottom: 10px;
  text-transform: lowercase;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.key-value {
  font-family: 'NK57Mono', monospace;
  font-size: 14px;
  letter-spacing: 1px;
  filter: blur(4px);
  transition: filter 0.2s;
  cursor: pointer;
}

.key-value.revealed { filter: none; }

.copy-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  text-transform: lowercase;
  cursor: pointer;
  font-family: 'NK57Mono', monospace;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}

.copy-btn:hover { background: var(--wine); border-color: var(--accent-dim); }
.copy-btn:active { transform: scale(0.96); }

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'NK57Mono', monospace;
  text-transform: lowercase;
}

.badge.active { background: rgba(127, 224, 168, 0.15); color: var(--success); }
.badge.pending { background: rgba(201, 68, 94, 0.15); color: var(--accent); }
.badge.offline { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

/* Paneles de discord id / hwid debajo de la key */
.id-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .id-grid { grid-template-columns: 1fr; }
}

.id-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.22s;
  transition: border-color 0.2s, background 0.2s;
}

.id-card:hover { border-color: var(--accent-dim); background: rgba(67, 14, 24, 0.12); }

.id-card .label {
  font-size: 11px;
  color: var(--fg-faint);
  margin-bottom: 8px;
  text-transform: lowercase;
}

.id-card .value {
  font-family: 'NK57Mono', monospace;
  font-size: 13px;
  word-break: break-all;
}

/* Panel de "última versión" */
.version-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  max-width: fit-content;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.25s;
}

.version-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

.version-bar .status-word {
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
  text-transform: lowercase;
}

.version-bar .sep {
  width: 1px;
  height: 12px;
  background: var(--border);
}

.version-bar .version-id {
  font-family: 'NK57Mono', monospace;
  font-size: 11px;
  color: var(--fg-faint);
}

.download-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.2s;
}

.download-box:hover { border-color: var(--accent-dim); }

.download-box .file-name {
  font-family: 'NK57Mono', monospace;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.admin-box {
  background: var(--surface-2);
  border: 1px dashed var(--accent-dim);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
  text-align: left;
}

.admin-box .label {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: lowercase;
}

.admin-box input[type="file"] {
  width: 100%;
  font-family: 'NK57Mono', monospace;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

/* Footer */
.dash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px 0;
  margin-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  animation: rise-in 0.5s ease both;
  animation-delay: 0.3s;
}

.dash-footer .discord-tag {
  font-size: 11px;
  color: var(--fg-faint);
  font-family: 'NK57Mono', monospace;
}

.dash-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dash-footer nav a,
.dash-footer nav button {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-decoration: none;
  cursor: pointer;
  font-family: 'NK57Mono', monospace;
  transition: color 0.15s;
}

.dash-footer nav a:hover,
.dash-footer nav button:hover { color: var(--accent); }

.dash-footer nav button.signout-link {
  color: var(--danger);
}

.dash-footer nav button.signout-link:hover { color: #ffab9f; }

.y2k-face {
  color: var(--fg-faint);
  font-size: 11px;
  letter-spacing: 0.05em;
}
