/* Base Styling */
html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	width: 100%;
	overflow: hidden;
}

/* Start Screen Background */
body {
	font-family: "Comic Sans MS", sans-serif;
	background-image: url('../../../images/generated/front_2.png');
	background-repeat: no-repeat;
	background-position: center center;
	background-size: 100% 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* Game Background */
body.bg-game {
	background: url('../../../images/generated/background_1.png') no-repeat center center/contain;
	background-color: #000;
	background-size: 100% 100%;
}

/* Start Screen Setup */
.start-screen {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	height: 100vh;
	width: 100%;
}

/* Play Button */
.play-btn {
	margin: 30px auto 0 auto;
	background: none;
	border: none;
	cursor: pointer;
}
.play-btn img {
	width: 200px;
	height: auto;
	transition: transform 0.3s;
}
.play-btn img:hover {
	transform: scale(1.1);
}

/* Black Transition Screen */
.black-overlay {
	position: fixed;
	top: 0;
	left: -100vw;
	width: 100vw;
	height: 100vh;
	background: #000;
	z-index: 100;
	transition: left 1.2s cubic-bezier(0.77,0,0.175,1), opacity 1.2s ease;
	pointer-events: none;
	opacity: 1;
}
.black-overlay.active {
	left:0;
	opacity:1;
}
.black-overlay.fade-out {
	opacity:0;
}

/* Music Selection Popup */
.popup {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}
.popup-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}
.button-row {
	display: flex;
	justify-content: space-between;
	width: 100%;
	margin-top: 20px;
}
.popup-bg {
	display: block;
	width: 400px;
	border-radius: 12px;
}
.popup-btn {
	position: absolute;
	cursor: pointer;
	width: 140px;
}
#yes-btn-img {
	bottom: 50px;
	left: 46px;
	transition: transform 0.3s;
}
#no-btn-img {
	bottom: 50px;
	right: 47px;
	transition: transform 0.3s;
}
#yes-btn-img:hover {
	transform: scale(1.04);
}
#no-btn-img:hover {
	transform: scale(1.04);
}
#music-popup {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s ease;
}
#music-popup.active {
	opacity: 1;
	pointer-events: auto;
}
#music-popup.fade-out {
	opacity: 0;
	transition: opacity 0.4s ease;
}

/* Start Screen Transition */
body.fade-start #main-content {
	opacity: 0;
	pointer-events: none;
}
body.fade-visible #main-content {
	opacity: 1;
	pointer-events: auto;
	transition: opacity 1.5s ease;
}
#music-popup.active {
	opacity:1;
	pointer-events:auto;
}
#music-popup.fade-out {
	opacity:0;
	transition: opacity 0.4s ease;
}

/* Base Image Container */
.image-container {
	position: relative;
	display: inline-block;
	max-width: 400px;
}
.image-container img {
	width: 100%;
	display: block;
	border-radius: 8px;
}

/* Text Overlay Inside Image Container */
.text-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: black;
	font-size: 24px;
	font-family: Arial, sans-serif;
	text-align: center;
}
.text-overlay ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

/* Make Pizza Popup */
.make-pizza-btn {
	position: absolute;
	bottom: 24px;
	right: 24px;
	transform: none;
	background: #ededed;
	border: 2px solid #000000;
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 0.95rem;
	font-family: "Comic Sans MS", cursive;
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s;
	min-width: 80px;
	min-height: 32px;
}
.make-pizza-btn:hover {
	background: #caa279;
}
#pizza-popup {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
#pizza-popup.popup-visible {
	opacity: 1;
	pointer-events: auto;
	align-items: center;
}
#pizza-popup .popup-content {
	position: relative;
	width: 1800px;
	max-width: 100vw;
	max-height: 99vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translateY(100vh) scale(0.98);
	opacity: 0;
	transition:transform 0.5s cubic-bezier(0.4,0,0.2,1),opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}
#pizza-popup.popup-visible .popup-content {
	transform: translateY(0) scale(1);
	opacity: 1;
}
#pizza-popup .popup-bg {
	z-index: 1;
	width: 100%;
	height: auto;
	max-height: 97vh;
	object-fit: contain;
}

