/* Custom CSS Variables & Aesthetics */
:root {
    --bg-dark: #050508;
    --spirit-color: #a855f7;
    --air-color: #06b6d4;
    --fire-color: #f59e0b;
    --water-color: #3b82f6;
    --earth-color: #10b981;
    --light-dark-color: #e2e8f0;
}

/* Vignette Background */
.bg-radial-vignette {
    background: radial-gradient(circle at center, transparent 0%, rgba(5, 5, 8, 0.85) 80%, rgba(5, 5, 8, 0.98) 100%);
}

/* Animação para a linha tracejada de conexão */
.path-line-anim {
    animation: dashOffset 25s linear infinite;
}

@keyframes dashOffset {
    to {
        stroke-dashoffset: -1000;
    }
}

/* Estrutura e Ancoragem Absoluta da Ilha */
.island-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.island-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

/*
  Círculo/Ilha:
  Expande em escala mantendo sua origem estritamente no centro.
*/
.island-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(15, 12, 28, 0.85);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease,
                background-color 0.3s ease;
    transform-origin: center center;
}

/* Hover Effect: Aumenta e ascende o fundo sem deslocar a ilha */
.island-link:hover .island-circle {
    transform: scale(1.18);
    background: rgba(30, 20, 50, 0.95);
}

/* Variações de Brilho Neon por Elemento ao Passar o Mouse */
.air-node {
    --island-background: rgba(8, 63, 82, 0.9);
    --island-hover-background: rgba(12, 90, 115, 0.95);
    --island-border: rgba(125, 211, 252, 0.65);
}

.fire-node {
    --island-background: rgba(85, 39, 12, 0.9);
    --island-hover-background: rgba(120, 53, 15, 0.95);
    --island-border: rgba(245, 158, 11, 0.65);
}

.water-node {
    --island-background: rgba(14, 35, 85, 0.9);
    --island-hover-background: rgba(20, 48, 115, 0.95);
    --island-border: rgba(59, 130, 246, 0.65);
}

.earth-node {
    --island-background: rgba(7, 60, 43, 0.9);
    --island-hover-background: rgba(9, 85, 59, 0.95);
    --island-border: rgba(16, 185, 129, 0.65);
}

:is(.air-node, .fire-node, .water-node, .earth-node) .island-circle {
    background: var(--island-background);
    border-color: var(--island-border);
}

:is(.air-node, .fire-node, .water-node, .earth-node) .island-link:hover .island-circle {
    background: var(--island-hover-background);
}

.spirit-glow:hover {
    border-color: var(--spirit-color);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6), inset 0 0 15px rgba(168, 85, 247, 0.3);
}

.air-glow:hover {
    border-color: var(--air-color);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6), inset 0 0 15px rgba(6, 182, 212, 0.3);
}

.fire-glow:hover {
    border-color: var(--fire-color);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6), inset 0 0 15px rgba(245, 158, 11, 0.3);
}

.water-glow:hover {
    border-color: var(--water-color);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.6), inset 0 0 15px rgba(59, 130, 246, 0.3);
}

.earth-glow:hover {
    border-color: var(--earth-color);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.6), inset 0 0 15px rgba(16, 185, 129, 0.3);
}

.island-link[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.72;
}

/* Cinza do portal de Luz e Trevas. */
.light-dark-node .island-circle {
    background: #1b1d22;
    border-color: rgba(232, 229, 221, 0.45);
}

.light-dark-node .island-link:hover .island-circle {
    background: #30323a;
}

.light-dark-glow:hover {
    border-color: var(--light-dark-color);
    box-shadow: 0 0 25px rgba(226, 232, 240, 0.55), inset 0 0 15px rgba(226, 232, 240, 0.3);
}

.light-dark-title {
    color: #e2e8f0;
    white-space: nowrap;
}

/* Rótulos e Metadados abaixo da Logo */
.island-meta {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.island-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}

.difficulty-badge {
    font-family: monospace;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid currentColor;
    background: rgba(5, 5, 8, 0.85);
}

.xp-badge {
    font-family: monospace;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 9999px;
    font-weight: bold;
    color: #e9d5ff;
    border: 1px solid rgba(168, 85, 247, 0.4);
    background: rgba(88, 28, 135, 0.4);
}

/* Cores das Dificuldades */
.diff-very-easy {
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.5);
}

.diff-easy {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.5);
}

.diff-easy-medium {
    color: #fde047;
    border-color: rgba(234, 179, 8, 0.5);
}

.diff-medium {
    color: #fb923c;
    border-color: rgba(251, 146, 60, 0.5);
}

.diff-pending {
    color: #c4b5fd;
    border-color: rgba(196, 181, 253, 0.5);
}

/* Responsividade Mobile */
@media (max-width: 640px) {
    .island-circle {
        width: 60px;
        height: 60px;
    }
    .island-circle svg {
        width: 24px;
        height: 24px;
    }
    .island-title {
        font-size: 0.75rem;
    }
    .difficulty-badge, .xp-badge {
        font-size: 0.5rem;
        padding: 1px 4px;
    }
}
