/* styles.css */
:root {
  --primary-color: #2c3e50;       /* Pantone Dark Blue */
  --secondary-color: #d4b192;     /* Pantone Beige/Gold */
  --text-color: #d4b192;
  --accent-color: #c7a178;        /* Pantone Bronze */
  --primary: #d4b192; 
  --secondary:#2c3e50;     /* Pantone Beige/Gold */
}
* {
  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;
}
h2 {
  text-align: center;
  margin: 15px 0;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

/* ========== 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;
  }
}

@media (max-width: 768px) {
  .menu-item {
    height: 25px;
    font-size: 0.8em;
    padding: 0 6px;
  }
}

@media (max-width: 480px) {
  .menu-list {
    flex-direction: row;
    gap: 2px;
  }
  .menu-item {
    height: 20px;
    font-size: 0.55em;
    padding: 0 3px;
  }
}

/* Estrutura do I Ching */
#game-container {
  max-width: 1200px;
  margin: 2rem auto;
  position: relative;
}

.panel {
  background: var(--primary-color);
  border: 2px solid var(--secondary-color);
  border-radius: 15px;
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: 0 0 20px var(--primary);
  animation: fadeIn 1s forwards;
}

#consult-panel {
  margin-top: 30px;
  padding: 20px;
  background-color: var(--primary-color);
  border-radius: 10px;
  box-shadow: 0 0 15px var(--primary-color);
  display: flex; /* Itens lado a lado */
  flex-wrap: wrap; /* Permite quebra de linha se necessário */
  justify-content: center; /* Centraliza horizontalmente */
  gap: 15px; /* Espaçamento entre as runas */
}

#question-input {
  width: 80%;
  height: 100px;
  margin: 1rem 0;
  padding: 1rem;
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  color: var(--text-color);
  font-size: 1.0em;
  border-radius: 10px;
}

/* Hexagrama Visual */
.hexagram-lines {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}

.hexagram-line {
  width: 250px;
  height: 10px;
  margin: 0 auto;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.hexagram-line.solid {
  background: var(--secondary-color);
  box-shadow: 0 0 15px var(--secondary-color);
}

.hexagram-line.broken {
  background: transparent;
  border: 3px solid var(--secondary-color);
}

/* Botões Específicos do I Ching */
.btn {
  text-align: center;
  margin: 15px 0;
  font-size: 1.4rem;
  background: var(--secondary-color);
  color: var(--primary-color);
  font-size: 0.9em;
  padding: 12px 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--secondary-color);
}

.btn:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212,177,146,0.4);
}

/* Resultados e Interpretação */
#result-panel {
  max-width: 600px;
}

#hexagram-title {
  color: var(--secondary-color);
  font-size: 1.8em;
  margin-bottom: 1.2rem;
  text-shadow: 2px 2px 4px var(--secondary-color);
}

#hexagram-symbol {
  text-align: center;
  font-size: 1.4rem;
  color: #2c3e50;
  font-size: 2.5rem;
  margin: 1.0rem 0;
  color: var(--secondary-color);
}

#hexagram-interpretation {
  text-align: center;
  margin: 15px 0;
  font-size: 1.4rem;
  color: var(--secondary-color);
  font-size: 1.0em;
  line-height: 1.6;
  margin: 1.4rem auto;
  max-width: 400px;
}

/* Animações Específicas */
@keyframes lineReveal {
  0% { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(1); }
}

.changing {
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  0% { opacity: 0.8; }
  100% { opacity: 1; }
}

/* Responsividade */
@media (max-width: 768px) {
  .panel {
      padding: 1.5rem;
      margin: 1rem;
  }
  
  #hexagram-title {
      font-size: 1.8em;
  }
  
  .hexagram-line {
      width: 200px;
      height: 8px;
  }
}

@media (max-width: 480px) {
  .btn {
      padding: 10px 20px;
      font-size: 1em;
  }
  
  #hexagram-symbol {
      font-size: 2.5rem;
  }
  
  #hexagram-interpretation {
      font-size: 1em;
  }
}
