@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* This is the new wrapper for the entire game */
.game-wrapper {
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh; /* Use min-height instead of 100vh to allow for the navbar */
  overflow: hidden;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  width: 100%;
  justify-content: center;
}
#titleScreen { display: flex; }

h1.main-title {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(45deg, #e94560, #a9375a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(233,69,96,0.7), 0 0 20px rgba(233,69,96,0.4);
}

.menu-container, .mode-select-menu {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-button {
  width: 220px;
  padding: 15px 20px;
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(45deg,#ff69b4,#ff1493);
  border: none;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255,20,147,0.4);
  transition: all 0.3s ease;
}
.menu-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(255,20,147,0.6);
}

.frame-container {
  display: flex;
  flex-direction: column;
  background-image: url('https://www.transparenttextures.com/patterns/rocky-wall.png');
  background-color: #4a4a4a;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0,0,0,0.5);
  border: 3px solid #333;
  width: auto;
}

.frame-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px 15px 10px;
  border-bottom: 4px solid #3a3a3a;
  min-height: 60px;
}

.frame-middle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 15px 0;
}

.frame-pillar {
  width: 50px;
  height: 280px;
  background-image: url('https://www.transparenttextures.com/patterns/rocky-wall.png');
  background-color: #5a5a5a;
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

.frame-base {
  padding-top: 15px;
  border-top: 4px solid #3a3a3a;
  display: flex;
  justify-content: center;
  gap: 15px;
}

h1#gameTitle {
  font-size: 2rem;
  font-weight: 700;
  color: #e0e0e0;
  text-shadow: 2px 2px 4px #000;
  margin: 0;
}

.score-container, .level-container, .challenge-info {
  background-color: #1a1a2e;
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid #333;
  text-align: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}
.score-container span { color: #e94560; font-weight: 600; font-size: 1.5rem; }
.level-container span { color: #57FFC9; font-weight: 600; font-size: 1.5rem; }

canvas {
  background-color: #0f3460;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.top-button-group {
  display: flex;
  gap: 10px;
}

.top-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  color: #e0e0e0;
}

#leaderboardList {
  background: rgba(0,0,0,0.4);
  padding: 20px;
  border-radius: 15px;
  width: 300px;
  text-align: left;
  box-shadow: 0 0 15px rgba(255,105,180,0.5);
}

@media (max-width: 700px) {
  .frame-pillar { display: none; }
  .frame-container { padding: 10px; }
  .frame-top { flex-wrap: wrap; justify-content: center; gap: 10px; }
}