/* Top Donate — visual “Arcane Ledger” (diferenciado, painel OT) */

@import url('https://fonts.googleapis.com/css2?family=Metamorphous&family=Quattrocento:wght@400;700&family=Share+Tech+Mono&display=swap');

.donation-ranking-page {
  --dr-void: #07080d;
  --dr-ink: #0e1018;
  --dr-slate: #161a26;
  --dr-copper: #a65c32;
  --dr-copper-dim: #6b3d24;
  --dr-ember: #e8943a;
  --dr-gold: #f0c14b;
  --dr-gold-dim: #b8892e;
  --dr-moss: #2d4a42;
  --dr-teal-glow: rgba(72, 189, 170, 0.12);
  --dr-parchment: #ede4d3;
  --dr-parchment-dark: #d8ccb8;
  --dr-seal: #8b2942;
  --dr-text: #d6cfc0;
  --dr-text-bright: #f2ebe0;
  --dr-muted: #8a8275;

  font-family: 'Quattrocento', Georgia, serif;
  color: var(--dr-text);
  min-height: 72vh;
  margin: -8px -12px 0;
  padding: 0 14px 56px;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  background-color: var(--dr-void);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -30%, rgba(232, 148, 58, 0.14), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 50%, rgba(72, 189, 170, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(139, 41, 66, 0.08), transparent 50%),
    linear-gradient(180deg, #0f1118 0%, var(--dr-void) 35%, #0a0c12 100%);
  background-attachment: fixed;
}

/* Textura + vinheta */
.donation-ranking-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.donation-ranking-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.65);
}

.donation-ranking-page > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 980px) {
  .donation-ranking-page {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Painel — caixa de relicário */
.dr-panel {
  max-width: 940px;
  margin: 32px auto 0;
  position: relative;
  border-radius: 2px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, transparent 42%),
    linear-gradient(180deg, #1c1f2a 0%, var(--dr-slate) 48%, #12151f 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.85),
    0 0 0 2px var(--dr-copper-dim),
    0 0 0 4px rgba(20, 22, 32, 0.95),
    0 24px 48px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dr-panel:first-of-type {
  margin-top: 24px;
}

/* Cantos “ferragem” */
.dr-panel::before,
.dr-panel::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--dr-gold-dim);
  pointer-events: none;
  z-index: 3;
  opacity: 0.9;
}
.dr-panel::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
  box-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5);
}
.dr-panel::after {
  top: 8px;
  right: 8px;
  border-left: none;
  border-bottom: none;
}

.dr-panel-body::before,
.dr-panel-body::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--dr-gold-dim);
  pointer-events: none;
  z-index: 3;
  bottom: 8px;
  opacity: 0.9;
}
.dr-panel-body::before {
  left: 8px;
  border-right: none;
  border-top: none;
}
.dr-panel-body::after {
  right: 8px;
  border-left: none;
  border-top: none;
}

.dr-panel-head {
  font-family: 'Metamorphous', Georgia, serif;
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 18px 20px 16px;
  margin: 0;
  position: relative;
  color: var(--dr-text-bright);
  text-shadow:
    0 0 24px rgba(240, 193, 75, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.8);
  background:
    linear-gradient(180deg, rgba(240, 193, 75, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #252a38 0%, #1a1e2a 100%);
  border-bottom: 1px solid var(--dr-copper-dim);
  box-shadow: inset 0 -1px 0 rgba(240, 193, 75, 0.08);
}

.dr-panel-head::before,
.dr-panel-head::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.55rem;
  color: var(--dr-ember);
  opacity: 0.75;
  text-shadow: 0 0 8px rgba(232, 148, 58, 0.5);
}
.dr-panel-head::before { left: 22px; }
.dr-panel-head::after { right: 22px; }

.dr-panel-body {
  position: relative;
  padding: 22px 18px 26px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--dr-teal-glow), transparent 70%);
}

.dr-panel-body--vault {
  padding-top: 16px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(232, 184, 42, 0.07), transparent 65%),
    radial-gradient(ellipse 80% 50% at 50% 0%, var(--dr-teal-glow), transparent 70%);
}

.dr-panel-head--vault::before,
.dr-panel-head--vault::after {
  content: '⬡';
  font-size: 0.65rem;
  letter-spacing: 0;
}

.dr-vbonus-lede {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--dr-muted);
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 20px;
  padding: 0 8px;
  letter-spacing: 0.04em;
  font-style: italic;
  border-left: 2px solid rgba(166, 92, 50, 0.35);
  border-right: 2px solid rgba(166, 92, 50, 0.35);
}

