:root {
    --switcher-size: clamp(2.5rem, 3vw, 2.8rem);
    --switcher-radius: 0.75rem;
    --switcher-panel-gap: calc(var(--switcher-size) + 0.6rem);
    --switcher-panel-bg: color-mix(in srgb, rgba(0, 0, 0, 0.7) 85%, transparent);
    --switcher-panel-blur: 8px;
    --switcher-border-color: color-mix(in srgb, rgba(255, 255, 255, 0.5) 20%, transparent);
    --switcher-text: #fff;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    color: #fff;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bubble,
.drop,
.pattern {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: move 12s linear infinite;
    animation-timing-function: ease-in-out;
}

.bubble {
    animation-name: driftA;
}

.drop {
    animation-name: driftB;
}

.pattern {
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation-name: driftC;
}

.content {
    position: relative;
    text-align: center;
    background-color: rgba(100, 149, 237, 0.9);
    border-radius: 10px;
    padding: 20px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #FF8C00;
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #FFA500;
}

.info {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(24, 144, 255, 0.9);
    color: #FFD700;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.info p {
    margin: 0;
    font-size: 1rem;
}

.sr-only {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

.color-switcher {
    position: fixed;
    inset-block-end: 20px;
    inset-inline-end: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 20;
    isolation: isolate;
    display: grid;
    justify-items: end;
}

.color-switcher__toggle {
    inline-size: var(--switcher-size);
    block-size: var(--switcher-size);
    border-radius: calc(var(--switcher-radius) + 0.25rem);
    border: 1px solid var(--switcher-border-color);
    background: color-mix(in srgb, rgba(0, 0, 0, 0.55) 80%, transparent);
    color: var(--switcher-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
    backdrop-filter: blur(6px);
}

.color-switcher__toggle:hover,
.color-switcher__toggle:focus-visible {
    outline: none;
    background: color-mix(in srgb, rgba(0, 0, 0, 0.8) 85%, transparent);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.color-switcher__panel {
    position: absolute;
    inset-inline-end: 0;
    inset-block-end: var(--switcher-panel-gap);
    background: var(--switcher-panel-bg);
    color: var(--switcher-text);
    padding: 0.85rem;
    border-radius: var(--switcher-radius);
    backdrop-filter: blur(var(--switcher-panel-blur));
    min-inline-size: min(220px, 80vw);
    display: none;
    border: 1px solid var(--switcher-border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.color-switcher.is-open .color-switcher__panel {
    display: block;
}

.color-switcher__panel label {
    font-size: 0.9rem;
    color: var(--switcher-text);
    display: block;
    margin-block-end: 0.4rem;
}

.color-switcher__panel select {
    inline-size: 100%;
    padding: 0.4rem 0.6rem;
    border-radius: calc(var(--switcher-radius) - 0.2rem);
    border: 1px solid var(--switcher-border-color);
    background: color-mix(in srgb, rgba(255, 255, 255, 0.1) 75%, transparent);
    color: var(--switcher-text);
    font: inherit;
}

@media (max-width: 768px) {
    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .info {
        font-size: 0.8rem;
        padding: 10px;
    }

    .color-switcher {
        inset-inline-end: 10px;
        inset-block-end: 10px;
        right: 10px;
        bottom: 10px;
    }
}

@supports (top: env(safe-area-inset-top)) {
    .color-switcher {
        inset-inline-end: calc(10px + env(safe-area-inset-right));
        inset-block-end: calc(10px + env(safe-area-inset-bottom));
        right: calc(10px + env(safe-area-inset-right));
        bottom: calc(10px + env(safe-area-inset-bottom));
    }
}

@keyframes driftA {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(var(--travel-x, 150px), var(--travel-y, -80px));
    }

    100% {
        transform: translate(calc(var(--travel-x, 150px) * 1.2), calc(var(--travel-y, -80px) * 1.2));
    }
}

@keyframes driftB {
    0% {
        transform: translate(0, 0) scale(0.95);
    }

    50% {
        transform: translate(calc(var(--travel-x, -120px) * 0.8), calc(var(--travel-y, -90px) * 0.8)) scale(1.05);
    }

    100% {
        transform: translate(var(--travel-x, -120px), var(--travel-y, -90px)) scale(0.9);
    }
}

@keyframes driftC {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(calc(var(--travel-x, 100px) * 0.6), calc(var(--travel-y, 70px) * 0.6)) rotate(6deg);
    }

    100% {
        transform: translate(var(--travel-x, 100px), var(--travel-y, 70px)) rotate(12deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .color-switcher__toggle {
        transition: none;
    }

    .color-switcher__toggle:hover,
    .color-switcher__toggle:focus-visible {
        transform: none;
    }
}
