/* ═══════════════════════════════════════════════════
   DION PRIVATE SERVER – rankings.css
   Rankings Page
═══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   HERO
══════════════════════════════════════════════ */
#rank-hero {
  position: relative;
  min-height: 56vh;
  padding-top: calc(var(--header-h) + 34px + 4rem);
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.rank-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212,175,55,.15) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(111,44,255,.2) 0%, transparent 50%),
    linear-gradient(180deg, rgba(9,9,9,.55) 0%, var(--obsidian) 100%);
}
.rank-hero-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../images/background_dion.png') center/cover no-repeat;
  opacity: .14;
  filter: blur(2px);
}

.rank-hero-fog {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 70%, rgba(212,175,55,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(111,44,255,.1) 0%, transparent 45%);
  animation: fog-drift 24s ease-in-out infinite alternate;
}

/* Rune decorations */
.rank-hero-runes {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  overflow: hidden;
}
.rune {
  position: absolute;
  font-family: serif;
  color: rgba(212,175,55,.12);
  font-size: 5rem;
  line-height: 1;
  animation: rune-float 12s ease-in-out infinite alternate;
}
.rune-1 { top: 12%; left: 4%;  font-size: 4rem;  animation-delay: 0s;    animation-duration: 14s; }
.rune-2 { top: 60%; left: 8%;  font-size: 3rem;  animation-delay: -3s;   animation-duration: 18s; }
.rune-3 { top: 20%; right: 6%; font-size: 5rem;  animation-delay: -6s;   animation-duration: 16s; }
.rune-4 { top: 70%; right: 4%; font-size: 3.5rem;animation-delay: -2s;   animation-duration: 20s; }
.rune-5 { top: 40%; left: 2%;  font-size: 2.5rem;animation-delay: -9s;   animation-duration: 22s; }
.rune-6 { top: 35%; right: 3%; font-size: 4.5rem;animation-delay: -5s;   animation-duration: 17s; }

@keyframes rune-float {
  0%   { transform: translateY(0) rotate(-5deg); opacity: .08; }
  50%  { opacity: .18; }
  100% { transform: translateY(-20px) rotate(5deg); opacity: .06; }
}

.rank-hero-inner {
  position: relative; z-index: 5;
  display: flex;
  align-items: center;
  gap: 4rem;
  flex-wrap: wrap;
}

/* Decorative book */
.rank-hero-book {
  flex-shrink: 0;
  width: 140px; height: 170px;
  position: relative;
}
.book-cover {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, rgba(22,16,38,.98), rgba(10,8,18,.99));
  border: 1px solid rgba(212,175,55,.4);
  border-radius: 2px 8px 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  box-shadow:
    -4px 0 0 rgba(212,175,55,.2),
    0 0 40px rgba(212,175,55,.12),
    0 0 80px rgba(111,44,255,.08);
  animation: book-glow 4s ease-in-out infinite alternate;
}
.book-cover::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.book-cover::after {
  content: '';
  position: absolute; top: 8px; bottom: 8px; left: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--gold-dark), transparent);
}
.book-seal {
  font-size: 2.5rem;
  color: var(--gold);
  filter: drop-shadow(0 0 12px var(--gold-glow));
  animation: hero-logo-float 5s ease-in-out infinite;
}
.book-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 70%;
}
.book-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.35), transparent);
}

@keyframes book-glow {
  0%   { box-shadow: -4px 0 0 rgba(212,175,55,.2), 0 0 30px rgba(212,175,55,.1); }
  100% { box-shadow: -4px 0 0 rgba(212,175,55,.3), 0 0 60px rgba(212,175,55,.2), 0 0 100px rgba(111,44,255,.1); }
}

.rank-hero-text {
  flex: 1;
  min-width: 260px;
}

.rank-hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  background: linear-gradient(180deg, #fff8e0 0%, var(--gold-light) 40%, var(--gold) 70%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(212,175,55,.3));
  line-height: 1.1;
  margin: .6rem 0 .75rem;
}

