/**
 * Tournament Bracket Styles
 * Figma Design: 168:1096 (Кубок Беларуси 2025 • Турнирная сетка)
 */

/* ================================
   CONTAINER
   ================================ */

.container {
	padding: var(--container-padding-y) var(--container-padding-x);
	max-width: var(--container-max-width);
	margin: 0 auto;
}

/* ================================
   Tournament Container
   ================================ */

.tournament-container {
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: var(--container-padding-y) var(--container-padding-x);
}

/* ================================
   Tournament Header
   ================================ */

.tournament-header {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 2.5rem;
	padding: 0rem 0;
}

.tournament-back-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	background: var(--color-white);
	border: 0.0625rem solid var(--gray-200);
	border-radius: 0.5rem;
	color: var(--color-dark-gray);
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.tournament-back-btn:hover {
	background: var(--gray-50);
	border-color: var(--red-700);
	color: var(--red-700);
	transform: translateX(-0.125rem);
}

.tournament-back-btn .back-arrow {
	font-size: 1.25rem;
	font-weight: 600;
}

.tournament-title {
	margin: 0 0 1.25rem 0;
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-dark-gray);
	line-height: 1.2;
	padding-bottom: 0.9375rem;
	border-bottom: 0.1875rem solid var(--red-800);
	display: inline-block;
}

/* ================================
   Bracket Grid Container
   ================================ */

.bracket-grid-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(13, auto);
	gap: 1rem;
	max-width: 87.5rem;
	margin: 0 auto;
	padding: 1.25rem;
	background: var(--color-white);
	border-radius: 0.75rem;
	scrollbar-gutter: stable;
}

/* ================================
   Positioning for Each Round
   ================================ */

/* Финал - ряд 1, центр (колонки 2-3) */
.bracket-final {
	grid-column: 2 / span 2;
	grid-row: 1;
}

/* Соединительная линия - ряд 2 */
.bracket-grid-container > .bracket-item.connector-line:nth-child(2) {
	grid-column: 1 / -1;
	grid-row: 2;
}

/* 1/2 финала - ряд 3 */
.bracket-half-1 { grid-column: 2; grid-row: 3; }
.bracket-half-2 { grid-column: 3; grid-row: 3; }

/* Соединительная линия - ряд 4 */
.bracket-grid-container > .bracket-item.connector-line:nth-child(5) {
	grid-column: 1 / -1;
	grid-row: 4;
}

/* 1/4 финала - ряд 5 */
.bracket-quarter-1 { grid-column: 1; grid-row: 5; }
.bracket-quarter-2 { grid-column: 2; grid-row: 5; }
.bracket-quarter-3 { grid-column: 3; grid-row: 5; }
.bracket-quarter-4 { grid-column: 4; grid-row: 5; }

/* Соединительная линия - ряд 6 */
.bracket-grid-container > .bracket-item.connector-line:nth-child(10) {
	grid-column: 1 / -1;
	grid-row: 6;
}

/* 1/8 финала - ряды 7-8 (8 карточек по 4 в ряду) */
.bracket-eighth-1 { grid-column: 1; grid-row: 7; }
.bracket-eighth-2 { grid-column: 2; grid-row: 7; }
.bracket-eighth-3 { grid-column: 3; grid-row: 7; }
.bracket-eighth-4 { grid-column: 4; grid-row: 7; }
.bracket-eighth-5 { grid-column: 1; grid-row: 8; }
.bracket-eighth-6 { grid-column: 2; grid-row: 8; }
.bracket-eighth-7 { grid-column: 3; grid-row: 8; }
.bracket-eighth-8 { grid-column: 4; grid-row: 8; }

/* Соединительная линия - ряд 9 */
.bracket-grid-container > .bracket-item.connector-line:nth-child(19) {
	grid-column: 1 / -1;
	grid-row: 9;
}

