﻿*,
*::before,
*::after {
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
	margin: 0;
	z-index: 1;
}

ul {
	list-style: none;
}

li {
	text-align: left;
}

#completeBuddy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* keep buddy near bottom of container */
  height: 100vh; /* full screen height */
  width: 100%;
  z-index: 1;
  background: url('Images/background.png') no-repeat center center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.buddyHead {
  position: absolute;
  top: 47.2%; /* adjust this so the head lines up */
  left: 49.7%;
  transform: translateX(-50%);
  z-index: 2;
  transition: transform 0.3s ease; /* smooth tilts later */
}

.buddyHead img {
  height: auto; /* adjust to fit your body */
  max-width: 260px;
  pointer-events: auto;
}

.tilted {
  transform: rotate(7deg);
}

@keyframes bounce {
  0%   { transform: translateY(0); }
  30%  { transform: translateY(-20px); }
  60%  { transform: translateY(0); }
  80%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

.bounce {
  animation: bounce 0.6s ease;
}

.buddyBody {
  position: absolute;
  bottom: 10%; /* raise/lower body */
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.buddyBody img {
  height: auto;
  width: 300px;
  pointer-events: auto;
}

#buddyChatBox {
	display: none;
	max-width: 400px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
	bottom: 50%;
	right: 60%;
	font-size: 20px;
	color: #4c7527;
}

.chatForm {
	display: flex;
	flex-direction: column;
	position: absolute;
	z-index: 2;
	bottom: 300px;
	right: 70%;
}

#userChat input {
	width: 400px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
}

#userChat input:focus {
	transform: scale(1.02);
}

#submitChat {
	display: inline-block;
	background-color: #C5D475;
	border: 1px solid #4c7527;
	padding: 5px 10px;
	font-size: 25px;
	white-space: nowrap;
	color: #4c7527;
	border-radius: 10px;
	margin-top: 50px;
}

#submitChat:hover {
	background-color: #4c7527;
	color: white;
}

.games {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
	max-width: 600px;
	margin: 20px auto;
	position: absolute;
	z-index: 3;
	bottom: 10%;
	left: 55%;
}

.games img {
	height: 150px;
	cursor: pointer;
}

.modal {
  display: none;          
  position: fixed;         
  top: 0; left: 0;         
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 100;  
  
  /* centering the box inside it */
  align-items: center;   
  justify-content: center;
}

.modal-content {
	background:  #C5D374;
	border: 3px solid #335616;
	padding: 40px;
	position: relative;
	text-align: center;
    box-shadow: 0px 10px 20px rgba(0,0,0,0.4);
    animation: popIn 0.4s ease;
    border-radius: 8px;
}

@keyframes popIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content h2,
.modal-content h1 {
	font-family: Playfair Display, serif;
	font-size: 26px;
	margin-bottom: 60px;
	color: #e283b8;
	letter-spacing: 1.7px;
	text-shadow: 0px 3px 15px rgba(226, 131, 184, 1);
}

#fallingflowers_gameArea {
    background-image: url('Images/background.png');
    background-position: center;
    border: 2px solid #4c7527;
    border-radius: 12px;
    width: 500px;
    height: 600px;
    margin: auto;
    position: relative;
    overflow: hidden;
}

#forestcleanup_gameArea {
    background-image: url('Images/forestcleanup_background.png');
    background-position: center;
    border: 2px solid #4c7527;
    border-radius: 12px;
    width: 800px;
    height: 650px;
    margin: auto;
    position: relative;
    overflow: hidden;
}


#closeModal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #e283b8;
}

#score, 
#misses,
#cleanup_score,
#cleanup_misses {
	top: 0;
	text-align: left;
	margin-left: 10px;
	color: #E283B8;
	font-family: Playfair Display, serif;
	font-size: 26px;
	font-weight: 600;
}

#muteBtn {
	display: inline-block;
	margin-right: 85%;
	font-size: 26px;
}

#gameBuddy {
  position: absolute;    /* ⬅️ anchor Buddy inside gameArea */
  bottom: 15%;           /* vertical position */
  left: 50%;             /* starting centered */
  transform: translateX(-50%);
}

#gameBuddy img {
  height: 120px;
}

.game-over {
  display: none; /* hidden until game ends */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff7f7;
  border: 2px solid #e283b8;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.game-over h3 {
  font-family: Playfair Display, serif;
  font-size: 28px;
  color: #e283b8;
  margin-bottom: 10px;
}

.game-over button {
  font-family: Playfair Display, serif;
  font-size: 20px;
  padding: 10px 20px;
  background: #e283b8;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.game-over button:hover {
  background: #c4699a;
}