.rank-hero-sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: clamp(.9rem, 1.8vw, 1.1rem);
  color: var(--text-dim);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.rank-hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.rank-hero-stat {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.rhs-val {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  line-height: 1;
}
.rhs-label {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.rank-hero-stat-sep {
  color: rgba(212,175,55,.4);
  font-size: 1.5rem;
  line-height: 1;
  padding-bottom: .5rem;
}

.rank-hero-scroll-hint {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  animation: bounce-soft 2s ease-in-out infinite;
}
.char-scroll-arrow {
  width: 18px; height: 18px;
  border-right: 1px solid var(--text-dim);
  border-bottom: 1px solid var(--text-dim);
  transform: rotate(45deg);
}

/* ══════════════════════════════════════════════
   SERVER STATS BAR
══════════════════════════════════════════════ */
#rank-server-stats {
  padding: 3rem 2rem;
  background: linear-gradient(180deg, var(--obsidian), var(--stone));
  border-bottom: 1px solid var(--border);
}

.rss-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.rss-card {
  background: linear-gradient(135deg, rgba(20,16,32,.97), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  min-width: 120px;
  flex: 1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: all .3s;
}
.rss-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(111,44,255,.12);
}
.rss-card.rss-premium {
  border-color: rgba(212,175,55,.3);
  background: linear-gradient(135deg, rgba(25,20,38,.97), rgba(14,10,22,.99));
}
.rss-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: .4rem;
}
.rss-val {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  color: var(--gold-light);
  display: block;
  line-height: 1;
  margin-bottom: .25rem;
}
.rss-label {
  font-family: 'Cinzel', serif;
  font-size: .55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════
   MAIN RANKINGS SECTION
══════════════════════════════════════════════ */
#rank-main {
  padding: 5rem 2rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(111,44,255,.08) 0%, transparent 50%),
    var(--stone2);
  position: relative; z-index: 10;
}

/* ── Category Buttons ── */
.rank-cats {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.rcat-btn {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: linear-gradient(135deg, rgba(18,14,28,.97), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: .6rem 1.1rem;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.rcat-btn::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity .25s;
}
.rcat-btn:hover {
  color: var(--text);
  border-color: rgba(212,175,55,.3);
  box-shadow: 0 0 15px rgba(212,175,55,.12), 0 0 30px rgba(111,44,255,.1);
  transform: translateY(-2px);
}
.rcat-btn:hover::before { opacity: 1; }

.rcat-btn.active {
  color: var(--gold-light);
  border-color: rgba(212,175,55,.5);
  background: linear-gradient(135deg, rgba(25,20,38,.98), rgba(14,10,25,.99));
  box-shadow: 0 0 20px rgba(212,175,55,.2), 0 0 40px rgba(111,44,255,.1), inset 0 0 20px rgba(212,175,55,.04);
}
.rcat-btn.active::before { opacity: 1; }

.rcat-icon { font-size: 1rem; }

/* ── Category Summary ── */
.rank-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(18,14,28,.98), rgba(10,8,18,.99));
  border: 1px solid var(--border2);
  padding: 1.25rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.rank-summary::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--arcane), var(--gold), transparent);
  animation: shimmer 4s linear infinite;
  background-size: 200% auto;
}

