/* ── PVP Rankings Section ── */
.pvp-section {
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	width: 100vw;
	min-height: 600px;
	padding: 50px 0;
	background-color: #f7f3f3eb;
	overflow: hidden;
	border-top: 1px solid rgba(150, 190, 220, 0.35);
	border-bottom: 1px solid rgba(150, 190, 220, 0.35);
}

.pvp-section .pvp-bg {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	opacity: 0.12;
	pointer-events: none;
	z-index: 0;
}

.pvp-section::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.678) 0%, transparent 14%, transparent 86%, rgba(255, 255, 255, 0.696) 100%);
}

.pvp-section .pvp-inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 30px;
}

/* Chibi - left anchor */
.pvp-section .is-chibi-left {
    flex-shrink: 0;
    z-index: -2;
    top: 50px;
	bottom: auto;
    position: absolute;
    left: -320px;       
    right: auto;   
}

.pvp-section .is-chibi-left img {
    max-height: 320px;
    transform: scale(1.20);
    transform-origin: left bottom;  
    width: auto;
    display: block;
}

/* Chibi - right anchor */
.pvp-section .is-chibi-right {
    flex-shrink: 0;
    z-index: -2;
    top: 190px;
    position: absolute;
    right: -350px;       
    left: auto;   
}

.pvp-section .is-chibi-right img {
    max-height: 320px;
    transform: scale(1.30);
    transform-origin: right bottom;  
    width: auto;
    display: block;
}

/* Pill title - blue pill design */
.pvp-title {
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin: 6px auto 8px;
	padding: 12px 28px;
	color: #fbfdff;
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 22px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 4px;
	text-align: center;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.523);
	background-color: rgba(103, 182, 252, 0.973);
	border-radius: 50px;
	
	box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.219),
    inset 0 -4px 0 rgba(10, 60, 120, 0.55);
}

