.startgame-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100000; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
border-radius: 5px;
}

/* Modal Content Box */
.startgame-modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 2px auto; /* 15% from the top and centered in the page */
  padding: 4px;
  border: 1px solid #888;
  font-size: 10px;
  width: 80%; /* Could be more or less, depending on screen size */
  text-align: center; /* Center-aligns text and button */
  border-radius: 5px;
}

/* The Close Button */
.startgame-close-button {
  color: #aaaaaa;
  float: right;
  font-size: 14px;
  font-weight: bold;
}

.startgame-close-button:hover,
.startgame-close-button:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.startgame-button {
  margin-top: 4px; /* Space above the button */
  padding: 2px 4px; /* Button padding */
  font-size: 12px; /* Font size for the button */
  background-color: salmon;
  border-radius: 5px;
}

.happy-button {
    background-color: #fa8072; /* Salmon color */
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	animation: glow 2s infinite;
	transition: transform 0.2s, box-shadow 0.2s;
}

/* Animation for glowing effect */
@keyframes glow {
  0% {
    box-shadow: 0 0 10px rgba(250, 128, 114, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(250, 128, 114, 0.8), 0 0 40px rgba(250, 128, 114, 0.5);
  }
  100% {
    box-shadow: 0 0 10px rgba(250, 128, 114, 0.5);
  }
}

.multiplur-mute-button {
  position: absolute;
  z-index: 30000;
  font-size: 24px; /* Adjust size as needed */
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

.multiplur-lb-button {
  position: absolute;
  z-index: 30000;
  font-size: 16px; /* Adjust size as needed */
  cursor: pointer;
  border: none;
  background: rgba(51, 51, 170, .1);
  color: #fff;
  border: 1px solid rgba(51, 51, 170, .6);
  text-decoration: none;
  border-radius: 5px;
  outline: none;
}

.multiplur-tip {
  position: fixed;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 5px;
  background-color: rgba(250, 128, 114, 0.8);
  color: white;
  display: none;
  z-index: 100000;
}

.multiplur-lb-modal {
  display: none; 
  position: fixed; 
  z-index: 30000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.4); 
}

.multiplur-lb-modal-content {
  background-color: #fefefe;
  margin: 15% auto; 
  padding: 8px;
  border: 1px solid #888;
  width: 95%;
  max-width: 500px;
  border-radius: 10px;
}

.multiplur-lb-leaderboard {
  background: linear-gradient(135deg, #f06, #f90);
  color: #fff;
  padding: 6px;
  border-radius: 10px;
  text-align: center;
}

.multiplur-lb-leaderboard h2 {
  margin-bottom: 10px;
}

.multiplur-lb-leaderboard ol {
  padding-left: 0;
  list-style-type: none;
}

.multiplur-lb-leaderboard li {
  font-size: 16px;
  margin: 10px 0;
  padding: 10px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.2);
}

.multiplur-lb-leaderboard li img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  border-radius: 50%;
}

.multiplur-lb-leaderboard .gamer-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.multiplur-lb-leaderboard .gamer-name {
  text-align: left;
}

.multiplur-lb-leaderboard .gamer-points {
  text-align: right;
  width: 80px;
}

/* Special coloring for top 3 */
.multiplur-lb-leaderboard li:first-child {
  background-color: gold;
  color: black;
}

.multiplur-lb-leaderboard li:nth-child(2) {
  background-color: silver;
  color: black;
}

.multiplur-lb-leaderboard li:nth-child(3) {
  background-color: #cd7f32; /* Bronze */
  color: black;
}

.multiplur-lb-close-btn {
  background-color: #f06;
  color: white;
  border: none;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1em;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.multiplur-lb-close-btn:hover {
  background-color: #d04;
}

.multiplur-iframe-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8); /* Dark background with transparency */
}

.multiplur-iframe-modal-content {
  position: relative;
  margin: auto;
  padding: 0;
  width: 90%;
  height: 90%;
  max-height: 90vh;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.multiplur-iframe-close-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  color: white;
  background-color: #f44336; /* Red color for emphasis */
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  z-index: 2;
  transition: background-color 0.3s;
}

.multiplur-iframe-close-btn:hover {
  background-color: #d32f2f;
}

.multiplur-iframe-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.dpad-button-container {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  z-index: 10000;
}

.dpad-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #333;
  color: white;
  font-size: 30px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
}

.dpad-up-button-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
}

.dpad-button:active {
  background-color: #555;
}


.wait-progress-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.wait-progress-modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.wait-progress-modal-content p {
  font-size: 18px;
}

.gen-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* Style for modal content */
.gen-modal-content {
  background-color: #fff;
  padding: 20px;
  max-width: 600px;
  width: 80%;
  text-align: center;
  font-size: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Style for buttons */
.gen-modal-button {
  margin: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.gen-button1 {
  background-color: #4CAF50;
  color: white;
}
.gen-button2 {
  background-color: #f44336;
  color: white;
}

/* The main overlay, which dims the background */
.gameloop-iframe-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  /* Use Flexbox to position the content at the bottom-center */
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

/* This container is now TRANSPARENT and holds the iframe */
.gameloop-iframe-modal-content {
  /* Remove the white background and shadow */
  background-color: transparent;
  box-shadow: none;
  
  /* Define the size of the comment section popup */
  width: 100%;
  max-width: 600px; /* Adjust max width as needed */
  height: 75vh;     /* Adjust height as needed */
  max-height: 600px;
  
  /* Remove default margins and padding */
  margin: 0;
  padding: 0;
  position: relative;
}
/* Ensure the iframe fills the transparent container */
.gameloop-iframe-iframe {
    width: 100%;
    height: 100%;
    border: none;
    /* The page inside the iframe should have its own background and rounded corners */
}

.gameloop-iframe-close-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  color: white;
  background-color: #f44336; /* Red color for emphasis */
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  z-index: 2;
  transition: background-color 0.3s;
}

.gameloop-iframe-close-btn:hover {
  background-color: #d32f2f;
}

.gameloop-iframe-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
}