.game-over {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.game-over.fade-in {
  opacity: 1;
}

#playBackgroundMusic {
	position: fixed;
	right: 20px;
	bottom: 80px;
	font-size: 28px;
	padding: 8px;
	border-radius: 20px;
	background-color: #C5D374;
}

.devlog {
  position: fixed;
  right: 20px;       /* Distance from the right edge */
  bottom: 20px;      /* Or use `top` if you want it higher up */
  background-color: #C5D374;
  padding: 10px 16px;
  border: 2px solid #335616;
  border-radius: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 10;
  color: #335616;
  text-decoration: none;
}

#devContent {
	border: 2px solid #4c7527;
    border-radius: 12px;
    width: 500px;
    height: 600px;
    margin: auto;
    position: relative;
    overflow-y: scroll;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
}

#releaseDate {
	font-size: 24px;
	font-family: Playfair Display, serif;
}

.devList {
	font-size: 20px;
	font-family: Playfair Display, serif;
}


@media (max-width:375px) {

.buddyHead {
	top: 64%; 
}

#buddyChatBox {
	display: none;
	max-width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
	bottom: 90%;
	right: 10%;
	font-size: 20px;
	color: #4c7527;
}

.chatForm {
	display: flex;
	flex-direction: column;
	position: absolute;
	z-index: 2;
	bottom: 70%;
	right: 30%;
	max-width: 300px;
}

#userChat input {
	width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
}

#gameArea {
    width: 350px;
    height: 400px;
}

.modal-content {
	padding: 20px;
	max-height: 600px;
}

.games {
	display: flex;
	flex-direction: column;
	gap: 10px;
	bottom: 10%;
	left: -2%;
}

.games img {
	height: 75px;
}

.buddyHead img {
	max-width: 150px;
}

.buddyBody img {
	max-width: 150px;
}
	
}

@media (min-width: 376px) and (max-width: 425px) {

.buddyHead {
	top: 64%; 
}

#buddyChatBox {
	display: none;
	max-width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
	bottom: 90%;
	right: 10%;
	font-size: 20px;
	color: #4c7527;
}

.chatForm {
	display: flex;
	flex-direction: column;
	position: absolute;
	z-index: 2;
	bottom: 70%;
	right: 30%;
	max-width: 300px;
}

#userChat input {
	width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
}

#gameArea {
    width: 350px;
    height: 400px;
}

.modal-content {
	padding: 20px;
	max-height: 600px;
}

.games {
	display: flex;
	flex-direction: column;
	gap: 10px;
	bottom: 10%;
	left: -2%;
}

.games img {
	height: 75px;
}

.buddyHead img {
	max-width: 150px;
}

.buddyBody img {
	max-width: 150px;
}


}


@media (min-width: 426px) and (max-width: 768px) {

.buddyHead {
	top: 64%; 
}

#buddyChatBox {
	display: none;
	max-width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
	bottom: 90%;
	right: 10%;
	font-size: 20px;
	color: #4c7527;
}

.chatForm {
	display: flex;
	flex-direction: column;
	position: absolute;
	z-index: 2;
	bottom: 70%;
	right: 30%;
	max-width: 300px;
}

#userChat input {
	width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
}

#gameArea {
    width: 350px;
    height: 400px;
}

.modal-content {
	padding: 20px;
	max-height: 600px;
}

.games {
	display: flex;
	flex-direction: column;
	gap: 10px;
	bottom: 10%;
	left: -2%;
}

.games img {
	height: 75px;
}

.buddyHead img {
	max-width: 150px;
}

.buddyBody img {
	max-width: 150px;
}


}


@media (min-width: 769px) and (max-width: 1024px) {

.buddyHead {
	top: 64%; 
}

#buddyChatBox {
	display: none;
	max-width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
	bottom: 90%;
	right: 10%;
	font-size: 20px;
	color: #4c7527;
}

.chatForm {
	display: flex;
	flex-direction: column;
	position: absolute;
	z-index: 2;
	bottom: 70%;
	right: 30%;
	max-width: 300px;
}

#userChat input {
	width: 300px;
	height: auto;
	padding: 10px;
	background: rgba(196, 211, 116, 0.8);
	border: 1px solid #4C7527;
	position: absolute;
	z-index: 2;
	border-radius: 12px;
}

#gameArea {
    width: 350px;
    height: 400px;
}

.modal-content {
	padding: 20px;
	max-height: 600px;
}

.games {
	display: flex;
	flex-direction: column;
	gap: 10px;
	bottom: 10%;
	left: -2%;
}

.games img {
	height: 75px;
}

.buddyHead img {
	max-width: 150px;
}

.buddyBody img {
	max-width: 150px;
}


}

@media (min-width: 1025px) {
.buddyHead {
	top: 45%; 
}
	
}