/* Morgan City faction ranking: stepped podium over a compact results list. */
:root {
  --page-bg: #07080b;
  --panel: #111318;
  --text: #fff;
  --muted: #a6a8af;
  --line: rgba(255, 255, 255, .11);
  --accent: #ffd700;
  --font: 'Noto Sans Thai', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; overflow-x: clip; }
body { min-height: 100vh; background: var(--page-bg); color: var(--text); font-family: var(--font); }
a { color: inherit; text-decoration: none; }

main { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding-top: 105px; }
.ranking-section { position: relative; padding: 85px 0 74px; text-align: center; }
.eyebrow { color: var(--accent); font-size: .73rem; font-weight: 700; letter-spacing: .18em; }
.section-heading h1 { margin: 10px 0 0; font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 800; line-height: 1.15; }
.section-heading p { margin: 12px 0 0; color: var(--muted); font-size: 1.1rem; font-weight: 500; }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 18px; width: min(900px, 100%); margin: 60px auto 0; }
.podium-count-1 { grid-template-columns: minmax(0, 300px); justify-content: center; }
.podium-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(600px, 100%); }
.podium-place { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.place-1 { position: relative; isolation: isolate; order: 2; }
.place-1::before { content: ''; position: absolute; z-index: -1; top: 6%; left: 50%; width: calc(100% + 150px); height: 95%; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(255, 215, 0, .24) 0%, rgba(255, 215, 0, .1) 36%, transparent 72%); filter: blur(18px); pointer-events: none; }
.place-2 { order: 1; }
.place-3 { order: 3; }
.podium-identity { width: 100%; min-height: 146px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 8px 14px; }
.faction-avatar { width: 68px; height: 68px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--faction-color); border-radius: 14px; background: #242832; color: var(--text); font-size: 1.15rem; font-weight: 800; letter-spacing: -.04em; box-shadow: 0 8px 18px rgba(0, 0, 0, .34); }
.place-label { display: block; margin-top: 10px; color: var(--muted); font-size: .9rem; font-weight: 700; }
.podium-identity h2 { max-width: 100%; margin: 2px 0 0; overflow-wrap: anywhere; font-size: clamp(1.15rem, 2.1vw, 1.45rem); font-weight: 700; line-height: 1.35; }
.podium-base { position: relative; width: 100%; min-height: 175px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 10px 20px; clip-path: polygon(10% 0, 90% 0, 100% 13%, 100% 100%, 0 100%, 0 13%); background: linear-gradient(180deg, #222633, #13161e 70%); border-bottom: 3px solid var(--faction-color); }
.podium-base::before { content: ''; position: absolute; top: 48px; left: 0; right: 0; height: 1px; background: rgba(255, 255, 255, .08); }
.base-rank { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); color: var(--faction-color); font-size: .85rem; font-weight: 800; letter-spacing: .16em; }
.score-label { margin-top: 24px; color: var(--muted); font-size: .95rem; font-weight: 600; }
.score-value { margin-top: 4px; color: var(--text); font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.place-1 .podium-identity { min-height: 175px; }
.place-1 .faction-avatar { width: 84px; height: 84px; font-size: 1.4rem; box-shadow: 0 0 28px rgba(255, 215, 0, .28), 0 8px 18px rgba(0, 0, 0, .34); }
.place-1 .place-label { color: var(--accent); }
.place-1 .podium-identity h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.place-1 .podium-base { min-height: 225px; background: linear-gradient(180deg, #2a2e3a, #161920 72%); border-bottom-color: var(--accent); }
.place-1 .score-value { color: var(--accent); font-size: clamp(2rem, 3.6vw, 2.7rem); }

.all-section { padding: 42px 0 100px; border-top: 1px solid var(--line); }
.list-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.list-heading h2 { margin: 7px 0 0; font-size: clamp(1.5rem, 4vw, 2.3rem); line-height: 1.3; }
.faction-count { flex: none; color: var(--muted); font-size: .95rem; font-weight: 600; }
.faction-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.faction-row { display: flex; align-items: center; gap: 17px; min-height: 78px; padding: 14px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: border-color .2s, background .2s; }
.faction-row:hover, .faction-row:focus-visible { border-color: var(--faction-color); background: #1a1c23; }
.faction-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-rank { width: 30px; flex: none; color: var(--muted); font-size: .9rem; font-weight: 700; }
.row-emblem { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; }
.color-mark { width: 11px; height: 36px; flex: none; border-radius: 99px; background: var(--faction-color); }
.faction-logo { position: absolute; inset: 0; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); object-fit: cover; }
.row-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.row-name strong { overflow-wrap: anywhere; font-size: 1.1rem; font-weight: 700; }
.row-name small, .row-score small { color: var(--muted); font-size: .88rem; font-weight: 500; }
.row-score { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.row-score strong { color: var(--accent); font-size: 1.15rem; }
.row-arrow { flex: none; margin-left: 10px; color: var(--muted); font-size: 1.3rem; transition: transform .2s, color .2s; }
.faction-row:hover .row-arrow, .faction-row:focus-visible .row-arrow { color: var(--faction-color); transform: translateX(4px); }
.empty-state { margin: 36px 0; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--muted); font-size: 1rem; font-weight: 500; text-align: center; }
footer { padding: 25px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; text-align: center; }

@media (max-width: 650px) {
  main { padding-top: 95px; }
  .ranking-section { padding-top: 65px; padding-bottom: 56px; }
  .podium { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
  .podium-count-1 { grid-template-columns: minmax(0, 310px); }
  .podium-count-2 .place-2 { grid-column: 1 / -1; width: min(50%, 200px); justify-self: center; }
  .place-1 { grid-column: 1 / -1; order: 0; width: min(310px, 100%); justify-self: center; }
  .place-1::before { width: calc(100% + 70px); filter: blur(12px); }
  .place-2 { order: 1; }
  .place-3 { order: 2; }
  .podium-identity { min-height: 118px; padding: 0 3px 10px; }
  .faction-avatar { width: 50px; height: 50px; border-radius: 11px; font-size: .85rem; }
  .place-label { margin-top: 7px; font-size: .9rem; }
  .podium-identity h2 { font-size: 1rem; }
  .podium-base { min-height: 145px; padding: 25px 4px 12px; }
  .podium-base::before { top: 40px; }
  .base-rank { top: 11px; font-size: .75rem; }
  .score-label { margin-top: 18px; font-size: .8rem; }
  .score-value { font-size: 1.4rem; }
  .place-1 .podium-identity { min-height: 145px; }
  .place-1 .faction-avatar { width: 70px; height: 70px; font-size: 1.15rem; }
  .place-1 .podium-identity h2 { font-size: 1.3rem; }
  .place-1 .podium-base { min-height: 175px; }
  .place-1 .score-value { font-size: 2rem; }
  .faction-row { gap: 12px; padding: 12px 14px; }
  .row-arrow { margin-left: 0; font-size: 1.1rem; }
  .row-name strong { font-size: 1rem; }
  .row-name small, .row-score small { font-size: .8rem; }
}
