.directory-wrapper {
    background-color: black;
    width: 100svw;
    height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.directory-wrapper ul {
    width: 100svw;
    height: 100svh;

    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    margin: 0;
    padding: 0;
}

/* Hide all lists initially */
.directory-list {
    display: none !important;
}

.directory-list.active {
    display: flex !important;
}

.directory {
    margin: 0 auto;
    position: relative;
    width: fit-content;
    max-width: 100svw;
    height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
    background-color: black;
    display: flex;
    flex-direction: column;
    clip-path: inset(0);
}

.directory.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    z-index: 5;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.directory::after {
    content: '';
    background: linear-gradient(to bottom, black, transparent, transparent, black);
    width: 120%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.directory-title {
    z-index: 10;
    width: 70%;
    top: 50px;
    left: 30px;
    position: absolute;
    display: flex;
    align-items: center;
    gap: 30px;
}

.directory-title h2 {
    font-weight: 500;
    position: relative;
    font-size: var(--fontsize-18);
    line-height: 1;
    color: white;
}

.directory-title h2:before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    content: '';
    aspect-ratio: 1/1;
    width: 30px;
    border-radius: 50%;
    border: white solid 2px;
}

.directory-title h1 {
    font-weight: 700;
    font-family: var(--Cormorant);
    font-size: calc(var(--fontsize-header) - 10px);
    line-height: 1;
    color: white;
}

.directory video {
    pointer-events: none;
    width: fit-content;
    max-width: 100svw;
    height: 100svh;
    object-fit: cover;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.video-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.video-indicator svg {
    width: 32px;
    height: 32px;
    fill: white;
    display: none;
}

.video-indicator.icon-play-active .icon-play {
    display: block;
}

.video-indicator.icon-pause-active .icon-pause {
    display: block;
}

.speed-badge {
    display: none;
    color: white;
    font-weight: 700;
    font-size: var(--fontsize-18);
    line-height: 1;
}

.speed-label {
    display: none;
    color: white;
    font-weight: 500;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
}

/* While holding, swap circle to the speed badge + label */
.directory.is-holding .video-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background: rgba(0, 0, 0, 0.55);
    width: 80px;
    height: 80px;
}

.directory.is-holding .video-indicator svg {
    display: none;
}

.directory.is-holding .video-indicator .speed-badge,
.directory.is-holding .video-indicator .speed-label {
    display: block;
}

.hold-hint {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.1px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hold-hint.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hold-hint svg {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.9);
}

.continue {
    z-index: 10;
    position: absolute;
    bottom: 6%;
    right: 3%;
    margin-top: 20px;
    background-color: #004aad;
    color: white;
    transition: var(--apple-animation);
    font-weight: 500;
    font-size: var(--fontsize-16);
    border-radius: 30px;
    margin-top: 10px;
    text-align: center;
    width: fit-content;
    padding: 10px 25px;
}

.continue::after {
    width: 80svw;
    max-width: 500px;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateY(-130%);
    content: 'Reach your destination ?';
    color: white;
    font-weight: 500;
    font-size: var(--fontsize-18);
    text-align: right;
}

.scroll-icon {
    z-index: 100;
    position: fixed;
    bottom: 20px;
    left: 50%;
    /* Keep base transform here */
    transform: translateX(-50%) rotate(-45deg);
    transform-origin: center center;
    color: white !important;
    height: 60px !important;
    mask-image: radial-gradient(circle, black 50%, transparent 50%);
    -webkit-mask-image: radial-gradient(circle, black 50%, transparent 50%);
    filter: invert(0) brightness(1.5);

    animation: scroll-bounce 2s ease-in-out infinite;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

@keyframes scroll-bounce {
    0% {
        opacity: 0;
        transform: translateX(-50%) rotate(-45deg) translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) rotate(-45deg) translateY(-10px) translateX(10px);
    }

    60% {
        opacity: 1;
        /* Smoothly drift downwards to simulate scrolling */
        transform: translateX(-50%) rotate(-45deg) translateY(-15px) translateX(15px);
    }

    100% {
        opacity: 0;
    }
}