.demo-theme-switcher {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 2147483000;
    width: 38px;
    height: 124px;
    transform: translateY(-50%);
    font-family: Sora, Inter, Arial, sans-serif;
    color: #111318;
}

.demo-theme-switcher * {
    box-sizing: border-box;
}

.demo-theme-switcher__toggle {
    position: relative;
    display: inline-flex;
    width: 38px;
    min-height: 124px;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    border: 1px solid rgba(255,255,255,.24);
    border-right: 0;
    border-radius: 16px 0 0 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0) 38%),
        linear-gradient(155deg, rgba(47,50,56,.96), rgba(18,20,24,.98) 72%);
    color: #faf6ee;
    box-shadow: 0 14px 38px rgba(9,11,15,.28), inset 0 1px 0 rgba(255,255,255,.16);
    cursor: pointer;
    outline: none;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    backdrop-filter: blur(16px);
    -webkit-tap-highlight-color: transparent;
}

.demo-theme-switcher__toggle::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255,248,235,.9);
    box-shadow: 0 10px 0 rgba(255,248,235,.58), 0 20px 0 rgba(255,248,235,.34);
    transform: translateX(-50%);
}

.demo-theme-switcher__toggle::after {
    content: "";
    position: absolute;
    right: 7px;
    bottom: 12px;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(250,246,238,.82);
    border-bottom: 2px solid rgba(250,246,238,.82);
    transform: rotate(135deg);
    transition: transform .18s ease;
}

.demo-theme-switcher.is-open .demo-theme-switcher__toggle::after {
    transform: rotate(-45deg);
}

.demo-theme-switcher__toggle:hover,
.demo-theme-switcher__toggle:focus-visible {
    transform: translateX(-3px);
    filter: saturate(1.06);
    box-shadow: 0 18px 50px rgba(9,11,15,.36), inset 0 1px 0 rgba(255,255,255,.22);
}

.demo-theme-switcher__toggle span {
    display: block;
    margin-top: 14px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.demo-theme-switcher__panel {
    position: absolute;
    top: 50%;
    right: 49px;
    width: min(314px, calc(100vw - 66px));
    max-height: min(470px, calc(100vh - 36px));
    overflow: auto;
    padding: 15px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 30%),
        linear-gradient(160deg, rgba(30,32,37,.96), rgba(13,15,19,.96));
    box-shadow: 0 26px 76px rgba(0,0,0,.34);
    opacity: 0;
    pointer-events: none;
    transform: translate(18px, -50%) scale(.96);
    transition: opacity .2s ease, transform .2s ease;
    backdrop-filter: blur(20px);
}

.demo-theme-switcher__panel::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -7px;
    width: 14px;
    height: 14px;
    border-top: 1px solid rgba(255,255,255,.16);
    border-right: 1px solid rgba(255,255,255,.16);
    background: rgba(18,20,24,.96);
    transform: translateY(-50%) rotate(45deg);
}

.demo-theme-switcher.is-open .demo-theme-switcher__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%) scale(1);
}

.demo-theme-switcher__head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.demo-theme-switcher__head strong {
    color: #fff8ef;
    font-size: 15px;
    font-weight: 900;
}

.demo-theme-switcher__head button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

.demo-theme-switcher__list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.demo-theme-switcher__option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 11px 12px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 18px;
    background: rgba(255,255,255,.065);
    color: #f9f2e9;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.demo-theme-switcher__option:hover,
.demo-theme-switcher__option:focus-visible {
    border-color: rgba(255,255,255,.24);
    background: rgba(255,255,255,.1);
    transform: translateX(-2px);
    outline: none;
}

.demo-theme-switcher__option span {
    overflow: hidden;
    font-size: 13px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-theme-switcher__option b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 29px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #dce3e6;
    font-size: 10px;
    font-weight: 900;
}

.demo-theme-switcher__option.is-active {
    border-color: rgba(255,238,205,.32);
    background: linear-gradient(145deg, rgba(255,238,205,.16), rgba(255,255,255,.07));
}

.demo-theme-switcher__option.is-active b {
    background: #f4ead7;
    color: #17191d;
    box-shadow: 0 8px 20px rgba(244,234,215,.18);
}

@media (max-width: 520px) {
    .demo-theme-switcher {
        top: auto;
        right: 0;
        bottom: 116px;
        width: 36px;
        height: 112px;
        transform: none;
    }

    .demo-theme-switcher__toggle {
        width: 36px;
        min-height: 112px;
        border-radius: 15px 0 0 15px;
    }

    .demo-theme-switcher__toggle span {
        font-size: 9px;
    }

    .demo-theme-switcher__panel {
        top: auto;
        right: 45px;
        bottom: 0;
        width: min(296px, calc(100vw - 54px));
        max-height: min(430px, calc(100vh - 132px));
        transform: translateX(16px) scale(.96);
    }

    .demo-theme-switcher__panel::after {
        top: auto;
        right: -7px;
        bottom: 56px;
        transform: rotate(45deg);
    }

    .demo-theme-switcher.is-open .demo-theme-switcher__panel {
        transform: translateX(0) scale(1);
    }
}