/* 1/16 финала - ряды 10-13 (16 карточек по 4 в ряду) */
.bracket-sixteenth-1  { grid-column: 1; grid-row: 10; }
.bracket-sixteenth-2  { grid-column: 2; grid-row: 10; }
.bracket-sixteenth-3  { grid-column: 3; grid-row: 10; }
.bracket-sixteenth-4  { grid-column: 4; grid-row: 10; }
.bracket-sixteenth-5  { grid-column: 1; grid-row: 11; }
.bracket-sixteenth-6  { grid-column: 2; grid-row: 11; }
.bracket-sixteenth-7  { grid-column: 3; grid-row: 11; }
.bracket-sixteenth-8  { grid-column: 4; grid-row: 11; }
.bracket-sixteenth-9  { grid-column: 1; grid-row: 12; }
.bracket-sixteenth-10 { grid-column: 2; grid-row: 12; }
.bracket-sixteenth-11 { grid-column: 3; grid-row: 12; }
.bracket-sixteenth-12 { grid-column: 4; grid-row: 12; }
.bracket-sixteenth-13 { grid-column: 1; grid-row: 13; }
.bracket-sixteenth-14 { grid-column: 2; grid-row: 13; }
.bracket-sixteenth-15 { grid-column: 3; grid-row: 13; }
.bracket-sixteenth-16 { grid-column: 4; grid-row: 13; }

/* ================================
   Compact Cards for 1/4, 1/2, Final
   ================================ */

/* Компактные карточки для верхних раундов */
.bracket-quarter-1 .bracket-match-card,
.bracket-quarter-2 .bracket-match-card,
.bracket-quarter-3 .bracket-match-card,
.bracket-quarter-4 .bracket-match-card,
.bracket-half-1 .bracket-match-card,
.bracket-half-2 .bracket-match-card,
.bracket-final .bracket-match-card {
	padding: 0.5rem;
	min-width: 15rem;
}

.bracket-quarter-1 .match-datetime,
.bracket-quarter-2 .match-datetime,
.bracket-quarter-3 .match-datetime,
.bracket-quarter-4 .match-datetime,
.bracket-half-1 .match-datetime,
.bracket-half-2 .match-datetime,
.bracket-final .match-datetime {
	font-size: 0.6875rem;
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
}

.bracket-quarter-1 .match-team,
.bracket-quarter-2 .match-team,
.bracket-quarter-3 .match-team,
.bracket-quarter-4 .match-team,
.bracket-half-1 .match-team,
.bracket-half-2 .match-team,
.bracket-final .match-team {
	padding: 0.25rem;
	margin-bottom: 0.1875rem;
}

.bracket-quarter-1 .match-team:last-of-type,
.bracket-quarter-2 .match-team:last-of-type,
.bracket-quarter-3 .match-team:last-of-type,
.bracket-quarter-4 .match-team:last-of-type,
.bracket-half-1 .match-team:last-of-type,
.bracket-half-2 .match-team:last-of-type,
.bracket-final .match-team:last-of-type {
	margin-bottom: 0;
}

.bracket-quarter-1 .team-info,
.bracket-quarter-2 .team-info,
.bracket-quarter-3 .team-info,
.bracket-quarter-4 .team-info,
.bracket-half-1 .team-info,
.bracket-half-2 .team-info,
.bracket-final .team-info {
	gap: 0.3125rem;
}

.bracket-quarter-1 .team-logo,
.bracket-quarter-2 .team-logo,
.bracket-quarter-3 .team-logo,
.bracket-quarter-4 .team-logo,
.bracket-half-1 .team-logo,
.bracket-half-2 .team-logo,
.bracket-final .team-logo {
	width: 1.5rem;
	height: 1.5rem;
	min-width: 1.5rem;
}

.bracket-quarter-1 .team-initials,
.bracket-quarter-2 .team-initials,
.bracket-quarter-3 .team-initials,
.bracket-quarter-4 .team-initials,
.bracket-half-1 .team-initials,
.bracket-half-2 .team-initials,
.bracket-final .team-initials {
	font-size: 0.8125rem;
}

