body {
	background: linear-gradient(90deg, #222B34, #323A45);
	color: #c4cfd8; /* globally set text color */
	font-family: Arial, sans-serif;
	margin: 0;
}

img {
	max-width: 300px;
	height: auto;
	display: block;
	margin: 0 auto 20px;
}

h1 {
	text-align: center;
	color: #c4cfd8;
	font-size: 1.8em;
	margin-bottom: 0.25rem;
}

h2 {
	text-align: center;
	color: #c4cfd8;
	font-size: 1.3em;
	margin-top: 0;
}

h3 {
	text-align: center;
	color: #405063;
	font-family: 'Berlin Sans FB';
	font-weight: 600;
	font-size: 3em;
	margin-top: 0px;
	margin-bottom: 5px;
	line-height: 1;
}

.logo-bg {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 90%;
	max-width: 600px;
	height: auto;
	pointer-events: none; /* optional: allow clicks to pass through */
	z-index: 0;
}

.navbar-menu {
	display: flex;
	list-style: none;
	justify-content: space-around;
	align-items: stretch;
	min-height: 48px;
	max-height: 48px;
	gap: 0;
	padding: 0;
	margin: 0 0;
	background: linear-gradient(90deg, #323A45, #405063);
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	border-radius: 8px;
}


.navbar-item {
	position: relative;
	flex: 1;
	padding: 0 0;
	box-sizing: border-box; /* Ensure padding and border are included in width */
	border-right: 1px solid #222B34; /* Light border for separation */
	/* box-shadow to left and right */
	box-shadow: inset -3px 0 3px rgba(0,0,0,0.2), inset 3px 0 3px rgba(0,0,0,0.2);
	color: #c4cfd8;
	transition: background 0.3s ease, color 0.3s ease-out;
}

.navbar-item::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	border-radius: 3px 3px 0 0;;
	background: rgba(255,255,255, 0.1); /* Light overlay for hover effect */
	opacity: 0;
	transition: opacity 0.25s ease-out;
	z-index: 1; 
	pointer-events: none;
}

.navbar-item:first-child::before {
	border-radius: 8px 3px 0 8px; /* Round top left and bottom left corners */
}

.navbar-item:last-child::before {
	border-radius: 3px 8px 8px 0; /* Round top right and bottom right corners */
}

.navbar-item:hover::before {
	opacity: 1; /* Show overlay on hover */
}

.navbar-item:first-child {
	border-left: none; /* Light border for separation */
	border-top-left-radius: 8px; /* Round top left corner */
	border-bottom-left-radius: 8px; /* Round bottom left corner */
}

.navbar-item:last-child {
	border-right: none; /* Remove border from last item */
	border-top-right-radius: 8px; /* Round top right corner */
	border-bottom-right-radius: 8px; /* Round bottom right corner */
}

.navbar-item a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 0 0;
	color: inherit;
	text-decoration: none;
	font-weight: bold;
	font-size: 1.1em;
	transition: color 1s ease-out;
}

.navbar-item a:hover {
	color: #e0e0e0; /* Lighter color on hover */
}

.gradient-text {
	background: linear-gradient(90deg,#64778b, #485d77);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text; /* For firefox */
	color: transparent; /* Fallback for other browsers */
}

/* Layout styles */

.section-header-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 1;
}

.section-header-title {
	display:flex;
	flex-direction: column;
	max-height: 600px;
	width: 100%;
	overflow: hidden;
	align-self: flex-start;
	z-index: 1;
}

.section-divider-top {
	height: 8px;
	width: 100vw;
	background: #405063;
	box-shadow: 0 4px 9px rgba(0,0,0,0.2), 0 -4px 9px rgba(0,0,0,0.3); /* shadow on top and bottom */
	margin-top: 0;
	z-index: 1;
}

.section-divider-bottom {
	height: 8px;
	width: 100vw;
	background: #405063;
	box-shadow: 0 4px 9px rgba(0,0,0,0.2), 0 -4px 9px rgba(0,0,0,0.3); /* shadow on top and bottom */
	margin-bottom: 0;
	z-index: 1;
}

.depth-border {
	border: 4px solid #222B34;
	box-shadow: inset 0 2px 18px rgba(0, 0, 0, 0.4); /* inner shadow */
	border-radius: 8px; /* optional: smooth corners */
	outline: 4px solid #404F63;
	outline-offset: 1px;
}

.debug-border {
	outline: 2px solid #404F63;
	outline-offset: 1px;
}

.flex-grow {
	flex: 1;
	flex-grow: 1;
}

.flex-container {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: 100%;
	gap: 8px;
	padding: 0;
	background: linear-gradient(90deg, #323A45, #405063);
}

.flex-row {
	display: flex;
	flex: 1;
	flex-direction: row;
	gap: 0;
	padding: 8px;
	padding-top: 0px;
	border-radius: 8px;
}

.col-left, .col-right, .col-center {
	flex: 1; /* Each column takes equal space */
	padding: 0;
	margin: 8px;
}

.col-left {
	padding: 0;
}

.col-right {
	flex-basis: 35%;
	flex-grow: 0;
	padding: 32px;
	padding-left: 0;
	padding-right: 8px;
	padding-bottom: 26px;
}

.leaderboard-info-container {
	display: flex;
	flex: 1;
	align-items:center;
	justify-content: flex-start;
	flex-direction: column;
	padding: 0;
	height: 100%;
	overflow: hidden;
	border-radius: 8px;
}

.leaderboard-info-header {
	flex-basis: 10%;
	flex-shrink: 1;
	flex-grow: 0;
	width: 100%;
}

.leaderboard-info-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex-grow: 1;
	padding: 8px 8px 8px 8px;
}

