:root {
    --primary-color: #2c3e50;
    --secondary-color: #d4b192;
    --primary: #2c3e50;
    --secondary: #d4b192;
    --background: linear-gradient(45deg, #1a1a1a, #2c3e50);
    --mystic-glow: rgba(212, 177, 146, 0.3);
    --text-color: #ecf0f1;
}
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Times New Roman', serif;
    background: var(--background);
    color: var(--secondary-color);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
  h1 {
    text-align: center;
    margin: 15px 0;
    font-size: 1.4rem;
    color: var(--secondary);
  }
  h2 {
    text-align: center;
    margin: 15px 0;
    font-size: 1.2rem;
    color: var(--secondary);
  }
  h3 {
    text-align: center;
    margin: 35px 0;
    font-size: 1.0rem;
    color: var(--secondary);
  }
  
  /* ========== NOVO HEADER ========== */
  header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid var(--primary);
  }
  .menu {
    color: var(--secondary);
    display: none; /* Esconde completamente */
    position: absolute;
    top: -1500px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 350px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--border-radius);
    padding: 15px 0;
    opacity: 0;
    background: rgba(44, 62, 80, 0.98) !important; /* Cor sólida com opacidade quase total */
    border: 1px solid var(--secondary-color) !important;
    box-shadow: 0 4px 12px var(--primary);
  }
  .menu-item {
    border-radius: var(--border-radius);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.95em;
    padding: 0 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: transparent !important;
    color: var(--secondary);
    border: 1px solid var(--secondary);
  }
  
  .menu-icon {
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    transition: transform 0.3s;
  }
  
  .menu-item:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
    box-shadow: 0 3px 8px var(--secondary);
    background: var(--secondary-color) !important;
    color: var(--primary-color) !important;
  }
  
  .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, 
    var(--secondary) 0%, 
               transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  .menu-item:hover::before {
    background: var(--secondary-color);
    opacity: 1;
  }
  
  .menu-icon span {
    color: var(--secondary);;
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: var(--secondary-color) !important; /* Cor contrastante */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .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;
    }
}

#game-container {
    position: relative;
    min-height: 80vh;
    margin-top: 20px;
}

.hand-container {
    position: relative;
    width: 300px;
    height: 400px;
    margin: 50px auto;
    background: transparent;
}

.ring-slot {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px dashed var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}
.ring-slot::after {
    content: attr(data-finger);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary-color);
    font-size: 0.8em;
    text-transform: capitalize;
}

#progress {
    width: 200px;
    height: 5px;
    background: rgba(212, 177, 146, 0.2);
    margin: 10px auto;
    border-radius: 3px;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: var(--secondary-color);
    transition: width 0.5s ease;
}

.symbol-stone.correct {
    animation: explode 0.5s ease-out forwards;
}

.ring-slot.incorrect {
    animation: shake 0.3s ease;
}

@keyframes explode {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.ring-slot[data-finger="polegar"] { left: 15%; top: 30%; }
.ring-slot[data-finger="indicador"] { left: 35%; top: 25%; }
.ring-slot[data-finger="médio"] { left: 50%; top: 20%; }
.ring-slot[data-finger="anelar"] { left: 65%; top: 25%; }
.ring-slot[data-finger="mindinho"] { left: 80%; top: 30%; }

.symbol-stone {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px var(--mystic-glow);
}

.symbol-stone.active {
    transform: scale(1.3);
    filter: drop-shadow(0 0 15px var(--secondary-color));
    z-index: 1000;
}

#question-panel {
    position: relative;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(44, 62, 80, 0.9);
    padding: 15px;
    border-radius: 10px;
    max-width: 50%;
    z-index: 50;
}

.btn {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.correct {
    animation: pulse 0.5s ease;
    background: var(--mystic-glow) !important;
}

.hidden {
    display: none;
}

.current-symbol {
    font-size: 2.5em;
    display: inline-block;
    margin: 10px 0;
    text-shadow: 0 0 15px var(--secondary-color);
}

#question-panel {
    min-height: 120px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .hand-container {
        transform: scale(1.3);
        margin: 100px auto;
    }
    
    .menu-item {
        font-size: 0.8em;
        padding: 0 6px;
    }
    
    #question-panel {
        top: 80px;
        width: 90%;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .hand-container {
        transform: scale(1.1);
    }
    
    .menu-list {
        gap: 8px;
    }
    
    .menu-item {
        font-size: 0.7em;
        height: 18px;
    }
    
    .symbol-stone {
        width: 45px;
        height: 45px;
        font-size: 1.5em;
    }
}