.social-popup {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 10%;
  width: 80%;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 10px;
  display: flex;
  align-items: center;
  animation: fadeOut 5s forwards;
}

.social-popup img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
}

.social-popup .game-icon {
  width: 50px;
  height: 50px;
  margin-left: auto;
}

.social-popup-content {
  flex: 1;
}

.social-popup-content a {
  color: #007bff;
  text-decoration: none;
  margin-left: 10px;
}

.social-popup-content a:hover {
  text-decoration: underline;
}

.social-popup .close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  background-color: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes fadeOut {
  0%, 90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.profile_thumb {
  width: 24px;
}

.icon-text-container {
  display: flex; /* Use flexbox for alignment */
  align-items: center; /* Vertically center items */
  height: 24px; /* Match the icon height */
}

.icon-text-container img {
  width: 24px;
  height: 24px;
  margin-right: 8px; /* Add spacing between icon and text */
  border-radius: 4px;
}

.icon-text-container span {
  font-size: 14px; /* Adjust font size as needed */
  line-height: 1; /* Avoid extra spacing in text */
}

.startgameprog-modal {
  display: none;
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.startgameprog-modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  position: relative;
}

.startgameprog-progress-bar-container {
  width: 100%;
  background: #ddd;
  border-radius: 5px;
  overflow: hidden;
  margin-top: 10px;
}

.startgameprog-progress-bar {
  height: 10px;
  width: 0%;
  background: #007bff;
  transition: width 0.1s linear;
}

.startgameprog-close-btn {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background: red;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.wizard-button {
  background: rgba(128, 0, 128, 0.7); 
  background: linear-gradient(135deg, rgba(128, 0, 128, 0.7), rgba(75, 0, 130, 0.7)); 
  color: white;
  padding: 2px 4px;
  border: none;
  border-radius: 6px;
  font-size: 8px;
  cursor: pointer;
  margin-left: 4px;
  box-shadow: 0 0 10px rgba(128, 0, 255, 0.8), 0 0 20px rgba(128, 0, 255, 0.6);
  transition: all 0.3s ease;
}


.leaderboard {
  width: 400px;
  font-family: Arial, sans-serif;
  border-collapse: collapse;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.leaderboard th {
  background: #ff5e3a;
  color: white;
  padding: 10px;
  font-size: 14px;
}

.leaderboard td {
  padding: 8px;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.leaderboard tr:nth-child(even) {
  background: #f2f2f2;
}

.leaderboard tr:hover {
  background: #e8ecef;
}

.lb-player-pic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}

.lb-player-name {
  display: flex;
  align-items: center;
}

.lb-score {
  color: #e74c3c;
  font-weight: bold;
}

.lb-time {
  color: #7f8c8d;
}

.ingame-chatbox {
  position: fixed;
  top: 10px;
  left: 2px;
  width: 60px;
  max-width: 64px;
  background: rgba(0, 0, 0, 0.0);
  color: gray;
  padding: 5px;
  font-size: 8px;
  border-radius: 5px;
  overflow: hidden;
  z-index: 100000;
}

.ingame-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 45px;
  overflow: hidden;
}

.ingame-message {
  opacity: 0.8;
  padding: 2px 0;
  word-wrap: break-word;
}

.ingame-input-box {
  width: 95%;
  background: transparent;
  border: solid 1px gray;
  outline: none;
  color: gray;
  font-size: 8px;
  height: 8px;
  padding: 2px;
}

.nextbtn-container {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  text-align: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity 1s ease-out;
}

.fade-text {
  font-size: 12px;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

.fade-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fade-button span {
  color: white;
  font-size: 30px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.threejs-arrow-dpad {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 100px;
  height: 100px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 2px;
  opacity: 0.7;
  z-index: 10;
}
.threejs-arrow-dpad-btn {
  background: #444;
  border-radius: 8px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  user-select: none;
  touch-action: none;
}
.threejs-arrow-dpad-btn:active {
  background: #888;
}

.threejs-joystick {
  position: absolute;
  bottom: 30px;
  left: 30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  touch-action: none;
  user-select: none;
}

.threejs-joystick-knob {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  position: absolute;
  top: 40px;
  left: 40px;
  touch-action: none;
  user-select: none;
}

.gl-health-meter {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-family: sans-serif;
  background: rgba(0,0,0,0.4);
  padding: 2px;
  border-radius: 4px;
}

.gl-health-meter-healthbar {
  width: 100px;
  height: 10px;
  background: #222;
  border: 1px solid #555;
  position: relative;
  border-radius: 4px;
}

.gl-health-meter-healthbar > div {
  height: 100%;
  background: #0f0;
  width: 100%;      
}    