.bracket-quarter-1 .team-name,
.bracket-quarter-2 .team-name,
.bracket-quarter-3 .team-name,
.bracket-quarter-4 .team-name,
.bracket-half-1 .team-name,
.bracket-half-2 .team-name,
.bracket-final .team-name {
	font-size: 0.8125rem;
}

.bracket-quarter-1 .team-score,
.bracket-quarter-2 .team-score,
.bracket-quarter-3 .team-score,
.bracket-quarter-4 .team-score,
.bracket-half-1 .team-score,
.bracket-half-2 .team-score,
.bracket-final .team-score {
	font-size: 1rem;
	min-width: 1.25rem;
	padding: 0.1875rem 0.3125rem;
}

/* ================================
   Connector Lines (Соединительные линии)
   ================================ */

.bracket-item.connector-line {
	height: 0.125rem;
	background: linear-gradient(90deg, 
		transparent 0%, 
		var(--gray-200) 10%, 
		var(--gray-200) 90%, 
		transparent 100%
	);
	position: relative;
	margin: 0.5rem 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 0;
}

.bracket-item.connector-line .round-title {
	background: var(--gray-50);
	padding: 0.5rem 1.5rem;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-dark-gray);
	text-transform: uppercase;
	letter-spacing: 0.0625rem;
	margin: 0;
	position: relative;
	z-index: 1;
}

/* ================================
   Round Headers (Заголовки раундов)
   ================================ */

.bracket-round-header {
	grid-column: 1 / -1;
	text-align: center;
	padding: 1rem 0;
	margin: 0.5rem 0;
}

.round-title {
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-dark-gray);
	text-transform: uppercase;
	letter-spacing: 0.0625rem;
	margin: 0;
}

/* ================================
   Empty Cards (Пустые карточки TBD)
   ================================ */

.empty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 11.25rem;
	padding: 1.25rem;
	background: var(--gray-50);
	border: 0.125rem dashed var(--gray-200);
	border-radius: 0.75rem;
	transition: all 0.3s ease;
}

.empty-card:hover {
	background: var(--gray-100);
	border-color: var(--gray-200);
}

.tbd-text {
	font-size: 1.5rem;
	font-weight: 700;
	color: #ccc;
	letter-spacing: 0.1875rem;
	font-family: 'Exo 2', sans-serif;
}

.tbd-label {
	font-size: 0.8125rem;
	color: var(--gray-700);
	margin-top: 0.5rem;
	text-transform: uppercase;
	font-weight: 500;
	letter-spacing: 0.0625rem;
}

/* ================================
   Match Cards
   ================================ */

/* 1/8 финала - ряды 7-8, 8 матчей (2 ряда по 4) */
.eighth-match:nth-of-type(11) { grid-column: 1; grid-row: 7; }
.eighth-match:nth-of-type(12) { grid-column: 2; grid-row: 7; }
.eighth-match:nth-of-type(13) { grid-column: 3; grid-row: 7; }
.eighth-match:nth-of-type(14) { grid-column: 4; grid-row: 7; }
.eighth-match:nth-of-type(15) { grid-column: 1; grid-row: 8; }
.eighth-match:nth-of-type(16) { grid-column: 2; grid-row: 8; }
.eighth-match:nth-of-type(17) { grid-column: 3; grid-row: 8; }
.eighth-match:nth-of-type(18) { grid-column: 4; grid-row: 8; }

/* Линия под 1/8 - ряд 9 */
.bracket-item.connector-line:nth-of-type(19) {
	grid-column: 1 / span 4;
	grid-row: 9;
	height: 0.125rem;
	background: linear-gradient(90deg, 
		transparent 0%, 
		var(--gray-200) 10%, 
		var(--gray-200) 90%, 
		transparent 100%
	);
}

