:root {
  --text-color: #E0E0E0;
}

html{
  cursor: url('cursor_x.png') 16 16, auto;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  font-family: 'Courier New', Courier, monospace;
}

/* ESTRUTURA DE CAMADAS */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#main-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 10;
}

#ui-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  padding: 10px 15px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 5px;
  pointer-events: none;
  color: var(--text-color);
  opacity: 0;
  transition: opacity 0.5s;
}

.modal {
  z-index: 100;
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ESTILOS GERAIS */
#main-menu h1 {
  font-size: 5em;
  text-shadow: 0 0 15px rgba(52, 152, 219, 0.7);
  margin-bottom: 40px;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.menu-button,
.modal-button {
  background-color: rgba(44, 62, 80, 0.8);
  border: 2px solid #7f8c8d;
  color: var(--text-color);
  padding: 15px 30px;
  font-size: 1.2em;
  font-family: 'Courier New', Courier, monospace;
  cursor: pointer;
  border-radius: 8px;
  min-width: 250px;
  transition: all 0.2s ease-in-out;
}

.menu-button:hover,
.modal-button:hover {
  background-color: #3498db;
  border-color: #ecf0f1;
  transform: scale(1.05);
}

.hidden {
  display: none !important;
}

#ui-container.visible {
  opacity: 1;
}

#ui-container p {
  margin: 0;
  padding: 5px 0;
  font-size: 1.1em;
  font-weight: bold;
}

.modal-content {
  background-color: #2c3e50;
  padding: 25px;
  border: 1px solid #7f8c8d;
  width: 90%;
  max-width: 650px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  color: var(--text-color);
  text-align: center;
  animation: fadeIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.close-button {
  color: #aaa;
  align-self: flex-end;
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus {
  color: #fff;
  text-decoration: none;
}

.modal-content h2 {
  margin-top: 0;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
  width: 100%;
}

#achievements-summary,
#skins-unlock-info {
  margin-top: 5px;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: bold;
  color: #bdc3c7;
}

#achievements-list {
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

#achievements-list::-webkit-scrollbar {
  width: 8px;
}

#achievements-list::-webkit-scrollbar-track {
  background: #34495e;
  border-radius: 4px;
}

#achievements-list::-webkit-scrollbar-thumb {
  background-color: #3498db;
  border-radius: 4px;
}

.achievement-item {
  padding: 8px;
  margin-bottom: 0;
  border-radius: 5px;
  transition: all 0.2s ease-in-out;
  border-left: 5px solid transparent;
  text-align: center;
  font-size: 12px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-locked {
  background-color: #34495e;
  color: #7f8c8d;
  border-left-color: #7f8c8d;
}

.achievement-unlocked {
  background-color: #16a085;
  color: #ecf0f1;
  font-weight: bold;
  border-left-color: #1abc9c;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.achievement-unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content .menu-buttons {
  margin-top: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 15px;
  text-align: left;
  margin-top: 20px;
}

.info-key {
  background-color: #34495e;
  padding: 8px 12px;
  border-radius: 5px;
  font-weight: bold;
  justify-self: end;
}

.info-desc {
  display: flex;
  align-items: center;
  color: #bdc3c7;
}

.volume-slider-group {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 15px;
  align-items: center;
  padding: 10px 0;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #34495e;
  border-radius: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #3498db;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid #2c3e50;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #3498db;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid #2c3e50;
}

/* ESTILOS PARA A GRADE DE SKINS */
#skins-grid {
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.skin-item {
  background-color: #34495e;
  border: 3px solid transparent;
  border-radius: 8px;
  aspect-ratio: 3 / 4;
  /* Proporção 30x40 */
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-size: cover;
  background-position: center;
}

.skin-item.locked {
  filter: grayscale(1) brightness(0.5);
  cursor: not-allowed;
}

.skin-item.selected {
  border-color: #f1c40f;
  box-shadow: 0 0 15px #f1c40f;
}

.skin-item:not(.locked):hover {
  transform: scale(1.1);
}