: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;
}

/* ========== 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-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    transition: transform 0.3s;
}

.menu-icon:hover {
    transform: scale(1.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 {
    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 rgba(44, 62, 80, 0.98);
    padding: 15px 0;
    opacity: 0;
}

.menu.active {
    top: 65px;
    opacity: 1;
}

.menu ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 15px;
    list-style: none;
    max-height: 600px; /* Altura máxima */
    overflow-y: auto; /* Scroll apenas quando necessário */
    padding-right: 10px; /* Espaço para a barra de rolagem */
}

.menu-item {
    background: rgba(212, 177, 146, 0.1);
    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-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;
}

/* ESTILOS DO JOGO */
body {
    background: linear-gradient(45deg, #1a1a1a, #2c3e50);
    color: #d4b192;
    min-height: 100vh;
    margin: 0;
    font-family: 'Times New Roman', serif;
}

#game-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.panel {
    background: rgba(44, 62, 80, 0.9);
    border: 2px solid #d4b192;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(212, 177, 146, 0.2);
}

.tree-of-life {
    position: relative;
    min-height: 600px;
    margin: 40px 0;
}

.sefirah {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px dashed #d4b192;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    font-size: 0.9em;
    background: rgba(44, 62, 80, 0.8);
}

/* Posicionamento das Sefirot */
#keter { left: 50%; top: 5%; transform: translateX(-50%); }
#chokhmah { left: 30%; top: 20%; }
#binah { left: 70%; top: 20%; }
#chesed { left: 20%; top: 40%; }
#gevurah { left: 80%; top: 40%; }
#tiferet { left: 50%; top: 50%; transform: translateX(-50%); }
#netzach { left: 30%; top: 65%; }
#hod { left: 70%; top: 65%; }
#yesod { left: 50%; top: 80%; transform: translateX(-50%); }
#malkuth { left: 50%; top: 95%; transform: translateX(-50%); }

.symbol {
    width: 60px;
    height: 60px;
    background: #2c3e50;
    border: 2px solid #d4b192;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    position: absolute;
    cursor: grab;
    touch-action: none;
    user-select: none;
    box-shadow: 0 0 15px rgba(212, 177, 146, 0.3);
    z-index: 10;
}

.btn {
    background: linear-gradient(45deg, #2c3e50, #d4b192);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 30px;
}

.btn:hover {
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

.correct {
    animation: pulse 0.5s ease;
    border-color: #4CAF50 !important;
}

.incorrect {
    animation: shake 0.5s ease;
    border-color: #f44336 !important;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(10px); }
    50% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .tree-of-life {
        min-height: 500px;
    }
    
    .sefirah {
        width: 50px;
        height: 50px;
        font-size: 0.6em;
    }
    
    .symbol {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}
