/* ESTILOS GENERALES */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: 'Hammersmith One', sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* MENÚ PRINCIPAL */
#mainMenu {
  background: rgba(0,0,0,0.7);
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 100;
}

#menuBackground {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #6C8E68;
  z-index: -1;
}

.menu-resource {
  position: absolute;
  width: 60px;
  height: 60px;
  z-index: 1;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.5));
}

.menu-resource img {
  width: 100%;
  height: 100%;
}

#menuContainer {
  width: 100%;
  text-align: center;
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 2;
}

#gameName {
  font-size: 170px;
  color: white;
  text-shadow:
    0 1px 0 #ccc,
    0 2px 0 #ccc,
    0 3px 0 #ccc,
    0 4px 0 #ccc,
    0 5px 0 #ccc;
  margin-bottom: -20px;
}

/* TARJETAS DEL MENÚ */
.menuCard {
  display: inline-block;
  width: 300px;
  background: white;
  padding: 20px;
  margin: 10px;
  border-radius: 4px;
  box-shadow: 0 7px 0 #c4c4c4;
  vertical-align: top;
  text-align: left;
}

.menuHeader {
  font-size: 24px;
  color: #292929;
  margin-bottom: 10px;
}

.menuText {
  font-size: 18px;
  color: #a8a8a8;
  margin-bottom: 15px;
}

/* BOTONES */
.menuButton {
  background: #7ee559;
  color: white;
  font-size: 23px;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
}

.menuButton:hover {
  background: #6fc94e;
}

#nameInput {
  width: 94%;
  padding: 10px;
  font-size: 23px;
  margin-bottom: 15px;
  border: none;
  background: #eee;
  border-radius: 4px;
  text-align: center;
}

/* Grids del menú */
.menu-grid-line {
  position: absolute;
  background-color: rgba(0,0,0,0.2);
  z-index: 0;
}

.menu-grid-line.horizontal {
  width: 100%;
  height: 1px;
}

.menu-grid-line.vertical {
  height: 100%;
  width: 1px;
}

/* FOOTER */
#linksContainer1, #linksContainer2 {
  position: absolute;
  bottom: 0;
  padding: 10px;
  background: white;
  font-size: 20px;
  z-index: 3;
}

#linksContainer1 {
  left: 0;
  border-radius: 0 4px 0 0;
}

#linksContainer2 {
  right: 0;
  border-radius: 4px 0 0 0;
}

.menuLink {
  color: #a56dc8;
  text-decoration: none;
}

.menuLink:hover {
  color: #795094;
}

#goldDisplay {
  position: absolute;
  bottom: 205px;
  right: 20px;
}

#actionBar {
  position: absolute;
  bottom: 17px;
  width: 100%;
  text-align: center;
}

.actionBarItem {
  width: 66px;
  height: 66px;
  margin-left: 10px;
  margin-right: 10px;
  background-color: rgba(0, 0, 0, 0.25);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  display: inline-block;
  cursor: pointer;
  pointer-events: all;
  position: relative;
}

.actionBarItem:hover {
  background-color: rgba(50, 50, 50, 0.25);
}

.actionBarItem.selected {
  background-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.actionBarItem.selected:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
}

.itemIcon {
  width: 66px;
  height: 66px;
}

#itemInfoHolder {
  max-width: 250px;
  display: none;
  position: absolute;
  top: 20px;
  left: 20px;
}

#itemInfoName {
  font-size: 30px;
}

#itemInfoDesc {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.6);
}

#loadingText {
  font-size: 30px;
  color: white;
  margin-top: 20px;
  opacity: 1;
  animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Modal para changelog */
.modal {
  display: none;
  position: fixed;
  z-index: 200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border-radius: 5px;
  width: 60%;
  max-width: 700px;
  max-height: 500px;
  overflow-y: auto;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-button:hover {
  color: black;
}

/* Estilos para barra de salud del jugador */
.health-bar {
  position: absolute;
  height: 10px;
  background-color: #4CAF50;
  border-radius: 5px;
  box-shadow: 0 3px 5px rgba(0,0,0,0.3);
  border: 2px solid white;
}

.health-bar-bg {
  position: absolute;
  height: 10px;
  background-color: #ddd;
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  border: 2px solid white;
}

#leaderboard {
  color: #fff;
  font-size: 31px;
  text-align: left;
  position: absolute;
  right: 20px;
  top: 20px;
  padding: 10px;
  padding-top: 7px;
  padding-bottom: 5px;
  width: 220px;
  background-color: rgba(0, 0, 0, 0.25);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}

.leaderHolder {
  overflow: hidden;
  white-space: nowrap;
}

.leaderScore {
  text-align: right;
  float: right;
  margin-left: 10px;
  display: inline-block;
  font-size: 22px;
}

.leaderboardItem {
  float: left;
  display: inline-block;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  font-size: 22px;
}

/* Chat input styling */
#chatContainer {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
  padding: 10px;
  z-index: 20;
}

#chatInput {
  width: 100%;
  background-color: transparent;
  border: none;
  outline: none;
  color: white;
  font-family: 'Hammersmith One', sans-serif;
  font-size: 20px;
  opacity: 0.7;
}

#chatInput::placeholder {
  color: rgba(255, 255, 255, 0.5);
}