.dr-panel-head--patrons::before,
.dr-panel-head--patrons::after {
  content: '✦';
  font-size: 0.55rem;
  color: #5ebbab;
  opacity: 0.9;
  text-shadow: 0 0 10px rgba(72, 189, 170, 0.45);
}

.dr-patrons-lede {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--dr-muted);
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 16px;
  padding: 0 10px;
  letter-spacing: 0.03em;
}

.dr-name-link {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(30, 74, 120, 0.35);
}
.dr-name-link:hover {
  border-bottom-color: #1a3a5c;
  color: #153252;
}

.dr-patrons-empty {
  text-align: center;
  color: var(--dr-muted);
  padding: 28px 18px;
  line-height: 1.65;
  max-width: 28rem;
  margin: 0 auto;
  font-size: 0.88rem;
}
.dr-patrons-empty a {
  color: var(--dr-gold);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 193, 75, 0.4);
}
.dr-patrons-empty a:hover {
  color: #f5d56a;
}

.dr-note code {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 0.72em;
  letter-spacing: 0.04em;
  color: var(--dr-ember);
}

/* Espaço e filete entre os dois painéis (sem usar ::before — preserva cantos metálicos) */
.dr-panel + .dr-panel {
  margin-top: 48px;
  padding-top: 14px;
  border-top: 1px solid rgba(166, 92, 50, 0.35);
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 5px,
    rgba(166, 92, 50, 0.2) 5px,
    rgba(166, 92, 50, 0.2) 6px,
    transparent 6px,
    transparent 11px
  );
  background-size: 100% 6px;
  background-repeat: no-repeat;
  background-position: top center;
}

/* ——— Bônus: pódio + tábuas (layout próprio, não é grade de cards) ——— */
.dr-vbonus-arena {
  position: relative;
  isolation: isolate;
  padding: 8px 2px 14px;
  overflow: hidden;
}