.rsumm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 0 2rem;
}
.rsumm-label {
  font-family: 'Cinzel', serif;
  font-size: .55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dark);
}
.rsumm-val {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.rsumm-val.highlight { color: var(--arcane-light); }
.rsumm-val.gold { color: var(--gold); font-size: .78rem; }

.rsumm-sep {
  width: 1px;
  height: 40px;
  background: rgba(212,175,55,.15);
}

/* ── PODIUM ── */
.rank-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.pod-card {
  background: linear-gradient(160deg, rgba(20,15,32,.98), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  transition: all .35s;
  width: 220px;
  flex-shrink: 0;
}
.pod-card.pod-1 {
  width: 260px;
  border-color: rgba(212,175,55,.5);
  background: linear-gradient(160deg, rgba(28,20,44,.98), rgba(14,10,24,.99));
  box-shadow: 0 0 40px rgba(212,175,55,.2), 0 0 80px rgba(212,175,55,.06);
}
.pod-card.pod-2 {
  border-color: rgba(192,192,192,.35);
}
.pod-card.pod-3 {
  border-color: rgba(205,127,50,.3);
}

.pod-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.pod-card.pod-1::before {
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-light), var(--gold), transparent);
  animation: shimmer 3s linear infinite;
  background-size: 200% auto;
}
.pod-card.pod-2::before { background: linear-gradient(90deg, transparent, #c0c0c0, transparent); }
.pod-card.pod-3::before { background: linear-gradient(90deg, transparent, #cd7f32, transparent); }

.pod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.pod-card.pod-1:hover {
  box-shadow: 0 12px 50px rgba(212,175,55,.3), 0 0 80px rgba(212,175,55,.1);
}

.pod-rank-badge {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: .5rem;
}
.pod-card.pod-1 .pod-rank-badge { color: #ffd700; filter: drop-shadow(0 0 12px rgba(255,215,0,.5)); }
.pod-card.pod-2 .pod-rank-badge { color: #c0c0c0; filter: drop-shadow(0 0 8px rgba(192,192,192,.4)); font-size: 2rem; }
.pod-card.pod-3 .pod-rank-badge { color: #cd7f32; filter: drop-shadow(0 0 8px rgba(205,127,50,.4)); font-size: 2rem; }

.pod-crown {
  font-size: 1.8rem;
  display: block;
  margin-bottom: .25rem;
  animation: hero-logo-float 3s ease-in-out infinite;
}

.pod-outfit {
  font-size: 2.8rem;
  display: block;
  margin: .5rem 0;
  filter: drop-shadow(0 0 10px rgba(111,44,255,.4));
}
.pod-card.pod-1 .pod-outfit { font-size: 3.2rem; }

.pod-name {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--gold-light);
  display: block;
  margin-bottom: .2rem;
}
.pod-voc {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim); /* Improved visibility */
  display: block;
  margin-bottom: .5rem;
}
.pod-val {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  color: var(--gold);
  display: block;
  word-break: break-all;
}

/* ── Filters ── */
.rank-filters {
  display: flex;
  gap: 1.25rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.rf-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.rf-search-group { flex: 1; min-width: 260px; }

.rf-label {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim); /* Improved visibility */
}

.rf-select-wrap {
  position: relative;
}
.rf-select {
  appearance: none;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  letter-spacing: 1px;
  padding: .75rem 2.5rem .75rem 1rem;
  outline: none;
  cursor: pointer;
  transition: all .25s;
  min-width: 200px;
}
.rf-select:focus {
  border-color: var(--arcane);
  box-shadow: 0 0 15px rgba(111,44,255,.2);
}
.rf-select option {
  background: #0e0920;
  color: var(--text);
}
.rf-select-arrow {
  position: absolute;
  right: .8rem; top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
  font-size: .8rem;
}

.rf-search-inner {
  display: flex;
  gap: .6rem;
}
.rf-search-input {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  letter-spacing: 1px;
  padding: .75rem 1rem;
  outline: none;
  transition: all .25s;
}
.rf-search-input::placeholder { color: var(--text-dark); font-style: italic; }
.rf-search-input:focus {
  border-color: var(--arcane);
  box-shadow: 0 0 15px rgba(111,44,255,.2);
  background: rgba(111,44,255,.05);
}

.rf-search-btn {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--arcane-dark), var(--arcane));
  color: #fff;
  padding: .75rem 1.5rem;
  border: 1px solid rgba(111,44,255,.5);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: all .25s;
  white-space: nowrap;
  box-shadow: 0 0 15px rgba(111,44,255,.3);
}
.rf-search-btn:hover {
  background: linear-gradient(135deg, var(--arcane), var(--arcane-light));
  box-shadow: 0 0 30px rgba(111,44,255,.5);
  transform: translateY(-1px);
}

/* Search result banner */
.rank-search-result {
  background: linear-gradient(135deg, rgba(111,44,255,.15), rgba(212,175,55,.08));
  border: 1px solid rgba(111,44,255,.4);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  color: var(--text);
  line-height: 1.6;
}
.rank-search-result .sr-name { color: var(--gold-light); font-weight: 700; }
.rank-search-result .sr-pos  { color: var(--arcane-light); font-size: 1rem; font-weight: 700; }
.rank-search-result .sr-not  { color: #cc4444; }

/* ── Table Panel ── */
.rank-table-panel {
  background: linear-gradient(180deg, rgba(18,14,30,.98), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,.5);
  margin-bottom: 1.5rem;
  opacity: 1 !important; /* Force visibility */
  transform: none !important;
}

.rtp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,.3);
  flex-wrap: wrap;
  gap: .5rem;
}
.rtp-title {
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
}
.rtp-page-info {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  letter-spacing: 1.5px;
  color: var(--text-dark);
  text-transform: uppercase;
}

.rtp-body { overflow-x: auto; }

.rtp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.rtp-table thead {
  background: rgba(0,0,0,.4);
}
.rtp-table th {
  font-family: 'Cinzel', serif;
  font-size: .6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dark);
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.rtp-table th.col-pos  { width: 70px; text-align: center; }
.rtp-table th.col-flag { width: 50px; text-align: center; }
.rtp-table th.col-outfit { width: 60px; text-align: center; }
.rtp-table th.col-val  { text-align: right; }

.rtp-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: background .2s;
  vertical-align: middle;
}
.rtp-table tr:hover td { background: rgba(212,175,55,.04); }
.rtp-table tr:last-child td { border-bottom: none; }

/* Rank position cell */
.cell-pos {
  text-align: center;
}
.pos-badge {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
}
.pos-badge.p1 {
  color: #ffd700;
  background: radial-gradient(circle, rgba(255,215,0,.15), rgba(255,215,0,.05));
  border: 1px solid rgba(255,215,0,.4);
  box-shadow: 0 0 15px rgba(255,215,0,.3);
  animation: glow-arcane 2s ease-in-out infinite;
  font-size: .8rem;
}
.pos-badge.p2 {
  color: #c0c0c0;
  background: radial-gradient(circle, rgba(192,192,192,.12), transparent);
  border: 1px solid rgba(192,192,192,.3);
  font-size: .85rem;
}
.pos-badge.p3 {
  color: #cd7f32;
  background: radial-gradient(circle, rgba(205,127,50,.12), transparent);
  border: 1px solid rgba(205,127,50,.3);
  font-size: .85rem;
}
.pos-badge.pn {
  color: var(--text-dim);
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.06);
}