/* 1/16 финала - ряды 10-13, 16 матчей (4 ряда по 4) */
.sixteenth-match:nth-of-type(20) { grid-column: 1; grid-row: 10; }
.sixteenth-match:nth-of-type(21) { grid-column: 2; grid-row: 10; }
.sixteenth-match:nth-of-type(22) { grid-column: 3; grid-row: 10; }
.sixteenth-match:nth-of-type(23) { grid-column: 4; grid-row: 10; }
.sixteenth-match:nth-of-type(24) { grid-column: 1; grid-row: 11; }
.sixteenth-match:nth-of-type(25) { grid-column: 2; grid-row: 11; }
.sixteenth-match:nth-of-type(26) { grid-column: 3; grid-row: 11; }
.sixteenth-match:nth-of-type(27) { grid-column: 4; grid-row: 11; }
.sixteenth-match:nth-of-type(28) { grid-column: 1; grid-row: 12; }
.sixteenth-match:nth-of-type(29) { grid-column: 2; grid-row: 12; }
.sixteenth-match:nth-of-type(30) { grid-column: 3; grid-row: 12; }
.sixteenth-match:nth-of-type(31) { grid-column: 4; grid-row: 12; }
.sixteenth-match:nth-of-type(32) { grid-column: 1; grid-row: 13; }
.sixteenth-match:nth-of-type(33) { grid-column: 2; grid-row: 13; }
.sixteenth-match:nth-of-type(34) { grid-column: 3; grid-row: 13; }
.sixteenth-match:nth-of-type(35) { grid-column: 4; grid-row: 13; }

/* ================================
   Legacy Containers (Remove)
   ================================ */

.bracket-container {
	display: none;
}

.bracket-rounds-wrapper {
	display: none;
}

.bracket-round {
	display: none;
}

.bracket-round-header {
	display: none;
}

.bracket-round-matches,
.bracket-matches {
	display: none;
}

/* ================================
   Match Cards
   ================================ */

.bracket-match-card {
	background: var(--color-white);
	border-radius: 0.625rem;
	box-shadow: 0 0.125rem 0.5rem #14141414;
	padding: 0.6875rem;
	transition: all 0.3s ease;
	border: 0.0625rem solid var(--gray-200);
	min-width: 17.5rem;
	position: relative;
}

.bracket-match-card:hover {
	box-shadow: 0 0.25rem 1rem var(--shadow-hover);
	transform: translateY(-0.125rem);
	border-color: var(--red-700);
}

/* Match Date/Time */
.match-datetime {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--gray-600);
	margin-bottom: 0.5rem;
	text-align: center;
	padding-bottom: 0.5rem;
	border-bottom: 0.0625rem solid var(--gray-50);
}

/* ================================
   Team Items
   ================================ */

.match-team {
	display: flex;
    flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 0.3125rem;
	border-radius: 0.375rem;
	background: var(--gray-50);
	transition: all 0.2s ease;
	margin-bottom: 0.3125rem;
}

.match-team:last-of-type {
	margin-bottom: 0;
}

.match-team:hover {
	background: var(--gray-50);
}

/* Winner Highlighting */
.match-team.winner {
	background: linear-gradient(135deg, var(--red-100) 0%, var(--red-100) 100%);	
}

.match-team.winner .team-name {
	font-weight: 700;
	color: var(--color-dark-gray);
}

/* Team Info Container */
.team-info {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex: 1;
}

/* Team Logo Circle */
.team-logo {
	position: relative;
	width: 4rem;
	height: 4rem;
	min-width: 4rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 0.125rem 0.375rem var(--color-dark-gray)1a;
	margin-bottom: 0; /* Override main.css margin */
}

.team-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Team Initials */
.team-initials {
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-white);
	text-transform: uppercase;
}

/* Gradient backgrounds for team logos - removed */
.match-team-home .team-logo {
	background: transparent;
}

.match-team-away .team-logo {
	background: transparent;
}

/* Team Name */
.team-name {
	flex: 1;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-dark-gray);
	line-height: 1.3;
	word-break: break-word;
}