/* Receipt Overlay */
#receipt-overlay {
	position: absolute;
	top: 15px;
	left: 1000px;
	z-index: 200;
}
.hidden-on-start {
	display: none !important;
}
.popup-receipt {
	position: absolute;
	top: 18px;
	left: 50%;
	transform: translate(-50%, 0);
	z-index: 30;
	width: 120px;
	display: flex;
	flex-direction: column;
	align-items: center;
	pointer-events: none;
}
#popup-receipt-img {
	width: 100%;
	height: auto;
	display: block;
}
.popup-receipt-ingredients {
	position: absolute;
	top: 80px;
	left: 0;
	width: 100%;
	text-align: center;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#popup-receipt-ingredients-list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.68rem;
	color: #222;
	font-family: "Comic Sans MS", cursive;
	font-weight: bold;
	width: 80%;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}
.popup-receipt-ingredients2 {
	position: absolute;
	top: 80px;
	left: 0;
	width: 100%;
	text-align: left;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#popup-receipt-ingredients-list2 {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1.2rem;
	color: #222;
	font-family: "Comic Sans MS", cursive;
	font-weight: bold;
	width: 80%;
	margin-left: -80px;
	margin-right: auto;
	text-align: left;
	margin-top: 40px;
}

/* Pizza Overlay */
.hidden-on-start {
	display: none !important;
}
.pizza-overlay {
	position: absolute;
	top: 60%;
	left: 37%;
	transform: translate(-50%, 0);
	z-index: 30;
	width: 200px;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}
#pizza-overlay-img {
	width: 100%;
	height: auto;
	display: block;
}
.pizza-overlay-ingredients {
	position: absolute;
	top: 75px;
	left: 0;
	width: 100%;
	text-align: center;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#pizza-overlay-ingredients-list {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.68rem;
	color: #222;
	font-family: Arial, sans-serif;
	font-weight: bold;
	width: 80%;
	margin-left: auto;
	margin-right: auto;
	text-align: left;
}

/* Pizza Popup Elements */
#pizza-popup .popup-bg {
	position: relative;
	z-index: 10;
}
#pizza-popup .make-pizza-btn {
	display: none !important;
}
#pizza-popup .popup-button {
	position: absolute;
	bottom: 5px;
	width: 250px;
	height: 170px;
	cursor: pointer;
	z-index: 20;
	transition: transform 0.3s;
}
#pizza-popup .popup-button:hover {
	transform: scale(1.04);
}




/* TESTING */

#ingredient-buttons {
    position: absolute;
    bottom: 250px;
    left: 150%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5000;
    pointer-events: auto;
}

/* Player Stats Container */
.player-stats {
	position: fixed;
	left: 20px;
	top: 10%;
	transform: translateY(-50%);
	z-index: 999999;
	color: #fff;
	background: rgba(0, 0, 0, 0.4);
	padding: 5px 20px;
	border-radius: 10px;
}
.player-stats h1 {
	color: #fff;
	margin: 0;
}

.ingredient-btn {
    font-family: "Comic Sans MS", sans-serif;
    font-size: 0.9rem;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 2px solid #000;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s;
}

.ingredient-btn:hover {
    transform: scale(1.1);
}

#pizza-popup .popup-bg {
    z-index: 1; /* ✅ now behind buttons */
}



#score-panel {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    border: 3px solid #000;
    z-index: 10000;
    font-family: "Comic Sans MS", sans-serif;
    text-align: center;
    min-width: 250px;
}
#score-panel ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}
#score-panel li {
    margin: 5px 0;
}
#score-panel h3 {
    margin-top: 15px;
}
#score-panel button {
    margin-top: 10px;
    padding: 6px 14px;
    cursor: pointer;
    background: #f4e3c1;
    border: 2px solid #000;
    border-radius: 6px;
    font-family: "Comic Sans MS", sans-serif;
}
#score-panel button:hover {
    background: #e0c089;
}
.hidden-on-start {display:none !important;}
