:root {
  --primary: #d4b192;
  --secondary: #2c3e50;
  --glow-color: #7a6048;
  --border-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Times New Roman', serif;
  padding: 20px;
  margin-top: 60px; /* Espaço para o header fixo */
  background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
  min-height: 100vh;
}
h1 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.4rem;
  color: #2c3e50;
  font-size: 2.0em;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px #2c3e50;
}
h2 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.2rem;
  color: #c7a178;
  font-size: 1.8em;
  margin-top: 20px;
}
h3 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.0rem;
  color: #c7a178; /* Pantone semelhante */
  font-size: 1.6em;
  margin-top: 20px;
  text-shadow: 1px 1px 2px #2c3e50;
}
h4 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.0rem;
  color: #b58c61; /* Pantone mais forte */
  margin-top: 18px;
  text-shadow: 1px 1px 2px #2c3e50;
}

h5 {
  text-align: center;
  margin: 15px 0;
  color: #d2b28c; /* Pantone mais suave */
  font-size: 0.9em;
  margin-top: 8px;
  text-shadow: 1px 1px 2px #2c3e50;
}

/* ========== NOVO HEADER ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  z-index: 1000;
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--primary);
}
.menu {
  display: none; /* Esconde completamente */
  position: absolute;
  top: -1500px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 350px;
  background: rgba(44, 62, 80, 0.98);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px #d4b192;
  padding: 15px 0;
  opacity: 0;
}
.menu-item {
  background: var(--secondary);
  border-radius: var(--border-radius);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary);
  font-size: 0.95em;
  padding: 0 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.menu-icon {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  transition: transform 0.3s;
}

.menu-item:hover {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: 0 3px 8px rgba(122, 96, 72, 0.4);
}

.menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
  background: radial-gradient(circle at center, 
             rgba(212, 177, 146, 0.2) 0%, 
             transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-item:hover::before {
  opacity: 1;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transition: 0.3s;
}

.menu-icon.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-icon.active span:nth-child(2) {
  opacity: 0;
}

.menu-icon.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.menu.active {
  display: block; /* Mostra quando ativo */
  top: 65px;
  opacity: 1;
}

.menu ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 15px;
  list-style: none;
  max-height: 80vh; /* Melhor ajuste para telas menores */
  overflow-y: auto; /* Scroll apenas quando necessário */
}

/* Ajustes responsivos */
@media (max-width: 768px) {
.menu-item {
    height: 25px; /* Reduz altura */
    font-size: 0.8em; /* Fonte menor */
    padding: 0 6px; /* Padding reduzido */
}
}

@media (max-width: 480px) {
  .runa {
      width: 30px;   /* Ajuste para tamanho legível */
      height: 40px;
      font-size: 1.5em;
  }
}

/* Contêiner principal */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-grow: 1;
}

/* Tabuleiro Ouija - Estilo Místico */
#game-board {
  display: grid;
  grid-template-columns: repeat(9, 2fr);
  gap: 5px;
  position: relative;
  background: linear-gradient(135deg, #282c34, #2c3e50);
  border-radius: 10px;
  padding: 10px;
  max-width: 800px;
  margin: 10px auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: quantum-glow 3s infinite;
  transform: translateZ(0);
}

/* Moldura decorativa com ASCII */
#game-board::before {
  content: "╔═══════════════════════════╗";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9em;
  color: #d4b192;
}

#game-board::after {
  content: "╚═══════════════════════════╝";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9em;
  color: #d4b192;
}

/* Células do tabuleiro */
.board-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2c3e50, #d4b192);
  color: #d4b192;
  font-size: 1.0em;
  font-weight: bold;
  width: 40px;
  height: 40px;
  border-radius: 10%;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(255, 255, 255, 0.1);
  border: 2px solid #2c3e50;
}

.board-cell:hover {
  transform: scale(1.2);
  background: #d4b192;
  color: #2c3e50;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.6), inset 0 5px 10px rgba(255, 255, 255, 0.3);
}

/* Letras selecionadas */
.selected {
  background: #2c3e50;
  color: #fff;
  border: 3px solid #d4b192;
  box-shadow: inset 0 5px 15px rgba(255, 255, 255, 0.5);
}

/* Texto decorativo */
#current-word-display {
  font-size: 1.2em;
  font-weight: bold;
  color: linear-gradient(135deg, #2c3e50, #282c34);
  margin: 25px 1;
  text-shadow: 01 2px 4px linear-gradient(135deg, #2c3e50, #d4b192);
  letter-spacing: 0.2em;
}

#score-display {
  background: linear-gradient(135deg, #2c3e50, #d4b192);
  color: #d4b192;
  font-family: 'Times New Roman', serif;
  font-size: 1.2em;
  padding: 5px 10px;
  border: 1px solid #2c3e50;
  border-radius: 0px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 5px 10px linear-gradient(135deg, #2c3e50, #d4b192);
}

/* Botões */
button {
  background: linear-gradient(135deg, #FFFFFF, #d4b192);
  color: #2c3e50;
  font-family: 'Times New Roman', serif;
  font-size: 0.8em;
  padding: 10px 20px;
  border: 1px solid #2c3e50;
  border-radius: 1px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
  box-shadow: 0 5px 10px linear-gradient(135deg, #FFFFFF, #d4b192);
}

button:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #d4b192, #2c3e50);;
  color: #d4b192;
}

/* Rodapé */
footer {
  color: #d4b192;
  text-align: center;
  padding: 10px;
  font-size: 1em;
  width: 50%;
  position: relative;
  bottom: 0;
}

/* Classe de shake para feedback */
.shake {
  animation: shake 0.5s;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Responsividade */
@media (max-width: 768px) {
  #game-board {
    grid-template-columns: repeat(7, 2fr);
  }
}

@media (max-width: 480px) {
  #game-board {
    grid-template-columns: repeat(6, 2fr);
  }

  .board-cell {
    width: 40px;
    height: 40px;
    font-size: 1em;
  }
}
