@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Oxanium:wght@600;700&display=swap');

:root {
  --bg: #06110e;
  --panel: #0b1d17;
  --panel-2: #10271f;
  --line: rgba(164, 220, 191, .14);
  --text: #f2fff8;
  --muted: #9cb8aa;
  --green: #62ee9b;
  --green-2: #18bd72;
  --gold: #ffc95e;
  --red: #ff6d67;
  --cyan: #57dff2;
  --radius: 24px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 5%, rgba(37, 179, 112, .13), transparent 24rem),
    radial-gradient(circle at 12% 34%, rgba(39, 129, 87, .08), transparent 30rem),
    var(--bg);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 15px;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--green); color: #032113; padding: 10px 16px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.topbar {
  width: min(1380px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  color: #052417; background: linear-gradient(145deg, #8bffb7, #2bd77c);
  font: 800 16px Oxanium, sans-serif; box-shadow: 0 10px 30px rgba(43, 215, 124, .2);
}
.brand > span:last-child { display: grid; line-height: 1; gap: 5px; }
.brand b { font: 700 18px Oxanium, sans-serif; letter-spacing: .09em; }
.brand small { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .28em; }
nav { display: flex; align-items: center; gap: 7px; }
nav a { padding: 11px 13px; color: var(--muted); font-size: 13px; font-weight: 700; border-radius: 11px; transition: .2s; }
nav a:hover, nav a.active { color: #fff; background: rgba(255,255,255,.055); }
.server-address {
  display: flex; align-items: center; gap: 11px; padding: 9px 15px; border: 1px solid rgba(98,238,155,.25);
  border-radius: 13px; color: var(--text); background: rgba(41, 190, 111, .09); cursor: pointer;
}
.server-address > span:last-child { display: grid; gap: 2px; text-align: left; }
.server-address small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .17em; }
.server-address b { font-size: 13px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(98,238,155,.1); }