/* Team Score */
.team-score {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--color-dark-gray);
	min-width: 1.5rem;
	text-align: center;
	padding: 0.25rem 0.4375rem;
	border-radius: 0.25rem;
	background: var(--gray-50);
	flex-shrink: 0;
}

.match-team.winner .team-score {
	background: linear-gradient(135deg, var(--red-700) 0%, var(--red-800) 100%);
	color: var(--color-white);
	box-shadow: 0 0.125rem 0.375rem var(--red-700)4d;
}

/* ================================
   Connecting Lines
   ================================ */

.match-connector {
	display: none; /* Временно отключены */
}

.bracket-connector {
	position: relative;
	width: 100%;
	height: 0.125rem;
	background: var(--gray-200);
	margin: 1.25rem 0;
}

.bracket-connector::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 0;
	transform: translateX(-50%);
	width: 0.125rem;
	height: 2.5rem;
	background: var(--gray-200);
}

.bracket-connector::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: -2.5rem;
	transform: translateX(-50%);
	width: 0.125rem;
	height: 2.5rem;
	background: var(--gray-200);
}

/* ================================
   Responsive Design
   ================================ */

/* Переход с больших экранов на планшеты - специфические размеры для страницы Турнирной сетки */
@media (max-width: 1200px) {
	.bracket-grid-container {
		gap: 0.3rem;
		padding: 0.4375rem;
		grid-template-columns: repeat(4, 1fr);
	}

	.bracket-match-card {
		padding: 0.3rem;
	}

	.match-datetime {
		font-size: 0.65rem;
		margin-bottom: 0.1875rem;
		padding-bottom: 0.1875rem;
	}

	.match-team {
		padding: 0.125rem;
		margin-bottom: 0.125rem;
		gap: 0.25rem;
	}

	.team-logo {
		width: 1.5rem;
		height: 1.5rem;
		min-width: 1.5rem;
	}

	.team-initials {
		font-size: 0.75rem;
	}

	.team-name {
		font-size: 0.725rem;
	}

	.team-score {
		font-size: 0.9375rem;
		min-width: 1.25rem;
		padding: 0.125rem 0.1875rem;
	}

	/* Компактные карточки верхних раундов */
	.bracket-quarter-1 .bracket-match-card,
	.bracket-quarter-2 .bracket-match-card,
	.bracket-quarter-3 .bracket-match-card,
	.bracket-quarter-4 .bracket-match-card,
	.bracket-half-1 .bracket-match-card,
	.bracket-half-2 .bracket-match-card,
	.bracket-final .bracket-match-card {
		padding: 0.25rem;
		min-width: auto;
	}

	.bracket-quarter-1 .team-logo,
	.bracket-quarter-2 .team-logo,
	.bracket-quarter-3 .team-logo,
	.bracket-quarter-4 .team-logo,
	.bracket-half-1 .team-logo,
	.bracket-half-2 .team-logo,
	.bracket-final .team-logo {
		width: 1.125rem;
		height: 1.125rem;
		min-width: 1.125rem;
	}

	.bracket-quarter-1 .team-name,
	.bracket-quarter-2 .team-name,
	.bracket-quarter-3 .team-name,
	.bracket-quarter-4 .team-name,
	.bracket-half-1 .team-name,
	.bracket-half-2 .team-name,
	.bracket-final .team-name {
		font-size: 0.7rem;
	}

	.bracket-quarter-1 .team-score,
	.bracket-quarter-2 .team-score,
	.bracket-quarter-3 .team-score,
	.bracket-quarter-4 .team-score,
	.bracket-half-1 .team-score,
	.bracket-half-2 .team-score,
	.bracket-final .team-score {
		font-size: 0.8125rem;
		min-width: 1.0625rem;
		padding: 0.125rem 0.125rem;
	}

	.empty-card {
		min-height: 7.5rem;
	}

	.tbd-text {
		font-size: 1.1875rem;
	}

	.tbd-label {
		font-size: 0.6875rem;
	}
/* Tablets and small desktops */
@media (max-width: 1024px) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}

