.theme-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: rgba(15,23,42,.65);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: background .25s ease, border-color .25s ease;
}

:root[data-theme="day"] .theme-toggle {
    background: rgba(226,232,240,.85);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow:
        0 4px 12px rgba(0,0,0,.35),
        0 0 10px rgba(59,130,246,.55);
    transform: translateX(0);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
}

:root[data-theme="day"] .theme-toggle::before {
    transform: translateX(20px);
}

.theme-icon {
    position: absolute;
    font-size: 12px;
    opacity: .7;
    pointer-events: none;
    transition: opacity .25s ease;
}

.theme-icon.sun {
    left: 6px;
}

.theme-icon.moon {
    right: 6px;
}

:root[data-theme="night"] .theme-icon.sun {
    opacity: .3;
}

:root[data-theme="day"] .theme-icon.moon {
    opacity: .3;
}