.cell-flag { text-align: center; font-size: 1.2rem; }
.cell-outfit { text-align: center; font-size: 1.5rem; }

.cell-name {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}
.cell-name a {
  color: inherit;
  transition: color .2s;
}
.cell-name a:hover { color: var(--gold-light); }

.cell-voc {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.voc-knight  { color: var(--ice); }
.voc-paladin { color: #55cc77; }
.voc-sorcerer{ color: var(--arcane-light); }
.voc-druid   { color: #55aaff; }
.voc-monk    { color: #ffaa44; }

.cell-level {
  font-family: 'Cinzel', serif;
  font-size: .82rem;
  color: var(--gold);
  font-weight: 700;
}

.cell-val {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}

/* Top 3 row highlights */
.rtp-table tr.top1 td { background: rgba(255,215,0,.04); }
.rtp-table tr.top2 td { background: rgba(192,192,192,.03); }
.rtp-table tr.top3 td { background: rgba(205,127,50,.03); }

/* Mobile cards */
.rtp-cards { display: none; }

/* ── Pagination ── */
.rank-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.rpag-btn {
  font-family: 'Cinzel', serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: linear-gradient(135deg, rgba(18,14,28,.97), rgba(10,8,18,.99));
  border: 1px solid var(--border);
  padding: .5rem .9rem;
  cursor: pointer;
  transition: all .2s;
  min-width: 36px;
  text-align: center;
}
.rpag-btn:hover {
  color: var(--gold);
  border-color: rgba(212,175,55,.35);
  box-shadow: 0 0 10px rgba(212,175,55,.15);
}
.rpag-btn.active {
  color: var(--gold-light);
  border-color: rgba(212,175,55,.5);
  background: linear-gradient(135deg, rgba(25,20,38,.98), rgba(14,10,25,.99));
  box-shadow: 0 0 15px rgba(212,175,55,.2);
}
.rpag-btn.disabled {
  opacity: .3;
  pointer-events: none;
}
.rpag-ellipsis {
  color: var(--text-dark);
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  padding: .5rem .3rem;
}

/* ══════════════════════════════════════════════
   FIND MY POSITION
══════════════════════════════════════════════ */
#rank-find {
  padding: 5rem 2rem 7rem;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(111,44,255,.1) 0%, transparent 55%),
    var(--stone);
  position: relative; z-index: 10;
}

.rfind-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.rfind-card {
  background: linear-gradient(160deg, rgba(20,15,32,.98), rgba(10,8,18,.99));
  border: 1px solid var(--border2);
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 0 50px rgba(111,44,255,.1), 0 0 100px rgba(0,0,0,.6);
}
.rfind-inner {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}
.rfind-input {
  flex: 1;
  min-width: 200px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  letter-spacing: 1.5px;
  padding: .9rem 1.25rem;
  outline: none;
  transition: all .3s;
}
.rfind-input::placeholder { color: var(--text-dark); font-style: italic; }
.rfind-input:focus {
  border-color: var(--arcane);
  box-shadow: 0 0 20px rgba(111,44,255,.2);
  background: rgba(111,44,255,.06);
}
.rfind-btn {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--arcane-dark), var(--arcane));
  color: #fff;
  padding: .9rem 1.75rem;
  border: 1px solid rgba(111,44,255,.5);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: all .25s;
  box-shadow: 0 0 20px rgba(111,44,255,.3);
  white-space: nowrap;
}
.rfind-btn:hover {
  background: linear-gradient(135deg, var(--arcane), var(--arcane-light));
  box-shadow: 0 0 40px rgba(111,44,255,.6);
  transform: translateY(-2px);
}