.tournament-title {
	font-size: 1.5rem;
	margin-bottom: 1.25rem;	
}
	
	.tournament-header {
		gap: 1rem;
		margin-bottom: 1.5rem;
		align-items: flex-start;
	}
	
	.bracket-grid-container {
		gap: 0.5rem;
		padding: 0.625rem;
		max-width: 100%;
		grid-template-columns: repeat(4, 1fr);
	}

	.bracket-match-card {
		min-width: auto;
		padding: 0.5rem;
	}

	.match-datetime {
		font-size: 0.75rem;
		margin-bottom: 0.375rem;
		padding-bottom: 0.375rem;
	}

	.match-team {
		gap: 0.375rem;
		padding: 0.25rem;
		margin-bottom: 0.25rem;
	}

	.team-logo {
		width: 1.75rem;
		height: 1.75rem;
		min-width: 1.75rem;
	}

	.team-initials {
		font-size: 0.8125rem;
	}

	.team-name {
		font-size: 0.8125rem;
	}

	.team-score {
		font-size: 1rem;
		min-width: 1.5rem;
		padding: 0.1875rem 0.3125rem;
	}

	/* Компактные карточки верхних раундов */
	.bracket-quarter-1 .bracket-match-card,
	.bracket-quarter-2 .bracket-match-card,
	.bracket-quarter-3 .bracket-match-card,
	.bracket-quarter-4 .bracket-match-card,
	.bracket-half-1 .bracket-match-card,
	.bracket-half-2 .bracket-match-card,
	.bracket-final .bracket-match-card {
		padding: 0.4375rem;
		min-width: auto;
	}

	.bracket-quarter-1 .team-logo,
	.bracket-quarter-2 .team-logo,
	.bracket-quarter-3 .team-logo,
	.bracket-quarter-4 .team-logo,
	.bracket-half-1 .team-logo,
	.bracket-half-2 .team-logo,
	.bracket-final .team-logo {
		width: 1.375rem;
		height: 1.375rem;
		min-width: 1.375rem;
	}

	.bracket-quarter-1 .team-name,
	.bracket-quarter-2 .team-name,
	.bracket-quarter-3 .team-name,
	.bracket-quarter-4 .team-name,
	.bracket-half-1 .team-name,
	.bracket-half-2 .team-name,
	.bracket-final .team-name {
		font-size: 0.75rem;
	}

	.bracket-quarter-1 .team-score,
	.bracket-quarter-2 .team-score,
	.bracket-quarter-3 .team-score,
	.bracket-quarter-4 .team-score,
	.bracket-half-1 .team-score,
	.bracket-half-2 .team-score,
	.bracket-final .team-score {
		font-size: 0.875rem;
		min-width: 1.25rem;
	}

	.empty-card {
		min-height: 8rem;
		padding: 0.875rem;
	}

	.tbd-text {
		font-size: 1.25rem;
	}

	.tbd-label {
		font-size: 0.75rem;
	}
}

