@import url('https://fonts.googleapis.com/css2?family=Jersey+10&family=Pixelify+Sans:wght@400..700&display=swap');

:root {
	--black: #0D0000;
	--brown: #a52a2a;
	--red: #ff0000;
	--white: #F2F2F2;
	--yellow: #ffff00;
	--dark-brown: #5c3317;
	--font-primary: 'Jersey 10', sans-serif;
}

body, html {
	align-items: center;
	background-color: #333;
	display: flex;
	flex-direction: column;
	font-family: var(--font-primary);
	gap: 20px;
	height: auto;
	image-rendering: pixelated;
	justify-content: center;
	margin: 0;
	max-width: 100%;
	overflow: hidden;
	padding: 20px;
	width: auto;
}

a {
	text-decoration: none;
}

h1 {
	color: red;
	font-size: 128px;
	margin: 0;
}

/* Screen Styles */

.screen {
	align-items: center;
	display: none;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
}

.screen.active {
	display: flex;
}

#gameScreen {

}

/* Button Styles */

.btn {
	background-color: var(--red);
	border: 4px solid var(--yellow);
	box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
	color: var(--yellow);
	cursor: pointer;
	font-family: var(--font-primary);
	font-size: 42px;
	margin-bottom: 10px;
	padding: 15px 20px;
	text-align: center;
	text-shadow: 2px 2px 0px var(--black);
	text-transform: uppercase;
	transition: all 0.1s;
	width: 100%;
}

.btn:hover {
	background-color: var(--yellow);
	box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.6);
	color: var(--red);
	transform: translate(-2px, -2px);
}

/* Title Styles */

.gameTitle {
	color: var(--red);
	margin-bottom: 50px;
	text-align: center;
	text-shadow: 4px 4px 0px var(--yellow);
}

.screenTitle {
	color: var(--yellow);
	font-size: 64px;
	margin-bottom: 30px;
	text-align: center;
	text-shadow: 4px 4px 0px var(--red);
}

/* Layout Styles */

.menu {
	display: flex;
	flex-direction: column;
	gap: 15px;
	max-width: 90%;
	width: 350px;
}

.credits {
	align-items: center;
	bottom: 40px;
	display: flex;
	flex-direction: row;

	gap: 30px;
	position: fixed;
	right: 100px;
	z-index: 1000;

}

.credits img {
	display: block;
	height: auto;
	width: 50px;
}

.creditsTopLeft {
	align-items: center;
	display: flex;
	flex-direction: row;
	gap: 30px;

	left: 100px;
	position: fixed;
	top: 40px;
	z-index: 1000;

}

.creditsTopLeft img {
	display: block;
	height: auto;
	width: 50px;
}

.panel {
	align-items: stretch;
	display: flex;
	flex-direction: row;
	gap: 100px;
	justify-content: center;
	margin-bottom: 40px;
	max-width: 90%;
	padding: 20px;
	width: auto;
}

.level {
	border: 4px solid var(--yellow);
	box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	gap: 15px;
	height: auto;
	margin: 0px;
	padding: 40px;
	width: auto;
}

.settings {
	border: 4px solid var(--yellow);
	box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding: 40px;
}

.statsPanel p {
	color: var(--yellow);
	display: flex;
	font-size: 36px;
	justify-content: space-between;
	margin: 10px 0;
	width: 250px;
}

.stat-val {
	color: var(--yellow);
}

.flex-row-gap {
	display: flex;
	gap: 15px;
	max-width: 90%;
	width: auto;
}

.flex-row-gap .btn {
	margin-bottom: 0; /* Margin im Flex-Container entfernen */
}

.overlay-dark {
	align-items: center;
	backdrop-filter: blur(5px);
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	display: none;

	flex-direction: column;
	height: 100%;


	justify-content: center;
	left: 0;
	position: absolute;
	top: 0;

	width: 100%;

	z-index: 10;
}

.overlay-dark-small {
	align-items: center;
	backdrop-filter: blur(5px);
	background-color: rgba(0, 0, 0, 0.7);
	border-radius: 10px; /* Optional: Falls deine Karten abgerundete Ecken haben */
	display: flex;

	flex-direction: column;
	height: 100%; /* Volle Höhe des Players */
	justify-content: center;

	/* Um optional Text oder ein Schloss-Icon mittig anzuzeigen */
	left: 0;
	position: absolute;
	top: 0;
	width: 100%; /* Volle Breite des Players */
	z-index: 10;
}

/*HUD Styles*/
/* --- 8-BIT HUD TOP PANEL STYLES (FLEX VERSION) --- */

.hud-top-panel-flex {
	/* Wir nutzen jetzt Flexbox */
	align-items: center; /* Vertikale Zentrierung */
	background-color: var(--brown);
	/* justify-content ist hier eigentlich egal, da die Kinder flex: 1 haben */

	/* Positionierung ganz oben (gleich wie vorher) */
	border-bottom: 4px solid #7c5e35;
	box-shadow: 0px 4px 0px rgba(0, 0, 0, 0.4);
	color: var(--white);
	display: flex;
	font-family: var(--font-primary);

	/* 8-Bit Panel Look (gleich wie vorher) */
	font-size: 42px;
	left: 0;
	position: absolute;

	/* Typografie Basis (gleich wie vorher) */
	text-transform: uppercase;
	top: 0;
	white-space: nowrap;
	width: 100%;
	/* Verhindert, dass die Zeit/XP umbrechen, wenn es eng wird */
	z-index: 100;
}