main { width: min(1380px, calc(100% - 40px)); margin: 0 auto; }
.hero {
  min-height: 355px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 60px;
  padding: 46px 46px 34px; margin-top: 22px; overflow: hidden; position: relative;
  border: 1px solid var(--line); border-radius: 30px;
  background: linear-gradient(120deg, rgba(14, 42, 32, .92), rgba(6, 21, 17, .96));
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .25; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 38px 38px; mask-image: linear-gradient(90deg, transparent, #000);
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 11px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .22em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 15px; font: 700 clamp(38px, 5vw, 68px)/.98 Oxanium, sans-serif; letter-spacing: -.035em; }
h1 span { color: var(--green); }
.lead { max-width: 660px; margin-bottom: 25px; color: #b2c8bd; font-size: 16px; line-height: 1.75; }
.hero-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.hero-status b { color: var(--text); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.separator { width: 1px; height: 14px; margin: 0 6px; background: var(--line); }

.world-art { height: 300px; display: flex; align-items: center; justify-content: flex-end; position: relative; z-index: 1; pointer-events: none; }
.world-art img { display: block; width: min(100%, 500px); height: auto; max-height: 300px; border-radius: 22px; object-fit: cover; box-shadow: 0 24px 55px rgba(0,0,0,.4); filter: drop-shadow(0 0 24px rgba(98,238,155,.1)); transform: translateY(5px); }

.overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 14px 0 76px; }
.overview article {
  min-height: 100px; display: flex; align-items: center; gap: 14px; padding: 20px;
  border: 1px solid var(--line); border-radius: 19px; background: rgba(10, 29, 23, .82);
}
.stat-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 14px; color: var(--green); background: rgba(98,238,155,.1); font-size: 21px; }
.overview article div { display: grid; gap: 6px; min-width: 0; }
.overview small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.overview strong { overflow: hidden; font: 700 22px Oxanium, sans-serif; text-overflow: ellipsis; }

.war-entry { min-height: 104px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin: -48px 0 70px; padding: 20px 23px; border: 1px solid rgba(255,154,93,.24); border-radius: 19px; background: linear-gradient(110deg, rgba(60,25,22,.82), rgba(15,29,23,.92)); transition: transform .2s, border-color .2s; }
.war-entry:hover { transform: translateY(-3px); border-color: rgba(255,201,94,.5); }
.war-entry-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: #ffc95e; background: rgba(255,201,94,.1); font-size: 24px; }
.war-entry > span:nth-child(2) { display: grid; gap: 4px; }
.war-entry small { color: #ff8e68; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.war-entry b { font: 700 16px Oxanium, sans-serif; }
.war-entry em { color: var(--muted); font-size: 10px; font-style: normal; }
.war-entry strong { color: #ffc95e; font-size: 9px; letter-spacing: .11em; white-space: nowrap; }
.war-entry strong i { margin-left: 7px; font-style: normal; }

.ranking-shell { scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-heading h2, .explain h2 { margin-bottom: 8px; font: 700 clamp(28px, 4vw, 42px) Oxanium, sans-serif; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.search { width: min(100%, 310px); display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.search span { color: var(--green); font-size: 20px; }
.search input { width: 100%; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search input::placeholder { color: #738c80; }

.board-tabs { display: flex; gap: 8px; padding-bottom: 8px; margin-bottom: 25px; overflow-x: auto; scrollbar-width: thin; }
.board-tabs button {
  flex: 0 0 auto; padding: 11px 17px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--muted); background: rgba(10, 29, 23, .7); font-size: 12px; font-weight: 800; cursor: pointer; transition: .2s;
}
.board-tabs button:hover { color: #fff; border-color: rgba(98,238,155,.35); }
.board-tabs button.active { color: #052618; border-color: var(--green); background: var(--green); box-shadow: 0 8px 24px rgba(98,238,155,.14); }

.podium[hidden] { display: none; }
.podium { min-height: 310px; display: flex; align-items: end; justify-content: center; gap: 16px; margin: 0 auto 22px; padding-top: 28px; }
.podium-place {
  width: min(28%, 270px); min-height: 250px; display: flex; flex-direction: column; align-items: center; padding: 24px 18px;
  border: 1px solid var(--line); border-radius: 23px; color: var(--text);
  background: linear-gradient(180deg, rgba(17, 48, 37, .94), rgba(8, 25, 19, .94)); cursor: pointer; transition: transform .2s, border-color .2s;
}
.podium-place:hover { transform: translateY(-5px); border-color: rgba(98,238,155,.42); }
.podium-place.place-1 { min-height: 292px; padding-top: 20px; border-color: rgba(255,201,94,.42); background: radial-gradient(circle at 50% 0, rgba(255,201,94,.13), transparent 55%), var(--panel); }
.crown { height: 24px; color: var(--gold); font-size: 20px; }
.portrait { display: grid; place-items: center; height: 95px; margin: 3px 0 4px; }
.portrait img { border-radius: 15px; image-rendering: pixelated; box-shadow: 0 12px 25px rgba(0,0,0,.28); }
.podium-rank { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.podium-place strong { max-width: 100%; margin: 5px 0 2px; overflow: hidden; font: 700 17px Oxanium, sans-serif; text-overflow: ellipsis; }
.podium-place small { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.podium-place > b { margin-top: auto; padding-top: 15px; color: var(--gold); font-size: 12px; }
.guild-mark { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(98,238,155,.35); border-radius: 16px; color: var(--green); background: linear-gradient(145deg, #183e30, #0b2119); font: 700 15px Oxanium, sans-serif; box-shadow: inset 0 0 24px rgba(98,238,155,.08); }
.podium .guild-mark { width: 78px; height: 78px; font-size: 19px; }

.waiting { width: 100%; display: grid; justify-items: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.waiting > span { color: var(--green); font-size: 32px; }.waiting b { margin: 9px 0 4px; color: var(--text); }.waiting p { margin: 0; font-size: 12px; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(9, 27, 21, .9); }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { padding: 15px 18px; color: #718e80; background: rgba(255,255,255,.025); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-align: left; text-transform: uppercase; }
th:first-child, td:first-child { width: 70px; text-align: center; }
th:last-child, td:last-child { text-align: right; }
td { padding: 13px 18px; border-top: 1px solid rgba(164,220,191,.08); color: #cce0d6; font-size: 12px; }
tr.clickable { cursor: pointer; transition: background .16s; }
tr.clickable:hover { background: rgba(98,238,155,.055); }
tr.top-ten td:first-child { color: var(--green); font-weight: 800; }
tr.top-1 { background: rgba(255,201,94,.045); }
tr.top-1 td:first-child { color: var(--gold); font-size: 17px; }
tr.top-2 td:first-child { color: #d8e4df; font-size: 16px; }
tr.top-3 td:first-child { color: #d99b65; font-size: 16px; }
.identity { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.identity img { border-radius: 9px; image-rendering: pixelated; }
.identity .guild-mark { width: 42px; height: 42px; flex-basis: 42px; border-radius: 11px; font-size: 11px; }
.identity > span { min-width: 0; display: grid; gap: 3px; }
.identity strong { color: var(--text); font-size: 13px; }
.identity small, .subvalue { display: block; color: #718e80; font-size: 9px; }
.tag { color: var(--green); font-weight: 800; }.muted { color: #62796e; }
.primary-value { color: var(--green); font-weight: 800; }
.loading { height: 170px; color: var(--muted); text-align: center !important; }
.loading.error { color: var(--red); }
.empty { padding: 65px 20px; text-align: center; }
.empty span { display: block; color: var(--green); font-size: 34px; }.empty b { display: block; margin: 8px 0 4px; }.empty p { color: var(--muted); font-size: 12px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 16px; border-top: 1px solid var(--line); }
.pagination button { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--panel-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.pagination button:disabled { opacity: .3; cursor: default; }
.pagination span { color: var(--muted); font-size: 10px; }

.explain { margin: 86px 0 90px; }
.explain > div:first-child { max-width: 650px; margin-bottom: 25px; }
.explain-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.explain article { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.explain article > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 12px; color: var(--green); background: rgba(98,238,155,.1); font-size: 19px; }
.explain h3 { margin-bottom: 8px; font: 700 16px Oxanium, sans-serif; }
.explain article p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

footer { width: min(1380px, calc(100% - 40px)); display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 auto; padding: 30px 0 45px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
footer div { display: grid; gap: 4px; } footer b { color: var(--text); font: 700 14px Oxanium, sans-serif; } footer p { margin: 0; }

dialog { width: min(680px, calc(100% - 28px)); padding: 0; border: 1px solid rgba(98,238,155,.25); border-radius: 25px; color: var(--text); background: #0b1e17; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
dialog::backdrop { background: rgba(1,8,5,.78); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 15px; top: 13px; z-index: 2; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #112a20; font-size: 20px; cursor: pointer; }
#profile-content { padding: 30px; }
.profile-head { display: flex; align-items: center; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.profile-head img { border-radius: 17px; image-rendering: pixelated; }
.profile-head .guild-mark { width: 96px; height: 96px; font-size: 23px; }
.profile-head h2 { margin-bottom: 6px; font: 700 27px Oxanium, sans-serif; }.profile-head p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 22px; }
.profile-stats > div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.limited-profile { grid-template-columns: repeat(2, 1fr); }
.profile-stats small { color: var(--muted); font-size: 9px; }.profile-stats strong { overflow: hidden; color: var(--green); font-size: 13px; text-overflow: ellipsis; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 30px); padding: 12px 17px; border: 1px solid rgba(98,238,155,.3); border-radius: 12px; color: var(--text); background: #112a20; box-shadow: 0 15px 40px rgba(0,0,0,.4); font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 980px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .world-art { position: absolute; right: -95px; width: 520px; height: 320px; opacity: .3; }
  .world-art img { width: 500px; max-height: 320px; }
  .overview { grid-template-columns: repeat(2,1fr); }
  .explain-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  body { font-size: 14px; }
  .topbar, main, footer { width: min(100% - 24px, 1380px); }
  .topbar { min-height: 70px; gap: 10px; }
  .brand > span:last-child { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .server-address { margin-left: auto; padding: 8px 11px; }
  .hero { margin-top: 12px; padding: 31px 22px; border-radius: 22px; }
  .world-art { display: none; }
  h1 { font-size: 38px; }
  .lead { font-size: 14px; }
  .overview { gap: 9px; margin-bottom: 55px; }
  .overview article { min-height: 89px; padding: 14px; gap: 10px; }
  .stat-icon { flex-basis: 37px; height: 37px; border-radius: 10px; font-size: 16px; }
  .overview strong { font-size: 16px; }
  .war-entry { grid-template-columns: auto 1fr; margin-top: -37px; margin-bottom: 52px; padding: 15px; }
  .war-entry strong { grid-column: 2; }
  .war-entry em { display: none; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .podium { min-height: 0; gap: 7px; padding-top: 10px; }
  .podium-place { width: 33.333%; min-height: 215px; padding: 15px 7px; border-radius: 16px; }
  .podium-place.place-1 { min-height: 245px; }
  .portrait { height: 76px; }
  .portrait img { width: 58px; height: 58px; }
  .place-1 .portrait img { width: 68px; height: 68px; }
  .podium-place strong { font-size: 11px; }
  .podium-place small { font-size: 8px; }
  .podium-place > b { font-size: 9px; }
  .podium .guild-mark { width: 58px; height: 58px; font-size: 13px; }
  #profile-content { padding: 25px 16px 17px; }
  .profile-head { gap: 13px; }
  .profile-head img, .profile-head .guild-mark { width: 70px; height: 70px; }
  .profile-head h2 { font-size: 20px; }
  .profile-stats { grid-template-columns: repeat(2,1fr); }
  footer { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