/* Tablets */
@media (max-width: 768px) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}

	.tournament-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		margin-bottom: 1rem;
		padding: 0;
	}

	.tournament-back-btn {
		padding: 0.375rem 0.625rem;
		font-size: 0.8125rem;
		gap: 0.25rem;
	}
	
	.tournament-title {
		font-size: 1.25rem;
		margin: 0;
		padding-bottom: 0.5rem;
		border-bottom-width: 0.125rem;
	}
	
	.bracket-grid-container {
		grid-template-columns: 1fr;
		gap: 0.375rem;
		padding: 0.5rem;
		max-width: 100%;
	}

	.bracket-match-card {
		min-width: auto;
		padding: 0.375rem;
	}

	.match-datetime {
		font-size: 0.625rem;
		margin-bottom: 0.25rem;
		padding-bottom: 0.25rem;
	}

	.match-team {
		gap: 0.3rem;
		padding: 0.1875rem;
		margin-bottom: 0.1875rem;
	}

	.team-logo {
		width: 1.5rem;
		height: 1.5rem;
		min-width: 1.5rem;
	}

	.team-initials {
		font-size: 0.6875rem;
	}

	.team-name {
		font-size: 0.75rem;
	}

	.team-score {
		font-size: 0.875rem;
		min-width: 1.25rem;
		padding: 0.125rem 0.25rem;
	}

	/* Компактные карточки верхних раундов */
	.bracket-quarter-1 .bracket-match-card,
	.bracket-quarter-2 .bracket-match-card,
	.bracket-quarter-3 .bracket-match-card,
	.bracket-quarter-4 .bracket-match-card,
	.bracket-half-1 .bracket-match-card,
	.bracket-half-2 .bracket-match-card,
	.bracket-final .bracket-match-card {
		padding: 0.3125rem;
		min-width: auto;
	}

	.bracket-quarter-1 .match-datetime,
	.bracket-quarter-2 .match-datetime,
	.bracket-quarter-3 .match-datetime,
	.bracket-quarter-4 .match-datetime,
	.bracket-half-1 .match-datetime,
	.bracket-half-2 .match-datetime,
	.bracket-final .match-datetime {
		font-size: 0.625rem;
		margin-bottom: 0.1875rem;
		padding-bottom: 0.1875rem;
	}

	.bracket-quarter-1 .team-logo,
	.bracket-quarter-2 .team-logo,
	.bracket-quarter-3 .team-logo,
	.bracket-quarter-4 .team-logo,
	.bracket-half-1 .team-logo,
	.bracket-half-2 .team-logo,
	.bracket-final .team-logo {
		width: 1.25rem;
		height: 1.25rem;
		min-width: 1.25rem;
	}

	.bracket-quarter-1 .team-name,
	.bracket-quarter-2 .team-name,
	.bracket-quarter-3 .team-name,
	.bracket-quarter-4 .team-name,
	.bracket-half-1 .team-name,
	.bracket-half-2 .team-name,
	.bracket-final .team-name {
		font-size: 0.7rem;
	}

	.bracket-quarter-1 .team-score,
	.bracket-quarter-2 .team-score,
	.bracket-quarter-3 .team-score,
	.bracket-quarter-4 .team-score,
	.bracket-half-1 .team-score,
	.bracket-half-2 .team-score,
	.bracket-final .team-score {
		font-size: 0.8125rem;
		min-width: 1.125rem;
		padding: 0.125rem 0.1875rem;
	}

	.bracket-quarter-1 .match-team,
	.bracket-quarter-2 .match-team,
	.bracket-quarter-3 .match-team,
	.bracket-quarter-4 .match-team,
	.bracket-half-1 .match-team,
	.bracket-half-2 .match-team,
	.bracket-final .match-team {
		padding: 0.125rem;
		margin-bottom: 0.125rem;
		gap: 0.25rem;
	}

	.empty-card {
		min-height: 6.5rem;
		padding: 0.625rem;
	}

	.tbd-text {
		font-size: 1.125rem;
		letter-spacing: 0.0625rem;
	}

	.tbd-label {
		font-size: 0.625rem;
		margin-top: 0.25rem;
	}

	/* Скрыть соединительные линии на планшетах */
	.bracket-item.connector-line {
		display: none;
	}
}