.dr-vbonus-sigil {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(420px, 95%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.dr-vbonus-sigil__svg {
  width: 100%;
  height: auto;
  display: block;
  animation: dr-vbonus-sigil-drift 28s ease-in-out infinite;
}

@keyframes dr-vbonus-sigil-drift {
  0%, 100% { transform: rotate(-6deg) scale(1); opacity: 0.5; }
  50% { transform: rotate(6deg) scale(1.04); opacity: 0.62; }
}

.dr-vbonus-podium-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 12px 4px 0;
}

.dr-vbonus-slot {
  flex: 1 1 28%;
  max-width: 32%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.dr-vbonus-slot--gold {
  flex: 1 1 34%;
  max-width: 38%;
  z-index: 2;
  filter: drop-shadow(0 12px 28px rgba(232, 184, 42, 0.18));
}

.dr-vbonus-crown {
  text-align: center;
  padding: 16px 10px 14px;
  margin-bottom: 0;
  position: relative;
  clip-path: polygon(8% 0%, 92% 0%, 100% 12%, 100% 100%, 0% 100%, 0% 12%);
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 6px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}

.dr-vbonus-crown:hover {
  transform: translateY(-4px);
}

.dr-vbonus-crown__medal {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.dr-vbonus-crown__label {
  display: block;
  font-family: 'Metamorphous', Georgia, serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dr-vbonus-crown__code {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dr-vbonus-crown__line {
  display: block;
  padding: 4px 2px;
  margin-top: 4px;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
}
.dr-vbonus-crown__line:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.dr-vbonus-crown--silver {
  background: linear-gradient(168deg, #f4f2ef 0%, #b8b5b0 42%, #7d7a76 100%);
  color: #1a1816;
}
.dr-vbonus-crown--silver .dr-vbonus-crown__label {
  color: #2a2830;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.dr-vbonus-crown--gold {
  background: linear-gradient(168deg, #fff8dc 0%, #f0c14b 38%, #c9941a 72%, #6b4a12 100%);
  color: #1f1408;
  animation: dr-vbonus-sovereign 5s ease-in-out infinite;
}
.dr-vbonus-crown--gold .dr-vbonus-crown__label {
  color: #2a1a06;
  text-shadow: 0 0 18px rgba(255, 220, 120, 0.35);
}

@keyframes dr-vbonus-sovereign {
  0%, 100% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), 0 0 0 1px rgba(201, 148, 26, 0.5), 0 8px 22px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.38), 0 0 0 1px rgba(240, 193, 75, 0.85), 0 14px 32px rgba(240, 193, 75, 0.22); }
}

.dr-vbonus-crown--bronze {
  background: linear-gradient(168deg, #ffd4a8 0%, #c76b28 45%, #5c2e10 100%);
  color: #140a04;
}
.dr-vbonus-crown--bronze .dr-vbonus-crown__label {
  color: #1a0c04;
  text-shadow: 0 1px 0 rgba(255, 200, 140, 0.35);
}

/* Degraus de pedra sob cada coluna */
.dr-vbonus-steps {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  perspective: 420px;
}

.dr-vbonus-step {
  display: block;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(180deg, #4a433c 0%, #2a2520 50%, #1a1612 100%);
  border: 1px solid #0d0b09;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 3px 6px rgba(0, 0, 0, 0.4);
  transform: rotateX(12deg);
  transform-origin: top center;
}

.dr-vbonus-steps--n3 .dr-vbonus-step:nth-child(1) { margin-left: 6%; margin-right: 6%; }
.dr-vbonus-steps--n3 .dr-vbonus-step:nth-child(2) { margin-left: 3%; margin-right: 3%; }
.dr-vbonus-steps--n2 .dr-vbonus-step:nth-child(1) { margin-left: 5%; margin-right: 5%; }

.dr-vbonus-slot--gold .dr-vbonus-step {
  height: 12px;
}

@media (max-width: 720px) {
  .dr-vbonus-podium-row {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    gap: 20px;
  }
  .dr-vbonus-slot,
  .dr-vbonus-slot--gold {
    max-width: 100%;
    flex: 1 1 auto;
  }
  .dr-vbonus-slot--gold {
    order: -1;
  }
  .dr-vbonus-sigil {
    top: 30%;
    opacity: 0.35;
  }
}

/* ——— Tabela — estilo livro de registros ——— */
.dr-table-wrap {
  overflow-x: auto;
  border-radius: 4px;
  border: 2px solid #2a231c;
  box-shadow:
    0 0 0 1px rgba(240, 193, 75, 0.12),
    inset 0 0 40px rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #2a241c 0%, #1a1612 100%);
  padding: 2px;
}

.dr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  background: var(--dr-parchment);
  color: #2a2218;
  border-radius: 2px;
  overflow: hidden;
}

.dr-table thead th {
  font-family: 'Metamorphous', Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 10px;
  background: linear-gradient(180deg, #3d3428 0%, #261f18 100%);
  color: var(--dr-gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  border-bottom: 2px solid var(--dr-copper-dim);
  white-space: nowrap;
  border-right: 1px solid rgba(0, 0, 0, 0.35);
}
.dr-table thead th:last-child {
  border-right: none;
}

.dr-table tbody td {
  padding: 12px 10px;
  vertical-align: middle;
  border-right: 1px solid rgba(42, 34, 24, 0.15);
  border-bottom: 1px solid rgba(42, 34, 24, 0.12);
  background: var(--dr-parchment);
}
.dr-table tbody td:last-child {
  border-right: none;
}

.dr-table tbody tr:last-child td {
  border-bottom: none;
}

.dr-table tbody tr:nth-child(even) td {
  background: var(--dr-parchment-dark);
}

.dr-leader-row--1 td {
  box-shadow: inset 4px 0 0 #c9a020;
}
.dr-leader-row--2 td {
  box-shadow: inset 4px 0 0 #9aa0a8;
}
.dr-leader-row--3 td {
  box-shadow: inset 4px 0 0 #b87333;
}

.dr-rank-cell {
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
  min-width: 76px;
  font-family: 'Metamorphous', Georgia, serif;
}

.dr-rank-cell--1 .dr-rank-label {
  color: #8b6914;
  text-shadow: 0 0 12px rgba(201, 160, 32, 0.35);
}
.dr-rank-cell--2 .dr-rank-label { color: #5c6369; }
.dr-rank-cell--3 .dr-rank-label { color: #8b4513; }

.dr-rank-medal {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

.dr-outfit-cell {
  width: 72px;
  text-align: center;
}

.dr-outfit-cell img {
  display: block;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-height: 52px;
  width: auto;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(145deg, #f5f0e6, #d8cfc0);
  border: 2px solid #5c4a38;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

.dr-name-cell {
  font-weight: 700;
  color: #1a3a5c;
  letter-spacing: 0.02em;
}

.dr-level-cell {
  color: #4a4038;
  font-variant-numeric: tabular-nums;
}

.dr-voc-cell {
  color: #5c3d24;
  font-weight: 700;
  font-size: 0.84rem;
}

.dr-amount-cell {
  font-weight: 700;
  font-family: 'Metamorphous', Georgia, serif;
  color: #1d5c32;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(29, 92, 50, 0.15);
}

.dr-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--dr-muted);
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(166, 92, 50, 0.35);
  font-style: italic;
  letter-spacing: 0.03em;
}
