.entry-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--transition-smooth), visibility 0.6s;
    isolation: isolate;
}

.entry-screen-grain {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    background-size: 150px 150px;
    will-change: transform, opacity;
    opacity: var(--noise-opacity);
    animation: grainPulse 8s ease-in-out infinite;
    transition: opacity 0.3s var(--transition-smooth);
}

.entry-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle 900px at 80% -10%, var(--gradient-1), transparent 65%),
        radial-gradient(circle 650px at 10% 100%, var(--gradient-2), transparent 60%);
    filter: blur(50px);
    opacity: 0.9;
    animation: gradientFloat 18s ease-in-out infinite alternate;
    pointer-events: none;
}

.entry-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(circle 950px at 15% 120%, var(--gradient-2), transparent 70%),
        radial-gradient(circle 700px at 90% 0%, var(--gradient-1), transparent 70%);
    filter: blur(70px);
    opacity: 0;
    animation: heroGradientFade 14s ease-in-out infinite;
}



.entry-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.entry-container {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.entry-container::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--gradient-3) 72%);
    pointer-events: none;
}

.slide-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.slide-button-container {
    width: 12rem;
    height: 2.25rem;
    background: #ffffff;
    border-radius: 9999px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: visible;
}

.slide-button-container.completed {
    width: 8rem;
}

.slide-button-track {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #3f3f46;
    border-radius: 9999px;
    width: 0;
    z-index: 0;
    pointer-events: none;
    will-change: width;
}

:root[data-theme="light"] .slide-button-track {
    background: #f3f4f6;
}

.slide-button-container.completed .slide-button-track {
    display: none;
}

.slide-button-handle {
    position: absolute;
    left: -1rem;
    top: 50%;
    margin-top: -1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    will-change: transform;
}

.slide-button-handle svg {
    width: 1rem;
    height: 1rem;
    color: #1a1a1a;
    pointer-events: none;
}

.slide-button-container.completed .slide-button-handle {
    display: none;
}

.slide-button-status {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 9999px;
}

.slide-button-container.completed .slide-button-status {
    display: flex;
}

.slide-button-status-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #1a1a1a;
    animation: statusAppear 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.slide-button-status-icon.loading {
    animation: spin 1s linear infinite;
}

@keyframes statusAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (pointer: coarse) {
    .slide-button-handle {
        cursor: auto;
    }

    .slide-button-handle:active {
        cursor: auto;
    }
}

@keyframes grainPulse {

    0%,
    100% {
        opacity: var(--noise-opacity);
    }

    50% {
        opacity: calc(var(--noise-opacity) * 1.5);
    }
}

@keyframes gradientFade {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes gradientFadeAlt {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.7;
    }
}

@media (max-width: 640px) {
    .slide-button-container {
        width: 10rem;
    }

    .slide-button-container.completed {
        width: 6rem;
    }
}