/* Mobile devices */
@media (max-width: 30rem) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}

	.tournament-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
		margin-bottom: 1.25rem;
		padding: 0;
	}

	.tournament-back-btn {
		padding: 0.5rem 0.75rem;
		font-size: 0.875rem;
		gap: 0.375rem;
	}
	
	.tournament-title {
		font-size: 1.25rem;
		margin: 0;
		padding-bottom: 0.75rem;
	}
	
	.bracket-grid-container {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		gap: 0.625rem;
		padding: 0.75rem;
		max-width: 100%;
	}

	/* Все элементы в одну колонку на мобильных */
	.bracket-final,
	.bracket-half-1,
	.bracket-half-2,
	.bracket-quarter-1,
	.bracket-quarter-2,
	.bracket-quarter-3,
	.bracket-quarter-4,
	.bracket-eighth-1,
	.bracket-eighth-2,
	.bracket-eighth-3,
	.bracket-eighth-4,
	.bracket-eighth-5,
	.bracket-eighth-6,
	.bracket-eighth-7,
	.bracket-eighth-8,
	.bracket-sixteenth-1,
	.bracket-sixteenth-2,
	.bracket-sixteenth-3,
	.bracket-sixteenth-4,
	.bracket-sixteenth-5,
	.bracket-sixteenth-6,
	.bracket-sixteenth-7,
	.bracket-sixteenth-8,
	.bracket-sixteenth-9,
	.bracket-sixteenth-10,
	.bracket-sixteenth-11,
	.bracket-sixteenth-12,
	.bracket-sixteenth-13,
	.bracket-sixteenth-14,
	.bracket-sixteenth-15,
	.bracket-sixteenth-16 {
		grid-column: 1 !important;
		grid-row: auto !important;
	}

	.bracket-match-card {
		min-width: auto;
		padding: 0.75rem;
	}

	.match-datetime {
		font-size: 0.75rem;
		margin-bottom: 0.375rem;
		padding-bottom: 0.375rem;
	}

	.match-team {
		gap: 0.5rem;
		padding: 0.25rem;
		margin-bottom: 0.25rem;
	}

	.team-logo {
		width: 2.25rem;
		height: 2.25rem;
		min-width: 2.25rem;
	}

	.team-initials {
		font-size: 0.75rem;
	}

	.team-name {
		font-size: 0.8125rem;
	}

	.team-score {
		font-size: 1rem;
		min-width: 1.75rem;
		padding: 0.25rem 0.375rem;
	}

	.tbd-text {
		font-size: 1.375rem;
	}

	.tbd-label {
		font-size: 0.6875rem;
	}

	/* Скрыть соединительные линии на мобилке */
	.bracket-item.connector-line {
		display: none;
	}

	/* Компактные карточки для мобильных */
	.bracket-quarter-1 .bracket-match-card,
	.bracket-quarter-2 .bracket-match-card,
	.bracket-quarter-3 .bracket-match-card,
	.bracket-quarter-4 .bracket-match-card,
	.bracket-half-1 .bracket-match-card,
	.bracket-half-2 .bracket-match-card,
	.bracket-final .bracket-match-card {
		padding: 0.625rem;
		min-width: auto;
	}

	.bracket-quarter-1 .team-logo,
	.bracket-quarter-2 .team-logo,
	.bracket-quarter-3 .team-logo,
	.bracket-quarter-4 .team-logo,
	.bracket-half-1 .team-logo,
	.bracket-half-2 .team-logo,
	.bracket-final .team-logo {
		width: 1.875rem;
		height: 1.875rem;
		min-width: 1.875rem;
	}

	.bracket-quarter-1 .team-name,
	.bracket-quarter-2 .team-name,
	.bracket-quarter-3 .team-name,
	.bracket-quarter-4 .team-name,
	.bracket-half-1 .team-name,
	.bracket-half-2 .team-name,
	.bracket-final .team-name {
		font-size: 0.75rem;
	}

	.bracket-quarter-1 .team-score,
	.bracket-quarter-2 .team-score,
	.bracket-quarter-3 .team-score,
	.bracket-quarter-4 .team-score,
	.bracket-half-1 .team-score,
	.bracket-half-2 .team-score,
	.bracket-final .team-score {
		font-size: 0.9375rem;
		min-width: 1.5rem;
	}
}
/* ================================
   Team Logo Images (Изображения логотипов команд)
   ================================ */

.bracket-match-card .team-logo-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}








