.aurora-theme-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99998;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--aurora-border, rgba(255, 255, 255, 0.08));
    background: var(--aurora-surface-elevated, rgba(11, 18, 40, 0.92));
    color: var(--txt, #edf4ff);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--aurora-shadow-card, 0 18px 60px rgba(0, 0, 0, 0.45));
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.aurora-theme-toggle:hover {
    border-color: var(--aurora-border-accent, rgba(0, 212, 255, 0.28));
    color: var(--acc, #00d4ff);
}
.aurora-theme-toggle:active { transform: scale(0.94); }

.aurora-theme-toggle__icon {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: opacity 0.2s ease, transform 0.25s ease;
}

/* Dark mode (default): show the sun (click to switch to light) */
.aurora-theme-toggle__icon--sun { opacity: 1; transform: rotate(0deg) scale(1); }
.aurora-theme-toggle__icon--moon { opacity: 0; transform: rotate(-45deg) scale(0.6); }

/* Light mode: show the moon (click to switch back to dark) */
html[data-theme="light"] .aurora-theme-toggle__icon--sun { opacity: 0; transform: rotate(45deg) scale(0.6); }
html[data-theme="light"] .aurora-theme-toggle__icon--moon { opacity: 1; transform: rotate(0deg) scale(1); }

@media (max-width: 768px) {
    .aurora-theme-toggle {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
    }
    .aurora-theme-toggle__icon { width: 19px; height: 19px; }
}

@media (max-width: 480px) {
    .aurora-theme-toggle {
        /* Keep clear of mobile safe areas / bottom nav bars */
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        right: 14px;
    }
}
