/* =========================================================
   Deadlockownia - ranking najlepszych graczy serwera
   ========================================================= */

.dl-rg {
	--z: #eebb60;
	--z2: #c4963b;
	--txt: #f0f0f5;
	--muted: #9c9ca8;
	--linia: rgba(255, 255, 255, .08);
	--plus: #6fe0a3;
	--minus: #ff7b7b;
	font-family: 'Rajdhani', system-ui, sans-serif;
	color: var(--txt);
	box-sizing: border-box;
	padding: 0 0 60px;
	/* motyw przycina .site-main do 500-1140 px, a podium potrzebuje miejsca */
	width: min(1100px, calc(100vw - 44px));
	margin-left: calc(50% - min(550px, 50vw - 22px));
	margin-right: 0;
}
.dl-rg * { box-sizing: border-box; }
.dl-rg-pusto { padding: 40px 0; text-align: center; font-size: 17px; color: var(--muted); }

/* ---------- podium ---------- */
.dl-rg-podium {
	display: grid;
	grid-template-columns: 1fr 1.15fr 1fr;
	align-items: end;
	gap: 16px;
	margin-bottom: 34px;
}
.dl-rg-karta {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 34px 18px 26px;
	background:
		radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--kolor-rangi) 22%, transparent), transparent 70%),
		linear-gradient(180deg, #17171d, #0f0f13);
	border: 1px solid var(--linia);
	border-bottom: 3px solid var(--kolor-rangi);
	clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
/* pierwsze miejsce w srodku i wyzej */
.dl-rg-pierwsze { order: 2; padding-top: 46px; padding-bottom: 34px; border-bottom-color: var(--z); }
.dl-rg-drugie   { order: 1; }
.dl-rg-trzecie  { order: 3; }

.dl-rg-poz {
	position: absolute;
	top: 12px;
	left: 16px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
	color: rgba(255, 255, 255, .14);
}
.dl-rg-pierwsze .dl-rg-poz { color: var(--z); font-size: 36px; }

.dl-rg-ikona { width: 84px; height: 84px; object-fit: contain; margin-bottom: 12px; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.dl-rg-pierwsze .dl-rg-ikona { width: 104px; height: 104px; }

.dl-rg-nick {
	display: block;
	max-width: 100%;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.15;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dl-rg-pierwsze .dl-rg-nick { font-size: 26px; }
.dl-rg-ranga {
	margin-top: 4px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.3px;
	color: var(--muted);
}
.dl-rg-punkty {
	margin-top: 12px;
	font-size: 28px;
	font-weight: 800;
	line-height: 1;
	color: var(--z);
}
.dl-rg-punkty i { font-style: normal; font-size: 13px; font-weight: 700; margin-left: 5px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

/* awatar ze Steama na podium (zamiast duzej ikony rangi, ranga w rogu) */
.dl-rg-awatar { position: relative; display: block; width: 96px; height: 96px; margin-bottom: 14px; }
.dl-rg-pierwsze .dl-rg-awatar { width: 116px; height: 116px; }
.dl-rg-awatar > img:first-child {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 3px solid var(--kolor-rangi);
	clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.dl-rg-awatar-ranga { position: absolute; right: -16px; bottom: -14px; width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .7)); }
.dl-rg-karta-staty { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }

/* ---------- tabela ---------- */
.dl-rg-glowka,
.dl-rg-wiersz {
	display: grid;
	grid-template-columns: 36px minmax(170px, 1.6fr) minmax(140px, 1.1fr) 84px 84px 76px 76px 112px;
	align-items: center;
	gap: 12px;
}
.dl-rg-glowka {
	padding: 10px 18px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.6px;
	color: var(--muted);
	border-bottom: 1px solid rgba(238, 187, 96, .22);
}
.dl-rg-glowka button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	justify-self: start;
	margin: 0;
	padding: 4px 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: var(--muted) !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: color .14s;
}
.dl-rg-glowka button::after { content: "↕"; font-size: 12px; opacity: .45; }
.dl-rg-glowka button:hover { color: var(--txt) !important; }
.dl-rg-glowka button[aria-sort] { color: var(--z) !important; }
.dl-rg-glowka button[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
.dl-rg-glowka button[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
.dl-rg-glowka button:focus-visible { outline: 1px solid var(--z); outline-offset: 2px; }
.dl-rg-wiersz {
	padding: 9px 18px;
	background: rgba(255, 255, 255, .018);
	border-bottom: 1px solid rgba(255, 255, 255, .04);
	transition: background .14s;
}
.dl-rg-wiersz:hover { background: rgba(238, 187, 96, .06); }

.dl-rg-nr { font-size: 16px; font-weight: 800; color: var(--muted); }
.dl-rg-gracz { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dl-rg-av { flex: 0 0 36px; width: 36px; height: 36px; object-fit: cover; clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.dl-rg-av-brak { display: block; background: rgba(255, 255, 255, .06); }
.dl-rg-gracz-tekst { min-width: 0; }
.dl-rg-gracz-tekst b { display: block; overflow: hidden; font-size: 16.5px; font-weight: 700; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.dl-rg-gracz-tekst i { display: block; overflow: hidden; font-size: 12.5px; font-style: normal; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.dl-rg-ranga-kom { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--txt); }
.dl-rg-ranga-kom img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.dl-rg-pkt { font-size: 17px; font-weight: 800; color: var(--z); }
.dl-rg-liczba { font-size: 16px; font-weight: 700; color: var(--txt); }
.dl-rg-liczba i { font-style: normal; font-weight: 600; color: var(--muted); }
.dl-rg-liczba.plus, .dl-rg-zmiana.plus { color: var(--plus); }
.dl-rg-liczba.minus, .dl-rg-zmiana.minus { color: var(--minus); }
.dl-rg-ostatni b { display: block; font-size: 14.5px; font-weight: 700; color: var(--muted); }
.dl-rg-ostatni i { display: block; font-size: 12.5px; font-style: normal; color: var(--muted); }

.dl-rg-stopka { margin: 16px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

/* ---------- zaproszenie ---------- */
.dl-rg-cta {
	display: block;
	margin-top: 30px;
	padding: 20px 24px;
	background: linear-gradient(90deg, rgba(238, 187, 96, .11), rgba(238, 187, 96, .02));
	border: 1px solid rgba(238, 187, 96, .3);
	border-left: 3px solid var(--z);
	text-decoration: none !important;
	transition: background .16s, border-color .16s;
}
.dl-rg-cta:hover { background: rgba(238, 187, 96, .17); border-color: var(--z); }
.dl-rg-cta b { display: block; font-size: 19px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--z); margin-bottom: 4px; }
.dl-rg-cta span { font-size: 15.5px; line-height: 1.5; color: #b8b8c4; }

/* ---------- male ekrany ---------- */
@media (max-width: 860px) {
	.dl-rg-glowka, .dl-rg-wiersz { grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1.1fr) 76px 70px 64px; }
	.dl-rg-ukryj { display: none !important; }
}
@media (max-width: 720px) {
	.dl-rg {
		padding: 0 0 44px;
		width: min(1100px, calc(100vw - 32px));
		margin-left: calc(50% - min(550px, 50vw - 16px));
	}
	.dl-rg-podium { grid-template-columns: 1fr; gap: 10px; }
	.dl-rg-pierwsze, .dl-rg-drugie, .dl-rg-trzecie { order: 0; padding: 26px 16px 22px; }
	.dl-rg-ikona, .dl-rg-pierwsze .dl-rg-ikona { width: 72px; height: 72px; }
	.dl-rg-nick, .dl-rg-pierwsze .dl-rg-nick { font-size: 21px; }
	.dl-rg-punkty { font-size: 24px; }
}
@media (max-width: 600px) {
	.dl-rg-glowka, .dl-rg-wiersz { grid-template-columns: 24px minmax(0, 1fr) 62px 54px 54px; }
	.dl-rg-ukryj-tel { display: none !important; }
	.dl-rg-av { flex-basis: 30px; width: 30px; height: 30px; }
	.dl-rg-gracz { gap: 8px; }
	.dl-rg-gracz-tekst b { font-size: 15px; }
}
@media (max-width: 480px) {
	.dl-rg-glowka, .dl-rg-wiersz { padding: 9px 10px; gap: 8px; }
}

/* wstep nad rankingiem (w tresci strony, poza .dl-rg) */
.dl-rg-wstep {
	font-family: 'Rajdhani', system-ui, sans-serif;
	max-width: 820px;
	margin: 0 auto 30px;
	padding-left: 18px;
	border-left: 2px solid #c4963b;
	font-size: 16.5px;
	line-height: 1.65;
	color: #b8b8c4;
}
.dl-rg-wstep a { color: #eebb60; font-weight: 700; text-decoration: none; border-bottom: 1px solid rgba(238, 187, 96, .4); }
.dl-rg-wstep a:hover { color: #ffd07a; border-color: #eebb60; }

/* =========================================================
   Statystyki spolecznosci [dl_ranking_statystyki] (w sekcji systemu,
   tokeny z .dl-g-sekcja)
   ========================================================= */
.dl-rs-liczby { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; }
.dl-rs-liczby li { padding: 18px 20px; background: linear-gradient(180deg, var(--karta-a), var(--karta-b)); border-top: 2px solid var(--z); }
.dl-rs-liczby b { display: block; font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--txt); }
.dl-rs-liczby span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

.dl-rs-siatka { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dl-rs-kolumna { display: grid; gap: 24px; }
.dl-rs-karta { padding: 24px; }
.dl-rs-karta h3 { margin: 0; }
.dl-rs-opis { margin: 6px 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* rangi: zloty = my, szary = swiat */
.dl-rs-rangi { margin: 0; padding: 0; list-style: none; }
.dl-rs-rangi li { display: grid; grid-template-columns: 28px 92px minmax(0, 1fr) 64px; gap: 12px; align-items: center; padding: 6px 0; }
.dl-rs-rangi img { width: 28px; height: 28px; object-fit: contain; }
.dl-rs-ranga-nazwa { font-size: 14.5px; font-weight: 600; color: var(--txt); }
.dl-rs-paski { display: grid; gap: 3px; }
.dl-rs-paski i { display: block; height: 9px; min-width: 2px; }
.dl-rs-paski .nasz { background: var(--z); }
.dl-rs-paski .swiat { height: 5px; background: rgba(255, 255, 255, .22); }
.dl-rs-ranga-liczby { text-align: right; }
.dl-rs-ranga-liczby b { display: block; font-size: 16px; color: var(--txt); }
.dl-rs-ranga-liczby i { display: block; font-size: 11.5px; font-style: normal; color: var(--muted2); }

/* mecze dzien po dniu */
.dl-rs-dni { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; height: 170px; align-items: end; }
.dl-rs-dzien { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.dl-rs-dzien b { font-size: 12px; font-weight: 700; color: var(--muted); }
.dl-rs-dzien i { display: block; width: 100%; margin-top: 4px; background: linear-gradient(180deg, var(--z), rgba(238, 187, 96, .35)); }
.dl-rs-dzien em { margin-top: 6px; font-size: 11.5px; font-style: normal; font-weight: 600; color: var(--muted2); }
.dl-rs-dzien:last-child b, .dl-rs-dzien:last-child em { color: var(--z); }

/* bohaterowie */
.dl-rs-boh { margin: 0; padding: 0; list-style: none; }
.dl-rs-boh li { display: grid; grid-template-columns: 36px minmax(0, 1fr) 56px; gap: 12px; align-items: center; padding: 5px 0; }
.dl-rs-boh img { width: 36px; height: 45px; object-fit: cover; clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.dl-rs-boh-nazwa b { display: block; font-size: 15px; color: var(--txt); }
.dl-rs-boh-pasek { display: block; height: 5px; margin-top: 5px; background: rgba(255, 255, 255, .06); }
.dl-rs-boh-pasek i { display: block; height: 100%; background: var(--z); }
.dl-rs-boh-liczby { text-align: right; }
.dl-rs-boh-liczby b { display: block; font-size: 16px; color: var(--txt); }
.dl-rs-boh-liczby i { display: block; font-size: 11.5px; font-style: normal; color: var(--muted2); }

@media (max-width: 1080px) {
	.dl-rs-siatka { grid-template-columns: minmax(0, 1fr); }
	.dl-rs-liczby { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.dl-rs-liczby b { font-size: 27px; }
	.dl-rs-rangi li { grid-template-columns: 24px 78px minmax(0, 1fr) 52px; gap: 8px; }
	.dl-rs-dni { gap: 3px; height: 140px; }
	.dl-rs-dzien b { font-size: 10px; }
}

/* nick = link do profilu gracza */
a.dl-rg-nick { text-decoration: none !important; transition: color .14s; }
a.dl-rg-nick:hover { color: var(--z) !important; }
.dl-rg-gracz-tekst a { display: block; overflow: hidden; font-size: 16.5px; font-weight: 700; color: #fff !important; text-decoration: none !important; text-overflow: ellipsis; white-space: nowrap; transition: color .14s; }
.dl-rg-wiersz:hover .dl-rg-gracz-tekst a { color: var(--z) !important; }
@media (max-width: 600px) { .dl-rg-gracz-tekst a { font-size: 15px; } }

/* link do rankingu swiatowego nad podium */
.dl-rg-swiat { margin: 0 0 18px; text-align: right; font-size: 15px; font-weight: 700; }
.dl-rg-swiat a { color: var(--z) !important; text-decoration: none !important; border-bottom: 1px solid rgba(238, 187, 96, .4); transition: color .16s, border-color .16s; }
.dl-rg-swiat a:hover { color: #ffd07a !important; border-color: var(--z); }
@media (max-width: 600px) { .dl-rg-swiat { text-align: left; } }
