.theme-toggle {
    width: 60px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05), 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    display: inline-block;
    margin: 0 10px;
    transition: background 0.4s, border 0.4s, box-shadow 0.4s;
}

.theme-toggle .circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(10%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    position: absolute;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .sun {
    color: #f97316;
    margin-top: 0%;
    opacity: 1;
}

.theme-toggle .moon {
    margin-top: -150%;
    color: white;
    opacity: 0;
}

#theme-toggle {
    display: none;
}

#theme-toggle:checked ~ nav .theme-toggle {
    background: rgba(30, 30, 32, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.3);
}

#theme-toggle:checked ~ nav .theme-toggle .circle {
    left: 100%;
    transform: translate(-110%, -50%);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#theme-toggle:checked ~ nav .theme-toggle .sun {
    margin-top: 150%;
    opacity: 0;
}

#theme-toggle:checked ~ nav .theme-toggle .moon {
    margin-top: 0%;
    opacity: 1;
}

.theme-toggle:active .circle {
    width: 32px;
}