.leaderboard-info-content p {
	flex: 1;
	margin: 0;
	padding: 0;
	font-size: 1.1em;
	line-height: 1.4;
	color: #c4cfd8;
}

.leaderboard-container {
	margin: 0 auto;
	padding: 8px;
}

.card-caption {
	font-size: 1.5em;
	margin-bottom: 10px;
	text-align: center;
	color: #e0e0e0;
}

.panel-style {
	/* background: linear-gradient(135deg, #405063, #4D5A6A); */
	/* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), inset 0 0 5px rgba(255, 255, 255, 0.4); */
	background: linear-gradient(135deg, #222B34, #405063);
	box-shadow: inset 0 2px 18px rgba(0, 0, 0, 0.4), 0 2px 9px rgba(0,0,0,0.4);;
	border: 2px solid transparent; /* muted steel-blue */
}

.panel-style-dark {
	background: linear-gradient(135deg, #222B34, #323A45);
	box-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
	border: 2px solid transparent; /* muted steel-blue */
}

.tier-diamond {
	border-color: #91b4cc; /* muted steel-blue */
	border-width: 3px;
}

.tier-gold {
	border-color: #d4af37; /* gold */
	border-width: 3px;
}

.tier-silver {
	border-color: #b0b0b0; /* silver */
	border-width: 3px;
}

.tier-bronze {
	border-color: #cd7f32; /* bronze/copper */
	border-width: 3px;
}


/** HEADER ------------------------------------------------------------- */
.logo-header {
	position: relative;
	height: 0; /* Prevents vertical expansion */
}

.header-row {
	display: flex;
	flex-direction: row;
	gap: 12px;
	padding: 0 16px;
	font-weight: bold;
	color: #e0e0e0;;
	font-size: 0.95em;
	margin-bottom: 8px;
}

.header-field {
	flex: 1; /* Default: will be overridden by nth-child rules */
	text-align: left;
}

.header-field:nth-child(1),
.header-field:nth-child(4) {
	flex-grow: 0;
	flex-shrink: 1;
	flex-basis: 10%;
	min-width: 36px;
	max-width: 50px;
}

.header-field:nth-child(2),
.header-field:nth-child(3) {
	flex: 1; /* Each takes half of remaining 90% */
}
/* END HEADER --------------------------------------------------------- **/

/** CARD --------------------------------------------------------------- */
.card-container {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.card-base {
	display: flex;
	flex-direction: row;
	align-items: center; /* Align items vertically in the center */
	gap: 12px;
	padding: 16px;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-base:hover {
	transform: translateY(0px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
	background: linear-gradient(135deg, #435263, #3a4553);
}

.card-compact {
	max-height: 48px;
	overflow: hidden;
	padding-top: 0;
	padding-bottom: 0;
}

/* DATA FIELDS --------------------------------------------------- */
/* Controls the layout of the player data fields within each card. */

.field-base {
	flex: 1; 
	overflow: visible;
	align-items: center;
}

.field-fixed {
	flex-grow: 0;
	flex-shrink: 1;
	flex-basis: 10%;
	min-width: 36px;
	max-width: 50px;
}

.field-base img {
	display: inline-block;
	vertical-align: middle;
	position: relative;
	top: 10px; /* tweak this to center better */
}

.text-left {
	text-align: left !important;
}

.text-right {
	text-align: right !important;
}

.text-center {
	text-align: center !important;
}

.field-value {
	font-size: 1em;
	color: #c4cfd8;
	font-weight: bold;
}

.rating-block {
	display: flex;
	flex-direction: row;
	justify-content: flex-end; /* Align to the right */
	align-items: center;
	gap: 8px;
	white-space: nowrap; /* Prevent line breaks */
}

.change-indicator {
	position: relative;
	display: inline-block;
	width: 2em;
	height: 1.1em;
	overflow: hidden;
	text-align: center;
	vertical-align: middle;
	cursor: default;
}

.change-indicator span {
	display: block;
	width: 100%;
	position: absolute;
	left: 0;
	transition: transform 0.3s ease;
}

.change-arrow {
	top: 0;
	transform: translateY(0%);
}

.change-number {
	top: 0;
	transform: translateY(100%);
}

.card-base:hover .change-indicator .change-arrow {
	transform: translateY(-100%);
}

.card-base:hover .change-indicator .change-number {
	transform: translateY(0%);
}

.card-wrapper {
	display: flex;
	flex-direction: column;
	gap: 0px;
}

/* ELO History Chart Styles */
.graph-box {
	background: linear-gradient(90deg, #222B34, #323A45);
	border: 2px solid transparent; /* Add border to graph box */
	border-top: none;
	border-radius: 0 0 8px 8px; /* Rounded corners at the bottom */
	box-shadow: inset 0 2px 18px rgba(0, 0, 0, 0.4); /* inner shadow */
	transition: max-height 0.4s ease, opacity 04.s ease;
}

.graph-box-open {
	max-height: 500px;
	opacity: 1;
}

.graph-box canvas {
	width: 100%; /* Make canvas responsive */
	margin: 0 auto; /* Center the canvas */
	display: block; /* Ensure it behaves like a block element */
}