/* =============================================================
   prestige.css — Prestige Tree, Forecast Modal, Celebration
   ============================================================= */

/* ─── PRESTIGE PANEL ADDITIONS ─────────────────────────────── */

.pp-shards-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(192, 112, 255, 0.10);
  border: 1px solid rgba(192, 112, 255, 0.30);
  border-radius: 8px;
  margin-bottom: 8px;
}

.pp-shard-icon {
  font-size: 18px;
}

.pp-shard-amount {
  font-size: 18px;
  font-weight: 700;
  color: #c070ff;
  text-shadow: 0 0 8px #c070ff88;
}

.pp-shard-label {
  font-size: 10px;
  color: var(--text-dim, #9ab);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex: 1;
  text-align: right;
}

.pp-ascension-block {
  margin-bottom: 10px;
}

.pp-asc-label {
  font-size: 10px;
  color: var(--text-dim, #9ab);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.pp-asc-bar-outer {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.pp-asc-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #c070ff, #7090ff);
  border-radius: 4px;
  transition: width 0.4s;
}

.pp-asc-milestone {
  font-size: 10px;
  color: var(--text-dim, #9ab);
  margin-top: 3px;
  text-align: right;
}

.pp-forecast-btn {
  width: 100%;
  padding: 7px;
  background: rgba(192, 112, 255, 0.12);
  border: 1px solid rgba(192, 112, 255, 0.35);
  color: #c070ff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  transition: background 0.15s;
}

.pp-forecast-btn:hover {
  background: rgba(192, 112, 255, 0.22);
}

.pp-tree-section {
  margin-top: 10px;
}

.pp-tree-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim, #9ab);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.pp-run-history {
  margin-top: 8px;
  font-size: 10px;
  color: var(--text-dim, #9ab);
}

.pp-run-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ─── PRESTIGE TREE ─────────────────────────────────────────── */

.pt-locked-msg {
  padding: 16px;
  text-align: center;
  color: var(--text-dim, #9ab);
  font-size: 13px;
  font-style: italic;
}

.pt-branch-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.pt-branch-tab {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: var(--text-dim, #9ab);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}

.pt-branch-tab:hover {
  background: rgba(255,255,255,0.10);
  border-color: var(--bcolor, #fff);
  color: #fff;
}

.pt-tab-active {
  background: rgba(255,255,255,0.12);
  border-color: var(--bcolor, #c070ff);
  color: var(--bcolor, #c070ff);
  box-shadow: 0 0 6px rgba(192,112,255,0.25);
}

.pt-nodes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

/* ─── NODE CARDS ────────────────────────────────────────────── */

.pt-node {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.pt-node:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.pt-available {
  border-color: rgba(192, 112, 255, 0.45);
  background: rgba(192, 112, 255, 0.07);
}

.pt-available:hover {
  border-color: #c070ff;
  background: rgba(192, 112, 255, 0.14);
  box-shadow: 0 0 10px rgba(192,112,255,0.25);
}

.pt-maxed {
  border-color: rgba(255, 208, 96, 0.50);
  background: rgba(255, 208, 96, 0.06);
  cursor: default;
}

.pt-maxed:hover {
  transform: none;
  box-shadow: none;
}

.pt-locked, .pt-prereq {
  opacity: 0.45;
  cursor: not-allowed;
}

.pt-locked:hover, .pt-prereq:hover {
  transform: none;
  box-shadow: none;
}

.pt-broke {
  border-color: rgba(255,255,255,0.08);
  opacity: 0.65;
}

.pt-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.pt-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.pt-name {
  font-size: 11px;
  font-weight: 700;
  color: #dde;
  flex: 1;
  line-height: 1.2;
}

.pt-cost {
  font-size: 11px;
  font-weight: 700;
  color: #c070ff;
  white-space: nowrap;
  flex-shrink: 0;
}

.pt-max-badge {
  font-size: 9px;
  font-weight: 700;
  color: #ffd060;
  background: rgba(255,208,96,0.15);
  border: 1px solid rgba(255,208,96,0.40);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.pt-desc {
  font-size: 10px;
  color: var(--text-dim, #9ab);
  line-height: 1.35;
  margin-bottom: 5px;
}

.pt-pips {
  display: flex;
  gap: 3px;
}

.pt-pip {
  width: 10px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.12);
}

.pt-pip-on {
  background: #c070ff;
  box-shadow: 0 0 4px #c070ff88;
}

.pt-maxed .pt-pip-on {
  background: #ffd060;
  box-shadow: 0 0 4px #ffd06088;
}

.pt-status-msg {
  font-size: 9px;
  color: #ff8080;
  margin-top: 3px;
  font-style: italic;
}

/* ─── PRESTIGE FORECAST MODAL ───────────────────────────────── */
/* z-index inherited from .modal-overlay (9999, Shell B) — no override */

.pf-box {
  background: var(--modal-bg, #1a1a2e);
  border: 1px solid rgba(192,112,255,0.35);
  border-radius: 14px;
  padding: 24px 22px 20px;
  max-width: 380px;
  width: 92%;
  position: relative;
  color: #dde;
  box-shadow: 0 0 40px rgba(192,112,255,0.18);
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pf-title {
  font-size: 15px;
  font-weight: 800;
  color: #c070ff;
  text-align: center;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.pf-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(192,112,255,0.12);
  border: 1px solid rgba(192,112,255,0.35);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.pf-total-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim, #9ab);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pf-total-val {
  font-size: 22px;
  font-weight: 800;
  color: #c070ff;
  text-shadow: 0 0 10px #c070ff66;
}

.pf-breakdown {
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.pf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pf-row:last-child { border-bottom: none; }

.pf-row-label { color: var(--text-dim, #9ab); }

.pf-row-val {
  font-weight: 700;
  color: #c070ff;
}

.pf-milestone {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.pf-ms-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim, #9ab);
  margin-bottom: 4px;
}

.pf-ms-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pf-ms-desc {
  font-size: 11px;
  color: var(--text-dim, #9ab);
  margin-bottom: 6px;
}

.pf-bar-outer {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.pf-bar-inner {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s;
}

.pf-bar-pct {
  position: absolute;
  right: 4px;
  top: -1px;
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  line-height: 10px;
}

.pf-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-ascend-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7020c0, #4060d0);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
  box-shadow: 0 2px 12px rgba(112,32,192,0.45);
}

.pf-ascend-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(112,32,192,0.60);
}

.pf-not-ready {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim, #9ab);
  padding: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
}

.pf-close-btn {
  background: none;
  border: none;
  color: var(--text-dim, #9ab);
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  padding: 4px;
  text-decoration: underline;
}

.pf-close-btn:hover { color: #dde; }

/* ─── POST-PRESTIGE CELEBRATION OVERLAY ─────────────────────── */

#prestige-celebration {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 20, 0.88);
  /* "Full attention" tier (9999) — fires immediately after closeModal()
     on the prestige forecast modal, which fades out over 300ms at the
     same tier; must not render behind it during that overlap. */
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: pc-fadein 0.5s ease;
}

@keyframes pc-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.pc-inner {
  background: linear-gradient(160deg, #140828, #0a1830);
  border: 1px solid rgba(192,112,255,0.40);
  border-radius: 18px;
  padding: 32px 30px 28px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 60px rgba(192,112,255,0.25), 0 0 120px rgba(64,96,208,0.15);
  animation: pc-slidein 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pc-slidein {
  from { transform: scale(0.8) translateY(20px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}

.pc-stars {
  font-size: 14px;
  color: rgba(192,112,255,0.6);
  letter-spacing: 0.15em;
  margin-bottom: 6px;
}

.pc-title {
  font-size: 22px;
  font-weight: 800;
  color: #e0c0ff;
  letter-spacing: 0.12em;
  text-shadow: 0 0 14px #c070ff88;
  margin-bottom: 18px;
}

.pc-shards-wrap {
  background: rgba(192,112,255,0.10);
  border: 1px solid rgba(192,112,255,0.35);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.pc-shard-icon {
  font-size: 32px;
  margin-bottom: 4px;
  animation: pc-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes pc-pulse {
  from { transform: scale(0.95); filter: brightness(0.9); }
  to   { transform: scale(1.05); filter: brightness(1.15); }
}

.pc-shard-earned {
  font-size: 40px;
  font-weight: 900;
  color: #c070ff;
  text-shadow: 0 0 18px #c070ffaa;
  line-height: 1;
  margin-bottom: 4px;
}

.pc-shard-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim, #9ab);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pc-total-row {
  font-size: 13px;
  color: var(--text-dim, #9ab);
  margin-bottom: 8px;
}

.pc-total-row strong {
  color: #c070ff;
}

.pc-milestone {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.pc-hint {
  font-size: 11px;
  color: var(--text-dim, #9ab);
  line-height: 1.45;
  margin-bottom: 16px;
}

.pc-dismiss-btn {
  padding: 10px 28px;
  background: linear-gradient(135deg, #7020c0, #4060d0);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
  box-shadow: 0 2px 12px rgba(112,32,192,0.40);
}

.pc-dismiss-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(112,32,192,0.55);
}
