* {
  margin: 0;
  padding: 0;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

#main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: rgb(155, 184, 155);
  transition: background-color 0.3s ease;
}

#panel {
  overflow: hidden;
  width: 90%;
  max-width: 1200px;
  height: 85%;
  border-radius: 10px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

#ptop {
  padding: 0 5%;
  display: flex;
  flex-wrap: wrap; /* allows wrapping on small screens */
  align-items: center;
  justify-content: space-between;
  color: #fff;
  width: 100%;
  min-height: 80px;
  background-color: rgb(72, 104, 72);
  transition: background-color 0.3s ease;
}

.elem {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 5px 0;
}

.elem h2 {
  font-weight: 500;
  font-size: 18px;
}

.box {
  color: rgb(18, 119, 57);
  font-weight: 600;
  font-size: 20px;
  padding: 6px 12px;
  background: #fff;
  border-radius: 5px;
}

#controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px;
  flex-wrap: wrap;
}

#controls button {
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  background-color: rgb(72, 104, 72);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#controls button:hover {
  background-color: rgb(50, 75, 50);
}

#pbtm {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px;
  flex-wrap: wrap;
  padding: 5px;
  width: 100%;
  flex: 1; /* take remaining height */
  overflow-y: auto;
}

.bubble {
  width: 40px;
  height: 40px;
  background-color: rgb(72, 104, 72);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.bubble:hover {
  background-color: rgb(50, 75, 50);
  cursor: pointer;
  transform: scale(1.1);
}

h1 {
  color: rgb(72, 104, 72);
  font-weight: 900;
  font-size: 60px;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 🌙 Dark Theme */
body.dark-theme {
  background-color: #121212;
  color: #fff;
}

body.dark-theme #panel {
  background-color: #2a2a2a;
  color: #fff;
}

body.dark-theme #ptop {
  background-color: #333;
}

body.dark-theme .box {
  background-color: #444;
  color: #fff;
}

body.dark-theme #controls button {
  background-color: #444;
}

body.dark-theme #controls button:hover {
  background-color: #666;
}

body.dark-theme .bubble {
  background-color: #555;
}

body.dark-theme .bubble:hover {
  background-color: #777;
}

/* 📱 Mobile Responsiveness */
@media (max-width: 768px) {
  #ptop {
    flex-direction: column;
    padding: 10px;
    height: auto;
  }

  .elem {
    justify-content: space-between;
    width: 100%;
  }

  .elem h2 {
    font-size: 16px;
  }

  .box {
    font-size: 18px;
    padding: 5px 10px;
  }

  .bubble {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  h1 {
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  #panel {
    width: 95%;
    height: 90%;
  }

  #controls button {
    flex: 1;
    min-width: 120px;
  }

  .bubble {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  h1 {
    font-size: 30px;
  }
}
/* Modal overlay */
.modal {
  display: none; /* hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal box */
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  max-width: 90%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

.modal-content h2 {
  margin-bottom: 10px;
  font-size: 20px;
  color: rgb(72, 104, 72);
}

.modal-content ul {
  list-style: disc;
  padding-left: 20px;
  font-size: 14px;
}

/* Small fade-in animation */
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}