.rfind-result {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(111,44,255,.12), rgba(212,175,55,.06));
  border: 1px solid rgba(111,44,255,.35);
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  color: var(--text);
  line-height: 1.8;
}
.rfr-name  { color: var(--gold-light); font-size: 1rem; font-weight: 700; display: block; margin-bottom: .5rem; }
.rfr-row   { color: var(--text-dim); }
.rfr-val   { color: var(--gold); font-weight: 700; }
.rfr-pos   { color: var(--arcane-light); font-size: 1.1rem; font-weight: 700; }
.rfr-not   { color: #cc4444; }

/* ══════════════════════════════════════════════
   CHAR CARD CORNERS (reuse from character.css)
══════════════════════════════════════════════ */
.char-card-corner {
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--gold-dark);
  border-style: solid;
}
.char-card-corner.tl { top: 8px; left: 8px; border-width: 2px 0 0 2px; }
.char-card-corner.tr { top: 8px; right: 8px; border-width: 2px 2px 0 0; }
.char-card-corner.bl { bottom: 8px; left: 8px; border-width: 0 0 2px 2px; }
.char-card-corner.br { bottom: 8px; right: 8px; border-width: 0 2px 2px 0; }

.char-search-hint {
  font-family: 'Cinzel', serif;
  font-size: .58rem;
  letter-spacing: 1.5px;
  color: var(--text-dark);
  text-transform: uppercase;
  text-align: center;
  margin-top: 1rem;
}
.char-search-hint kbd {
  display: inline-block;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  padding: .1rem .4rem;
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  color: var(--text-dim);
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 960px) {
  .rank-hero-inner { flex-direction: column; text-align: center; }
  .rank-hero-stats { justify-content: center; }
  .rank-hero-book  { margin: 0 auto; }
  .rsumm-item { padding: 0 1rem; }
  .pod-card   { width: 180px; }
  .pod-card.pod-1 { width: 220px; }
}

@media (max-width: 768px) {
  #rank-hero { min-height: auto; padding-top: calc(var(--header-h) + 34px + 2rem); }
  .rank-hero-book { display: none; }

  /* Switch table to cards on mobile */
  .rtp-body { display: none; }
  .rtp-cards { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; }

  .rmc {
    background: linear-gradient(135deg, rgba(20,15,32,.98), rgba(10,8,18,.99));
    border: 1px solid var(--border);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
    transition: all .25s;
  }
  .rmc:hover { border-color: var(--border2); }
  .rmc.top1  { border-color: rgba(255,215,0,.35); }
  .rmc.top2  { border-color: rgba(192,192,192,.3); }
  .rmc.top3  { border-color: rgba(205,127,50,.28); }

  .rmc-pos { flex-shrink: 0; }
  .rmc-outfit { font-size: 1.8rem; flex-shrink: 0; }
  .rmc-body { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
  .rmc-name { font-family: 'Cinzel', serif; font-size: .8rem; font-weight: 700; color: var(--text); }
  .rmc-voc  { font-family: 'Cinzel', serif; font-size: .58rem; letter-spacing: 1px; text-transform: uppercase; }
  .rmc-right { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; flex-shrink: 0; }
  .rmc-level { font-family: 'Cinzel', serif; font-size: .75rem; color: var(--gold); font-weight: 700; }
  .rmc-val   { font-family: 'Cinzel', serif; font-size: .62rem; color: var(--text-dim); text-align: right; }

  .rank-filters { flex-direction: column; }
  .rf-search-inner { flex-direction: column; }
  .rf-search-btn   { width: 100%; clip-path: none; }
  .rfind-inner { flex-direction: column; }
  .rfind-btn   { width: 100%; clip-path: none; }

  .rank-podium { gap: .75rem; }
  .pod-card { width: 140px; padding: 1.25rem .75rem; }
  .pod-card.pod-1 { width: 160px; }
  .pod-outfit { font-size: 2rem; }
  .pod-card.pod-1 .pod-outfit { font-size: 2.3rem; }
  .pod-name { font-size: .72rem; }
  .pod-val  { font-size: .62rem; }
}

@media (max-width: 480px) {
  .rank-cats    { gap: .4rem; }
  .rcat-btn     { font-size: .56rem; padding: .5rem .75rem; }
  .rsumm-item   { padding: 0 .6rem; }
  .rsumm-val    { font-size: .72rem; }
  .rss-card     { min-width: 90px; padding: 1rem; }
  .pod-card.pod-2,
  .pod-card.pod-3 { display: none; }
}