/* --- Die Magie der perfekten Zentrierung --- */

/* Alle 3 Sektionen bekommen exakt den gleichen Platzanteil */
.hud-section {
	display: flex; /* Damit wir den Inhalt darin ausrichten können */
	flex: 1;
}

/* Inhalte in den Sektionen ausrichten */
.section-left {
	justify-content: center;
}

.section-center {
	justify-content: center;
}

.section-right {
	justify-content: center
}

/* --- Styling der eigentlichen Inhalte (fast gleich wie vorher) --- */

.hud-title {
	color: var(--yellow);
	font-size: 42px;
	text-shadow: 2px 2px 0px #000;
}

.hud-xp {
	color: var(--yellow);
}

.hud-time {
	color: var(--yellow);
}

.hud-item span {
	color: var(--white);
}

progress {
	height: 20px;
	width: 200px;
}

#hudHealthProgress {
	accent-color: var(--yellow);
}

#hudXpProgress {
	accent-color: blue;
}

/* Ende HUD Styles */

/* Player Select Styles */
.slideSelect {
	align-items: center;
	display: flex;
	gap: 50px;
	justify-content: center;
	width: 100%;
}

.slideSelect-item {
	align-items: center;
	display: none;
	flex-direction: column;
	gap: 10px;
	position: relative;
}

.slideImage {
	align-items: center;
	display: flex;
	height: 400px;
	margin-top: 50px;
	object-fit: contain;
	width: auto;
}

/* Ende HUD Styles */

.lvlUpImg {
	display: grid;
	/* Beide Elemente in die erste Zeile und erste Spalte zwingen */
	grid-template-areas: "stack";
	place-items: center; /* Zentriert horizontal und vertikal */
	width: fit-content; /* Passt sich der Größe des SVGs an */
}

.lvlUpImg > * {
	grid-area: stack; /* Beide Elemente belegen denselben Platz */
}

.playerName {
	color: var(--yellow);
	font-size: 48px;
	margin: 10px 0;
	padding-top: 20px;
	text-align: center;
	text-shadow: 4px 4px 0px var(--red);
	text-transform: uppercase;
}

#playerSelectScreen {
	gap: 30px;
}

.slideBtn {
	background-color: var(--red);
	border: 4px solid var(--yellow);
	box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
	color: var(--yellow);
	cursor: pointer;
	font-family: var(--font-primary);
	font-size: 42px;
	margin-bottom: 10px;
	margin-top: 70px;
	padding: 15px 20px;
	text-align: center;
	text-shadow: 2px 2px 0px var(--black);
	text-transform: uppercase;
	transition: all 0.1s;
	width: 100%;
}

.slideBtn:hover {
	background-color: var(--yellow);
	box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.6);
	color: var(--red);
	transform: translate(-2px, -2px);
}

.lvlUpImg img {
	height: 60%;
	width: 60%;
	z-index: 10;
}

/* Stats Panel */
.playerStats {
	align-content: center;
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 50px;
	justify-content: center;
}

.playerStats p {
	color: red;
	font-size: 28px;
	margin: 0;
}

.playerEquipments {
	align-items: center;
	display: flex;
	flex-direction: row;
	gap: 50px;
	justify-content: center;
}

.playerStatsImg {
	align-items: center;
	display: flex;
	height: auto;
	margin-top: 50px;
	object-fit: contain;
	width: 30%;
}

.playerStatsEqui {
	display: flex;
	flex-direction: column;
	gap: 50px;
}

.playerStatsEquiLeft {
	display: flex;
	flex-direction: column;
}

.playerStatsEquiRight {
	display: flex;
	flex-direction: column;
}

.playerStatsEquiRight p {
	text-align: right;
}

.playerWeapons {
	display: flex;
	flex-direction: row;
	gap: 50px;
}

.weaponsSection {
	align-items: center;
	border: 4px solid var(--yellow);
	box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	font-size: 32px;
	gap: 15px;
	height: auto;
	justify-content: center;
	margin: 0px;
	padding: 40px;
	text-align: center;
	width: auto;
}

/* Stats Screen Enhancement */
.stats-grid {
	background-color: rgba(0, 0, 0, 0.3);
	border: 4px solid var(--yellow);
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(3, 1fr);
	padding: 30px;
}

.stats-card {
	align-items: center;
	background-color: var(--brown);
	border: 4px solid var(--dark-brown);
	display: flex;
	flex-direction: column;
	min-width: 150px;
	padding: 15px;
	text-align: center;
}

.stats-icon-container {
	align-items: center;
	display: flex;
	height: 60px;
	justify-content: center;
	margin-bottom: 10px;
	width: 60px;
}

.stats-icon-container img {
	max-height: 100%;
	max-width: 100%;
}

.stats-info {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.stats-label {
	color: var(--white);
	font-size: 24px;
	text-transform: uppercase;
}

.stats-card .stat-val {
	color: var(--yellow);
	font-size: 36px;
	text-shadow: 2px 2px 0px var(--black);
}

.win-border {
	border-color: var(--yellow);
	grid-column: span 1;
}

.loss-border {
	border-color: var(--red);
	grid-column: span 1;
}

.highlight-yellow {
	color: var(--yellow) !important;
}

.highlight-red {
	color: var(--red) !important;
}



