/* ==========================================================================
   Stranica meča
   ========================================================================== */
.az-match { display: flex; flex-direction: column; gap: 20px; }
.az-match .az-breadcrumbs ol { margin-bottom: 0; }
.az-match__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.az-match__main, .az-match__side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Hero */
.az-mhero { background: var(--az-surface-3); }
.az-mhero__top {
	display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
	padding: 12px 20px; border-bottom: 1px solid var(--az-border); font-size: 13px; color: var(--az-text-3);
}
.az-mhero__event { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.az-mhero__event a { font-weight: 600; color: var(--az-text-2); }
.az-mhero__event a:hover { color: var(--az-accent-text); }
.az-mhero__status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.az-mhero__status--live { color: var(--az-accent-text); font-weight: 700; text-transform: uppercase; }
.az-mhero__teams {
	display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
	padding: 28px 20px;
}
.az-mhero__team { display: flex; align-items: center; gap: 16px; min-width: 0; color: var(--az-text); }
.az-mhero__team--a { justify-content: flex-end; text-align: right; }
.az-mhero__team:hover .az-disp { color: var(--az-accent-text); }
.az-mhero__team.is-loser { opacity: .62; }
.az-mhero__tname { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.az-mhero__team--a .az-mhero__tname { align-items: flex-end; }
.az-mhero__t1, .az-mhero__t2 {
	font-size: clamp(22px, 3.2vw, 38px); font-weight: 800; line-height: 1;
	overflow-wrap: anywhere;
}
.az-mhero__logo {
	width: 72px; height: 72px; flex: none; border-radius: 14px; overflow: hidden;
	display: grid; place-items: center; font-weight: 800; font-size: 20px;
	background: #1c2536; border: 1px solid var(--az-border-strong); color: var(--az-text-2);
}
.az-mhero__logo img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.az-mhero__score { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.az-mhero__nums { font-size: clamp(40px, 5vw, 60px); font-weight: 700; line-height: 1; white-space: nowrap; }
.az-mhero__nums .is-loss { color: var(--az-muted); }
.az-mhero__colon { color: #4a5568; padding: 0 10px; }
.az-mhero__vs { font-size: 36px; font-weight: 800; color: var(--az-muted); }
/* Natpis ispod rezultata ne pomera brojeve — rezultat ostaje u ravni sa logoima */
.az-mhero__unit { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 12px; color: var(--az-muted); }
.az-mhero__maps {
	list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--az-border);
	display: grid; grid-template-columns: repeat(var(--az-maps, 3), minmax(0, 1fr));
}
.az-mapcell {
	position: relative; isolation: isolate; overflow: hidden;
	padding: 18px 20px 16px; min-height: 96px; border-right: 1px solid var(--az-border); background: var(--az-surface);
}
/* Pozadina mape + tamni preliv da tekst ostane čitljiv */
.az-mapcell::before, .az-mapcell::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.az-mapcell::before {
	background: var(--az-map-bg) center / cover no-repeat;
	transform: scale(1.02); transition: transform .4s ease, filter .3s ease;
}
.az-mapcell::after {
	background:
		linear-gradient(90deg, rgba(14, 18, 27, .78) 0%, rgba(14, 18, 27, .35) 60%, rgba(14, 18, 27, .1) 100%),
		linear-gradient(0deg, rgba(14, 18, 27, .55) 0%, rgba(14, 18, 27, 0) 70%);
}
.az-mapcell:hover::before { transform: scale(1.06); }
.az-mapcell:last-child { border-right: 0; }
.az-mapcell.is-live { box-shadow: inset 0 -3px 0 var(--az-accent); }
.az-mapcell.is-live::after { background: linear-gradient(90deg, rgba(26, 12, 18, .9) 0%, rgba(26, 12, 18, .6) 100%); }
.az-mapcell.is-skip::before { filter: grayscale(1) brightness(.6); }
.az-mapcell.is-next::before { filter: saturate(.75) brightness(.85); }
.az-mapcell.is-skip > * { opacity: .6; }
.az-mapcell__name { text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.az-mapcell__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.az-mapcell__name { font-size: 22px; font-weight: 800; }
.az-mapcell__state { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--az-text-3); }
.az-mapcell.is-live .az-mapcell__state { color: var(--az-accent-text); }
.az-mapcell.is-next .az-mapcell__state, .az-mapcell.is-skip .az-mapcell__state { color: var(--az-muted); }
.az-mapcell__score { font-size: 18px; font-weight: 700; color: var(--az-text); margin-top: 6px; }
.az-mapcell__score .is-loss { color: var(--az-muted); }
.az-mapcell__pick { font-size: 11px; color: var(--az-muted); }
.az-mhero__foot { padding: 12px 20px; border-top: 1px solid var(--az-border); }

/* Tabovi */
.az-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.az-tabs__btn {
	min-height: 40px; padding: 0 14px; border-radius: 8px; cursor: pointer;
	font: 600 13px var(--az-font);
	background: var(--az-surface); color: var(--az-text-2); border: 1px solid var(--az-border-strong);
}
.az-tabs__btn:hover { color: #fff; }
.az-tabs__btn[aria-selected="true"] { background: var(--az-text); color: var(--az-bg); border-color: var(--az-text); }
.az-tabs__btn:focus-visible { outline: 2px solid var(--az-info); outline-offset: 2px; }
.az-mstats .az-card__head { flex-wrap: wrap; }

/* Tabela statistike */
.az-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.az-scroll + .az-scroll { border-top: 1px solid var(--az-border); }
.az-sb { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.az-sb th, .az-sb td { padding: 9px 12px; text-align: right; border-bottom: 1px solid #1a2130; white-space: nowrap; }
.az-sb thead th { font-size: 11px; font-weight: 600; color: var(--az-muted); border-bottom-color: var(--az-border); }
.az-sb thead th abbr { text-decoration: none; cursor: help; }
.az-sb th:first-child { text-align: left; }
.az-sb .az-sb__team { font-size: 13px; color: var(--az-text); }
.az-sb .az-sb__team > span { display: inline-flex; align-items: center; gap: 8px; }
.az-sb .az-sb__team .az-logo-box { width: 22px; height: 22px; font-size: 9px; }
.az-sb .az-sb__team .az-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.az-sb tbody th { font-weight: 600; font-size: 14px; }
.az-sb tbody th a { display: inline-flex; align-items: center; gap: 8px; color: var(--az-text); }
.az-sb tbody th a:hover { color: var(--az-accent-text); }
.az-sb td { font-family: var(--az-font-mono); font-variant-numeric: tabular-nums; color: var(--az-text-2); }
.az-sb td.is-pos { color: var(--az-text); font-weight: 700; }
.az-sb td.is-neg { color: var(--az-muted); }
.az-sb tbody tr:last-child > * { border-bottom: 0; }
.az-sb tbody tr:hover { background: rgba(255, 255, 255, .02); }

/* Pregled */
.az-moverview__body { padding: 16px 20px; color: var(--az-text-2); font-size: 15px; line-height: 1.65; max-width: 760px; }
.az-moverview__body p { margin: 0 0 12px; }
.az-moverview__body p:last-child { margin-bottom: 0; }

/* Dueli i forma */
.az-mh2h__sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); text-align: center; padding: 16px; border-bottom: 1px solid var(--az-border); }
.az-mh2h__sum > div { display: flex; flex-direction: column; gap: 2px; }
.az-mh2h__n { font-size: 28px; font-weight: 700; }
.az-mh2h__l { font-size: 12px; color: var(--az-muted); }
.az-mlist { list-style: none; margin: 0; padding: 0; }
.az-mlist li + li { border-top: 1px solid #1a2130; }
.az-mlist__row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 2px 12px; padding: 10px 16px; color: var(--az-text); }
.az-mlist__row:hover { background: var(--az-surface-2); }
.az-mlist__date { font-size: 12px; color: var(--az-muted); grid-row: span 2; padding-top: 2px; }
.az-mlist__teams { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 14px; min-width: 0; flex-wrap: wrap; }
.az-mlist__teams .is-loss { color: var(--az-muted); font-weight: 500; }
.az-mlist__score { font-size: 13px; color: var(--az-text-2); }
.az-mlist__event { font-size: 12px; color: var(--az-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.az-mform__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.az-mform__col + .az-mform__col { border-left: 1px solid var(--az-border); }
.az-mform__team {
	display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px;
	font-size: 15px; font-weight: 700; border-bottom: 1px solid var(--az-border);
}
.az-mform__team > a { color: var(--az-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.az-mform__team .az-logo-box img, .az-mroster__team .az-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.az-mform__dots { margin-left: auto; display: inline-flex; gap: 3px; }
.az-formdot {
	width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center;
	font: 700 10px var(--az-font-mono);
}
.az-formdot--win { background: #238636; color: #fff; }
.az-formdot--loss { background: #b62324; color: #fff; }

/* Strim */
.az-mstream__player {
	aspect-ratio: 16 / 9; background: var(--az-bg-deep); position: relative;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	color: var(--az-muted); font-size: 12px;
}
.az-mstream__player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.az-mstream__play {
	width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--az-accent); color: #fff; display: grid; place-items: center;
	transition: transform .15s ease;
}
.az-mstream__play:hover { transform: scale(1.06); }
.az-mstream__play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.az-mstream__list { padding: 10px 16px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.az-mstream__pick { cursor: pointer; min-height: 28px; }
.az-mstream__pick.is-on { background: var(--az-text); color: var(--az-bg); border-color: var(--az-text); }
.az-mstream__ext { margin-left: auto; font-size: 12px; color: var(--az-text-3); }

/* Veto */
.az-mveto__list { margin: 0; padding: 10px 16px 14px; list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.az-mveto__list li { display: flex; gap: 10px; }
.az-mveto__n { color: var(--az-muted); width: 16px; flex: none; }
.az-mveto__act { font-weight: 600; }
.az-mveto__act--ban { color: #ff8a98; }
.az-mveto__act--pick { color: var(--az-info); }
.az-mveto__act--left { color: var(--az-text-3); }

/* Sastavi */
.az-mroster__team { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px 6px; font-size: 14px; font-weight: 700; }
.az-mroster__list { list-style: none; margin: 0; padding: 0 16px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.az-mroster__list a { display: inline-flex; align-items: center; gap: 6px; color: var(--az-text-2); padding: 3px 0; }
.az-mroster__list a:hover { color: var(--az-accent-text); }

/* Anketa i GSI iz starih modula — uklopi u karticu */
.az-match__poll .hltv-sm-poll { margin: 0; border: 0; background: transparent; }
.az-match__comments .az-comments { margin-top: 0; }

@media (max-width: 1000px) {
	.az-match__grid { grid-template-columns: minmax(0, 1fr); }
	/* Uživo i uskoro: strim odmah ispod rezultata. Završen meč: prvo statistika. */
	.az-match[data-status="live"] .az-match__side,
	.az-match[data-status="upcoming"] .az-match__side { order: -1; }
}
@media (max-width: 700px) {
	.az-mhero__teams { padding: 20px 12px; gap: 10px; }
	.az-mhero__team { flex-direction: column-reverse; gap: 8px; text-align: center; }
	.az-mhero__team--a, .az-mhero__team--b { justify-content: flex-start; }
	.az-mhero__team--b { flex-direction: column; }
	.az-mhero__team--a .az-mhero__tname, .az-mhero__tname { align-items: center; }
	.az-mhero__logo { width: 52px; height: 52px; font-size: 15px; border-radius: 10px; }
	.az-mhero__colon { padding: 0 6px; }
	.az-mhero__top { padding: 10px 12px; }
	.az-mapcell { padding: 10px 12px; }
	.az-mapcell__name { font-size: 16px; }
	.az-mform__cols { grid-template-columns: minmax(0, 1fr); }
	.az-mform__col + .az-mform__col { border-left: 0; border-top: 1px solid var(--az-border); }
}
@media (max-width: 480px) {
	.az-mhero__maps { grid-template-columns: minmax(0, 1fr); }
	.az-mapcell { border-right: 0; border-bottom: 1px solid var(--az-border); display: grid; grid-template-columns: 1fr auto; align-items: center; }
	.az-mapcell:last-child { border-bottom: 0; }
	.az-mapcell__top { display: contents; }
	.az-mapcell__state { grid-column: 2; grid-row: 1; }
	.az-mapcell__score { grid-column: 1; margin: 0; }
	.az-mapcell__pick { grid-column: 2; text-align: right; }
}

/* Igrač meča */
.az-mmvp .az-card__head { justify-content: space-between; }
.az-mmvp__body { display: flex; gap: 20px; padding: 20px; align-items: center; }
.az-mmvp__pic {
	width: 112px; height: 112px; flex: none; border-radius: 14px; overflow: hidden; position: relative;
	display: grid; place-items: center; background: #1c2536;
	border: 2px solid var(--az-gold); box-shadow: 0 0 0 4px rgba(233, 196, 106, .12);
	font: 800 40px/1 var(--az-font-disp); color: var(--az-gold);
}
.az-mmvp__pic img { width: 100%; height: 100%; object-fit: cover; }
.az-mmvp__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.az-mmvp__name { font-size: 34px; font-weight: 800; line-height: 1; color: var(--az-text); overflow-wrap: anywhere; }
.az-mmvp__name:hover { color: var(--az-gold); }
.az-mmvp__team { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--az-text-2); }
.az-mmvp__team .az-logo-box { width: 20px; height: 20px; font-size: 8px; }
.az-mmvp__team .az-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.az-mmvp__team a { color: var(--az-text-2); }
.az-mmvp__team a:hover { color: var(--az-accent-text); }
.az-mmvp__tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 6px 0 0; }
.az-mmvp__tiles > div { background: var(--az-surface-3, #182030); border: 1px solid var(--az-border); border-radius: 8px; padding: 8px 10px; }
.az-mmvp__tiles dt { font-size: 11px; color: var(--az-muted); font-weight: 600; }
.az-mmvp__tiles dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; color: var(--az-text); }
.az-mmvp__other {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 20px;
	border-top: 1px solid var(--az-border); font-size: 13px; color: var(--az-text);
}
.az-mmvp__other:hover { background: var(--az-surface-2); }
.az-mmvp__oname { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.az-mmvp__ostat { margin-left: auto; color: var(--az-text-2); }
@media (max-width: 700px) {
	.az-mmvp__body { flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; }
	.az-mmvp__pic { width: 84px; height: 84px; }
	.az-mmvp__name { font-size: 28px; }
	.az-mmvp__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
}
.az-tag--gold { background: var(--az-gold-border); color: var(--az-gold); border-color: var(--az-gold-border); }

/* Prava slika mape: vidi se kao pozadina, a boja mape (ilustracija ispod) je blago zatamnjuje i boji.
   Tamni preliv (::after) ostaje iznad, da naziv i rezultat budu čitljivi. */
.az-mapphoto {
	position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: var(--az-map-photo, none) center / cover no-repeat;
	opacity: .78; filter: saturate(.9);
	transform: scale(1.02); transition: transform .4s ease;
}
.az-mapcell:hover .az-mapphoto { transform: scale(1.06); }
.az-mapcell.has-photo .az-mapphoto { opacity: .9; }
.az-mapcell.has-photo::after {
	background:
		linear-gradient(90deg, rgba(14, 18, 27, .7) 0%, rgba(14, 18, 27, .25) 55%, rgba(14, 18, 27, 0) 100%),
		linear-gradient(0deg, rgba(14, 18, 27, .45) 0%, rgba(14, 18, 27, 0) 65%);
}
.az-mapcell.is-skip .az-mapphoto { filter: grayscale(1); opacity: .45; }
.az-mapcell.has-photo .az-mapcell__state { padding: 3px 6px; border-radius: 4px; background: rgba(11, 14, 20, .72); color: var(--az-text-2); }
.az-mapcell.has-photo.is-live .az-mapcell__state { background: var(--az-accent); color: #fff; }
.az-mapcell.has-photo .az-mapcell__pick { color: var(--az-text-2); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }

/* Statistika meča (po uzoru na HLTV): ime igrača široko, kolone sa brojevima uske, centrirane i odvojene linijama;
   iste širine u obe tabele; +/− i K/D obojeni. */
.az-mstats .az-scroll + .az-scroll { border-top: 6px solid var(--az-bg); }
.az-mstats .az-sb { table-layout: fixed; min-width: 520px; }
.az-mstats .az-sb th:first-child { width: auto; padding-left: 16px; overflow: hidden; text-overflow: ellipsis; }
.az-mstats .az-sb .az-sb__c { text-align: center; padding-left: 6px; padding-right: 6px; border-left: 1px solid #1a2130; }
.az-mstats .az-sb th.az-sb__c--kd { width: 84px; }
.az-mstats .az-sb th.az-sb__c--diff { width: 68px; }
.az-mstats .az-sb th.az-sb__c--a { width: 52px; }
.az-mstats .az-sb th.az-sb__c--adr { width: 74px; }
.az-mstats .az-sb th.az-sb__c--hs { width: 68px; }
.az-mstats .az-sb th.az-sb__c--ratio { width: 76px; }
.az-mstats .az-sb thead th { background: var(--az-surface-3); padding-top: 11px; padding-bottom: 11px; }
.az-mstats .az-sb thead .az-sb__team { font-size: 15px; font-weight: 700; color: var(--az-text); }
.az-mstats .az-sb thead .az-sb__team .az-logo-box { width: 26px; height: 26px; }
.az-mstats .az-sb tbody th a { max-width: 100%; overflow: hidden; }
.az-mstats .az-sb tbody th a span { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.az-mstats .az-sb td { font-family: var(--az-font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--az-text); }
.az-mstats .az-sb td.is-up { color: #4cc38a; }
.az-mstats .az-sb td.is-down { color: #ff6b7d; }
.az-mstats .az-sb td.az-sb__ratio { font-weight: 700; font-size: 14px; }
@media (max-width: 640px) {
	/* Telefon: samo K–D, ADR i K/D (kao HLTV na mobilnom), bez pomeranja levo-desno */
	.az-mstats .az-sb { min-width: 0; }
	.az-mstats .az-sb .az-sb__c--diff, .az-mstats .az-sb .az-sb__c--a, .az-mstats .az-sb .az-sb__c--hs,
	.az-mstats .az-sb td:nth-child(3), .az-mstats .az-sb td:nth-child(4), .az-mstats .az-sb td.az-sb__hs { display: none; }
	.az-mstats .az-sb th.az-sb__c--kd { width: 64px; }
	.az-mstats .az-sb th.az-sb__c--adr { width: 58px; }
	.az-mstats .az-sb th.az-sb__c--ratio { width: 58px; }
	.az-mstats .az-sb th:first-child { padding-left: 12px; }
}
