/* ─────────────────────────────────────────────────────
    BOTÃO DE ALTERNÂNCIA
    Coloque .theme-toggle onde quiser no layout.
───────────────────────────────────────────────────── */
.theme-toggle {
    position: fixed;
    width: 80px;
    height: 80px;
    top: 30px;
    right: 30px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas do glow — maior que o botão para dar espaço ao brilho */
.theme-toggle canvas {
    position: absolute;
    inset: -36px;
    width:  calc(100% + 72px);
    height: calc(100% + 72px);
    pointer-events: none;
    z-index: 1;
}

.theme-toggle .core-wrap {
    width:  52px;
    height: 52px;
    position: relative;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1);
}
.theme-toggle:hover .core-wrap  { transform: scale(1.08); }
.theme-toggle:active .core-wrap { transform: scale(0.95); }

/* Faces — sol e lua sobrepostas, alternando opacidade */
.face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.face-sun {
    background: radial-gradient(circle at 38% 35%, #FFE566, #FFB800 60%, #FF8800);
}

.face-moon {
    background: radial-gradient(circle at 60% 40%, #e8eeff, #b0c4f8 55%, #7090e8);
    opacity: 0;
    transform: rotate(-30deg) scale(0.85);
    overflow: hidden;
}
.moon-crater {
    position: absolute;
    border-radius: 50%;
    background: rgba(70, 100, 195, 0.22);
}

/* Estado escuro — mostra lua, esconde sol */
[data-theme="dark"] .face-sun  {
    opacity: 0;
    transform: rotate(30deg) scale(1);
}
[data-theme="dark"] .face-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}