.pvp-sub {
	text-align: center;
	color: #6a7686;
	font-family: 'Informb';
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	margin-bottom: 22px;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

/* Table (CSS grid rows) */
.pvp-table {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pvp-row {
	display: grid;
	grid-template-columns: 80px 1fr 120px 120px;
	align-items: center;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 14px;
	letter-spacing: 0.8px;
	color: #3a4a5a;
}

/* Header row */
.pvp-row.pvp-head {
	padding: 6px 18px 10px;
	border-radius: 0;
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 13px;
	letter-spacing: 1.5px;
	color: #3a4a5a;
	border-bottom: 2px solid rgba(150, 190, 220, 0.5);
}

.pvp-rank {
	text-align: center;
	font-weight: 700;
}

.pvp-name {
	font-weight: 600;
	letter-spacing: 1px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pvp-kills,
.pvp-kd {
	text-align: center;
	font-weight: 600;
}

/* Plain rows (rank 4+) */
.pvp-row:not(.pvp-head):not(.top):nth-child(even) {
	background: rgba(245, 248, 251, 0.6);
}

/* Top 3 - dark → light gradient, white text */
.pvp-row.top {
	color: #fff;
	font-weight: 700;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.pvp-row.top .pvp-name {
	font-weight: 800;
}

.pvp-row.top-1 {
	background: linear-gradient(90deg, #2b2b33 0%, #3a3a44 100%);
}

.pvp-row.top-2 {
	background: linear-gradient(90deg, #3d3d52 0%, #51516b 100%);
}

.pvp-row.top-3 {
	background: linear-gradient(90deg, #54546e 0%, #6b6b88 100%);
}

.pvp-empty {
	text-align: center;
	color: #6a7686;
	font-size: 13px;
	letter-spacing: 0.5px;
	padding: 20px 0;
}

.ranking-page-section,
.statistics-page-section {
	min-height: 620px;
	padding: 24px 0 80px;
}

.ranking-page-section .ranking-inner {
	max-width: 1080px;
}

.ranking-page-section .ranking-row {
	grid-template-columns: 72px minmax(160px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) 90px 90px;
}

/* Never render placeholder ranking slots as real rows. */
.ranking-page-section .ranking-row.empty-row {
	display: none !important;
}

.ranking-page-section .ranking-filter-form {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin: 0 auto 18px;
}

.ranking-filter-form label {
	color: #566777;
	font-family: 'Informb', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.ranking-filter-form select,
.ranking-filter-form input {
	background: rgba(255, 255, 255, 0.8);
	border: 1px solid rgba(110, 165, 205, 0.55);
	border-radius: 6px;
	color: #34495c;
	font-family: 'Informb', sans-serif;
	font-size: 12px;
	padding: 8px 10px;
}

.ranking-filter-form input {
	cursor: pointer;
}

/* ── Shared game UI for legacy ranking tabs ── */
.legacy-ranking-title {
	display: flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	margin: 6px auto 10px;
	padding: 12px 28px;
	border: 0;
	border-radius: 50px;
	background: rgba(103, 182, 252, 0.973);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.219), inset 0 -4px 0 rgba(10, 60, 120, 0.55);
	color: #fbfdff;
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 4px;
	line-height: 1.15;
	text-align: center;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.523);
	text-transform: uppercase;
}

.legacy-ranking-title + h3 {
	margin: 0 auto 22px;
	border: 0;
	color: #6a7686;
	font-family: 'Informb', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1.45;
	text-align: center;
	text-transform: none;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.ranking-legacy-filter {
	display: flex !important;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
	padding: 0;
	border: 0;
}

.ranking-legacy-filter p {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	color: inherit;
}

.ranking-legacy-filter label {
	margin: 0;
	color: #566777;
	font-family: 'Informb', sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.ranking-legacy-filter select,
.ranking-legacy-filter input[type="submit"],
.ranking-legacy-filter input[type="button"] {
	min-height: 38px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid rgba(110, 165, 205, 0.55);
	border-radius: 7px;
	background: rgba(255, 255, 255, 0.88);
	color: #34495c;
	font-family: 'Informb', sans-serif;
	font-size: 12px;
	font-style: normal;
}

.ranking-legacy-filter select {
	min-width: 230px;
}

.ranking-legacy-filter input[type="submit"],
.ranking-legacy-filter input[type="button"] {
	cursor: pointer;
	transition: background .15s ease, transform .08s ease;
}

.ranking-legacy-filter input[type="submit"]:hover,
.ranking-legacy-filter input[type="button"]:hover {
	background: #f6fbff;
	transform: translateY(-1px);
}

.ranking-legacy-table {
	width: min(1180px, calc(100% - 40px));
	margin: 0 auto 36px;
	border: 0;
	border-collapse: separate;
	border-spacing: 0 7px;
	background: transparent;
	font-family: 'Informb', sans-serif;
	table-layout: auto;
}

.ranking-legacy-table th,
.ranking-legacy-table td {
	border: 0 !important;
}

.ranking-legacy-table th {
	padding: 7px 12px 10px;
	background: transparent !important;
	border-bottom: 2px solid rgba(150, 190, 220, 0.5) !important;
	color: #3a4a5a;
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 1px;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

.ranking-legacy-table td {
	padding: 13px 12px;
	background: rgba(245, 248, 251, 0.72);
	color: #3a4a5a;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .45px;
	vertical-align: middle;
}

.ranking-legacy-table tr:not(:first-child) td:first-child {
	border-radius: 9px 0 0 9px !important;
}

.ranking-legacy-table tr:not(:first-child) td:last-child {
	border-radius: 0 9px 9px 0 !important;
}

.ranking-legacy-table tr:not(:first-child):hover td {
	filter: brightness(1.025);
}

.ranking-legacy-table td a {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.ranking-legacy-table td img {
	vertical-align: middle;
}

/* Ranked tables use the same dark top-three progression as Character Rankings. */
.ranking-legacy-ranked-table tr.top-ranked td {
	background: linear-gradient(90deg, #2b2b33 0%, #3a3a44 100%);
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.ranking-legacy-ranked-table tr:nth-child(3) td {
	background: linear-gradient(90deg, #3d3d52 0%, #51516b 100%);
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.ranking-legacy-ranked-table tr:nth-child(4) td {
	background: linear-gradient(90deg, #54546e 0%, #6b6b88 100%);
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.ranking-legacy-ranked-table tr.top-ranked td,
.ranking-legacy-ranked-table tr:nth-child(3) td,
.ranking-legacy-ranked-table tr:nth-child(4) td {
	box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
}

.ranking-legacy-ranked-table tr.top-ranked td a,
.ranking-legacy-ranked-table tr:nth-child(3) td a,
.ranking-legacy-ranked-table tr:nth-child(4) td a {
	color: #fff;
}

.ranking-legacy-ranked-table tr.top-ranked .not-applicable,
.ranking-legacy-ranked-table tr:nth-child(3) .not-applicable,
.ranking-legacy-ranked-table tr:nth-child(4) .not-applicable {
	color: rgba(255,255,255,.72);
}

/* Legacy ranking tabs now use the exact same full ranking section shell as
   Character Rankings. Their own table columns stay intact inside this shell. */
.legacy-ranking-section .ranking-inner {
	max-width: 1080px;
}

.legacy-ranking-section .legacy-ranking-title {
	margin-top: 0;
}

/* Empty rankings keep their header visible and show neutral placeholder rows,
   never the dark top-rank gradients. */
.ranking-legacy-table .ranking-empty-placeholder td {
	height: 50px;
	padding: 0;
	background: rgba(245, 248, 251, 0.48) !important;
	border-top: 1px solid rgba(150, 190, 220, 0.15) !important;
	border-bottom: 1px solid rgba(150, 190, 220, 0.15) !important;
	box-shadow: none !important;
	color: transparent !important;
	text-shadow: none !important;
}

.ranking-legacy-table .ranking-empty-placeholder:hover td {
	filter: none !important;
}

.ranking-page-section .ranking-empty-placeholder-grid {
	min-height: 48px;
	background: rgba(245, 248, 251, 0.48) !important;
	box-shadow: inset 0 0 0 1px rgba(150, 190, 220, 0.14) !important;
	color: transparent !important;
	text-shadow: none !important;
}

/* MVP is a log rather than numbered ranks, so keep its data rows light. */
.ranking-mvp-table td {
	background: rgba(245, 248, 251, 0.78);
}

/* MVP latest-kills heading: keep it visually prominent and above the
   decorative side characters/table layers. */
.legacy-ranking-section .mvp-latest-title {
	position: relative !important;
	z-index: 8 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: fit-content !important;
	margin: 22px auto 12px !important;
	padding: 9px 20px 7px !important;
	border: 1px solid rgba(43, 148, 207, .72) !important;
	border-bottom: 4px solid #1778b4 !important;
	border-radius: 999px !important;
	background: linear-gradient(180deg, #68c7f6 0%, #39abe9 52%, #218fd2 100%) !important;
	box-shadow: inset 0 2px 0 rgba(255,255,255,.42), 0 6px 14px rgba(40,120,176,.22) !important;
	color: #fff !important;
	font-family: 'Grobold', 'Arial Black', sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	letter-spacing: 1.2px !important;
	line-height: 1 !important;
	text-align: center !important;
	text-shadow: 0 2px 2px rgba(0,60,100,.52) !important;
	text-transform: uppercase !important;
}

@media (max-width: 700px) {
	.legacy-ranking-title {
		font-size: 17px;
		letter-spacing: 2px;
		padding: 10px 20px;
	}

	.ranking-legacy-table {
		display: block;
		width: calc(100% - 20px);
		overflow-x: auto;
	}

	.ranking-legacy-table th,
	.ranking-legacy-table td {
		min-width: 90px;
		padding: 10px 9px;
		font-size: 11px;
	}

	.ranking-legacy-filter select {
		min-width: 180px;
	}
}

.ranking-guild {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	min-width: 0;
}

.ranking-guild img {
	height: 22px;
	width: 22px;
}

.statistics-link-table {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 6px auto 0;
	max-width: 900px;
}

.statistics-link-table .statistics-row {
	grid-template-columns: 190px minmax(0, 1fr) 96px;
	min-height: 64px;
	padding: 12px 16px 9px 18px;
	border: 1px solid rgba(122, 181, 224, 0.55);
	border-bottom: 4px solid rgba(90, 149, 194, 0.75);
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(250, 254, 255, 0.96) 0%, rgba(226, 242, 252, 0.92) 100%);
	box-shadow:
		inset 0 2px 1px rgba(255, 255, 255, 0.92),
		inset 0 -3px 7px rgba(72, 132, 177, 0.08),
		0 5px 13px rgba(62, 123, 169, 0.14);
	color: #445d73;
	text-decoration: none;
	transition: transform 0.10s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.statistics-link-table .statistics-row span:first-child {
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 1px;
	color: #38556e;
	text-shadow: 0 1px 0 rgba(255,255,255,.9);
}

.statistics-link-table .statistics-row span:nth-child(2) {
	color: #4e6578;
	font-family: 'Informb', sans-serif;
	font-size: 13px;
	line-height: 1.4;
}

.statistics-link-table .statistics-row span:last-child {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	min-width: 74px;
	min-height: 34px;
	padding: 7px 12px 5px;
	border: 1px solid #2a93cf;
	border-bottom: 4px solid #1573b0;
	border-radius: 9px;
	background: linear-gradient(180deg, #5cc3f5 0%, #34a8ef 48%, #1e90d8 100%);
	box-shadow: inset 0 2px 1px rgba(255,255,255,.5), 0 3px 8px rgba(40,130,200,.26);
	color: #fff;
	font-family: 'Grobold', 'Arial Black', sans-serif;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: .8px;
	text-align: center;
	text-shadow: 0 1px 2px rgba(0,60,110,.55);
	text-transform: uppercase;
}

.statistics-link-table .statistics-row:hover {
	filter: brightness(1.025);
	transform: translateY(-2px);
	box-shadow:
		inset 0 2px 1px rgba(255, 255, 255, 0.95),
		inset 0 -3px 7px rgba(72, 132, 177, 0.08),
		0 8px 18px rgba(62, 123, 169, 0.20);
}

.statistics-link-table .statistics-row:active {
	transform: translateY(1px);
}

.cms-page-shell--statistics {
	margin-top: 0;
}

/* Statistics landing page: keep both decorative characters fully inside the
   viewport instead of leaving most of them clipped beyond the left/right
   edges. The content cards remain in front, while the artwork is pulled
   inward from the old -320px / -350px ranking offsets. */
.cms-page-shell--statistics .pvp-section .is-chibi-left {
	left: -110px !important;
}

.cms-page-shell--statistics .pvp-section .is-chibi-right {
	right: -110px !important;
}

.cms-page-shell--statistics .pvp-section .is-chibi-left img,
.cms-page-shell--statistics .pvp-section .is-chibi-right img {
	max-height: 330px !important;
}

/* Responsive decorative ranking characters. Keep them visible at the outer
   edges but below every ranking heading, filter and table layer. */
@media (max-width: 960px) {
	/* Rankings only: remove decorative side characters on tablet/mobile. */
	.ranking-page-section .is-chibi-left,
	.ranking-page-section .is-chibi-right,
	.home-pvp-ranking .is-chibi-left,
	.home-pvp-ranking .is-chibi-right {
		display: none !important;
	}

	.pvp-section .pvp-inner {
		isolation: isolate;
	}

	.pvp-section .is-chibi-left,
	.pvp-section .is-chibi-right {
		z-index: -3 !important;
		pointer-events: none;
	}

	.pvp-section .is-chibi-left {
		left: -158px;
	}

	.pvp-section .is-chibi-right {
		right: -126px;
	}

	.pvp-section .is-chibi-left img {
		transform: translateX(-24%) scale(1.20) !important;
		transform-origin: left bottom !important;
	}

	.pvp-section .is-chibi-right img {
		transform: translateX(22%) scale(1.30) !important;
		transform-origin: right bottom !important;
	}

	.pvp-section .pvp-title,
	.pvp-section .pvp-sub,
	.pvp-section .pvp-table,
	.pvp-section .ranking-filter-form,
	.pvp-section .ranking-legacy-filter,
	.pvp-section .ranking-legacy-table,
	.pvp-section .legacy-ranking-title,
	.pvp-section .legacy-ranking-title + h3 {
		position: relative;
		z-index: 3;
	}
}

/* Responsive */
@media (max-width: 700px) {
	.pvp-section {
		padding: 36px 0;
	}

	.pvp-section .is-chibi-left {
		left: -126px;
		top: 110px;
	}

	.pvp-section .is-chibi-right {
		right: -86px;
		top: 180px;
	}

	.pvp-section .is-chibi-left img,
	.pvp-section .is-chibi-right img {
		max-height: 285px !important;
	}

	.pvp-section .is-chibi-left img {
		transform: translateX(-42%) scale(1.20) !important;
		transform-origin: left bottom !important;
	}

	.pvp-section .is-chibi-right img {
		transform: translateX(38%) scale(1.30) !important;
		transform-origin: right bottom !important;
	}

	.pvp-title {
		font-size: 17px;
		padding: 10px 20px;
		letter-spacing: 2px;
	}
	.pvp-row {
		grid-template-columns: 44px 1fr 64px 64px;
		padding: 10px 12px;
		font-size: 12px;
		letter-spacing: 0.4px;
	}
	.pvp-row.pvp-head {
		padding: 6px 12px 8px;
		font-size: 11px;
		letter-spacing: 0.8px;
	}

	.ranking-page-section .ranking-row {
		grid-template-columns: 52px 1fr 66px;
	}

	/* Statistics landing cards stack vertically on phones so the description
	   remains readable instead of being hidden between the title and action. */
	.statistics-link-table .statistics-row {
		display: grid;
		grid-template-columns: 1fr !important;
		align-items: start;
		gap: 8px;
		min-height: 0;
		padding: 14px 14px 12px;
	}

	.statistics-link-table .statistics-row span:first-child {
		font-size: 13px;
		line-height: 1.25;
	}

	.statistics-link-table .statistics-row span:nth-child(2) {
		display: block !important;
		font-size: 12px;
		line-height: 1.45;
	}

	.statistics-link-table .statistics-row span:last-child {
		justify-self: stretch;
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.ranking-page-section .ranking-row span:nth-child(3),
	.ranking-page-section .ranking-row span:nth-child(4),
	.ranking-page-section .ranking-row span:nth-child(6) {
		display: none;
	}

	/* Reduce the oversized mobile gap between the fixed header and the first
	   ranking/statistics section. */
	.ranking-page-section,
	.statistics-page-section {
		padding-top: 14px !important;
	}
}

@media (max-width: 430px) {
	.pvp-section .is-chibi-left {
		left: -118px;
		top: 118px;
	}

	.pvp-section .is-chibi-right {
		right: -68px;
		top: 190px;
	}

	.pvp-section .is-chibi-left img,
	.pvp-section .is-chibi-right img {
		max-height: 255px !important;
	}
}
