/* ---- VARIÁVEIS DE TEMA ---- */
:root {
    /* Tema 'Universo' (Padrão) */
    --theme-bg: #0d0d1c;
    --theme-primary-color: #00ffff; /* Ciano */
    --theme-secondary-color: #ff0077; /* Rosa/Fúcsia */
    --theme-accent-color: #8a2be2; /* Roxo */
}

body.theme-fogo {
    --theme-bg: #1c0d0d;
    --theme-primary-color: #ff7700;
    --theme-secondary-color: #ff3300;
    --theme-accent-color: #ffaa00;
}

body.theme-agua {
    --theme-bg: #0d121c;
    --theme-primary-color: #0099ff;
    --theme-secondary-color: #33aaff;
    --theme-accent-color: #004488;
}

body.theme-terra {
    --theme-bg: #101c0d;
    --theme-primary-color: #88ff00;
    --theme-secondary-color: #55aa00;
    --theme-accent-color: #448800;
}

body.theme-ar {
    --theme-bg: #10101c;
    --theme-primary-color: #f1f1f1;
    --theme-secondary-color: #cccccc;
    --theme-accent-color: #999999;
}

/* ------------------------------------- */

/* Base e tela */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--theme-bg);
    color: #fff;
    overflow: hidden;
    cursor: none;
    transition: background-color 0.5s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

/* Canvas de Fundo */
#animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
    transition: background-color 0.5s ease-in-out;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 5px #fff, 0 0 15px var(--theme-primary-color);
    transition: text-shadow 0.5s ease-in-out;
}

.header-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.auth-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--theme-primary-color);
    color: var(--theme-primary-color);
    padding: 0.4rem 0.8rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.3s ease;
}

.auth-input::placeholder {
    color: var(--theme-primary-color);
    opacity: 0.7;
}

.auth-input:focus {
    border-color: #fff;
    box-shadow: 0 1px 5px var(--theme-primary-color);
}

.main-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* BrasaCore Singleton (Centro) */
.brasa-core-singleton {
    text-align: center;
    position: relative;
    z-index: 100;
}

.icosahedron {
    width: 280px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    animation: core-pulsate 4s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.icosahedron::before,
.icosahedron::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path d="M100 0L200 50L150 150L50 150L0 50L100 0Z" fill="transparent" stroke="%2300ffff" stroke-width="2"/><path d="M100 0L100 200M0 50L200 50" fill="transparent" stroke="%2300ffff" stroke-width="2"/><path d="M150 150L50 150" fill="transparent" stroke="%2300ffff" stroke-width="2"/><circle cx="100" cy="100" r="80" fill="transparent" stroke="%2300ffff" stroke-width="1"/></svg>') no-repeat center center;
    background-size: contain;
    transform: rotateY(0deg);
    opacity: 0.9;
    filter: drop-shadow(0 0 10px var(--theme-primary-color));
    transition: filter 1s ease-in-out;
}

.icosahedron::after {
    transform: rotateX(60deg) rotateY(120deg);
    animation: icosa-rotate-slow 30s infinite linear;
}

.icosahedron::before {
    animation: icosa-rotate-fast 15s infinite linear reverse;
}

.brasa-core-singleton h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 20px var(--theme-primary-color);
    transition: text-shadow 0.5s ease-in-out;
}
.brasa-core-singleton p {
    font-size: 1.2rem;
    color: var(--theme-primary-color);
    text-shadow: 0 0 10px var(--theme-primary-color);
    transition: all 0.5s ease-in-out;
}

/* Seções da Rede */
.network-sections {
    width: 800px;
    height: 800px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.section {
    position: absolute;
    transition: transform 0.5s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Posicionamento das seções em círculo (usando coordenadas e rotação) */
.section.brasabits { top: 0; left: 50%; transform: translate(-50%, -50%) rotate(-45deg) translate(0, 380px) rotate(45deg); }
.section.brasalabs { top: 50%; right: 0; transform: translate(50%, -50%) rotate(45deg) translate(0, 380px) rotate(-45deg); }
.section.brasabase { bottom: 0; left: 50%; transform: translate(-50%, 50%) rotate(135deg) translate(0, 380px) rotate(-135deg); }
.section.brasakhaos { top: 50%; left: 0; transform: translate(-50%, -50%) rotate(-135deg) translate(0, 380px) rotate(135deg); }

/* Estilos para os novos containers 3D */
.node-3d-container {
    width: 150px;
    height: 150px;
    position: relative;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid var(--theme-secondary-color);
    box-shadow: 0 0 10px var(--theme-secondary-color), inset 0 0 5px var(--theme-secondary-color);
    transition: all 0.3s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Hover effect para o container 3D */
.node-3d-container:hover {
    transform: scale(1.1);
    border-color: transparent;
    box-shadow: none;
}

/* Ajuste do texto dentro da seção */
.section h2, .section p, .content-text {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.section p {
    color: var(--theme-secondary-color);
    text-shadow: 0 0 3px var(--theme-secondary-color);
    transition: all 0.5s ease-in-out;
}

/* Hover nos textos também */
.node-3d-container:hover + h2 {
    color: var(--theme-primary-color);
    text-shadow: 0 0 10px var(--theme-primary-color);
    transition: all 0.5s ease;
}
.node-3d-container:hover + h2 + p {
    color: #fff;
    text-shadow: 0 0 8px #fff;
    transition: all 0.5s ease;
}
.node-3d-container:hover + h2 + p + .content-text span {
    color: var(--theme-primary-color);
}

.content-text {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: #ccc;
    transition: all 0.5s ease-in-out;
}

/* Animações */
@keyframes glow-pulse {
    0% { text-shadow: 0 0 5px var(--theme-primary-color), 0 0 10px var(--theme-primary-color); }
    100% { text-shadow: 0 0 15px var(--theme-primary-color), 0 0 25px var(--theme-primary-color); }
}

@keyframes core-pulsate {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes icosa-rotate-fast {
    from { transform: rotate3d(1, 1, 1, 0deg); }
    to { transform: rotate3d(1, 1, 1, 360deg); }
}

@keyframes icosa-rotate-slow {
    from { transform: rotate3d(1, 1, 0.5, 0deg); }
    to { transform: rotate3d(1, 1, 0.5, 360deg); }
}

/* Cursor Padrão (Núcleo de Energia Branco, 40% menor e 35% de opacidade) */
.custom-cursor {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    border: 2px solid #fff;
    box-shadow: 0 0 20px #fff, inset 0 0 10px #fff;
    position: fixed;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: all 0.2s ease-out;
    opacity: 0.35;
}

/* Efeito de Hover (expande para o tamanho original, muda a cor e opacidade para 100%) */
.custom-cursor.furious-hover {
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, var(--cursor-hover-color, #fff) 0%, transparent 70%);
    border: 2px solid var(--cursor-hover-color, #fff);
    box-shadow: 0 0 20px var(--cursor-hover-color, #fff), inset 0 0 10px var(--cursor-hover-color, #fff);
    opacity: 1;
}


/* Footer */
.footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

/* Responsividade básica (para telas menores) */
@media (max-width: 1024px) {
    .network-sections {
        width: 600px;
        height: 600px;
    }
    .circle {
        width: 120px;
        height: 120px;
    }
    .brasa-core-singleton {
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
        text-align: center;
    }
    .header-controls {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .main-container {
        flex-direction: column;
    }
    .network-sections {
        position: relative;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .section {
        position: static;
        transform: none !important;
        margin-bottom: 2rem;
    }
    .brasa-core-singleton {
        margin-bottom: 2rem;
    }
}