* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 0;
}

.logo-link {
    display: inline-block;
    margin-bottom: 30px;
}

.logo {
    height: 30px;
    width: auto;
    display: block;
}

/* Marquee */
.marquee {
    width: 100%;
    overflow: hidden;
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
    position: relative;
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-marquee 20s linear infinite;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #fafafa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.marquee-content span {
    white-space: nowrap;
}

@keyframes scroll-marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Scroll container */
.coverflow-scroll-container {
    flex: 1;
    display: flex;
    align-items: center;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    perspective: 40em;
    perspective-origin: 50% 50%;

    /* Hide scrollbar but keep functionality */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.coverflow-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Coverflow list */
.coverflow {
    display: inline-flex;
    padding: 0 50vw;
    list-style: none;
    align-items: center;
    height: 500px;
    transform-style: preserve-3d;
    white-space: nowrap;
}

/* Individual cover item */
.coverflow li {
    scroll-snap-align: center;
    display: inline-block;
    width: 300px;
    height: 300px;
    transform-style: preserve-3d;
    perspective: 40em;

    /* Set up view timeline for scroll-driven animations */
    view-timeline-name: --cover-timeline;
    view-timeline-axis: inline;

    /* Apply z-index animation to list item */
    animation: adjust-z-index linear both;
    animation-timeline: --cover-timeline;
}

/* The actual image */
.coverflow li img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    position: relative;

    /* Apply rotation animation to image */
    animation: rotate-cover linear both;
    animation-timeline: --cover-timeline;

    /* WebKit reflection */
    -webkit-box-reflect: below 0.5em -webkit-gradient(
        linear,
        left top,
        left bottom,
        from(transparent),
        color-stop(0.5, transparent),
        to(rgba(0, 0, 0, 0.25))
    );
}


/* Scroll-driven animation for rotation (applied to img) */
@keyframes rotate-cover {
    0% {
        transform: translateX(-100%) rotateY(-45deg);
    }
    35% {
        transform: translateX(0) rotateY(-45deg);
    }
    50% {
        transform: rotateY(0deg) translateZ(1em) scale(1.5);
    }
    65% {
        transform: translateX(0) rotateY(45deg);
    }
    100% {
        transform: translateX(100%) rotateY(45deg);
    }
}

/* Z-index animation (applied to li) */
@keyframes adjust-z-index {
    0% { z-index: 1; }
    50% { z-index: 100; }
    100% { z-index: 1; }
}


.instructions {
    text-align: center;
    padding: 20px;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    opacity: 0.5;
    letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .coverflow li {
        width: 200px;
        height: 200px;
    }

    .coverflow {
        height: 350px;
        gap: 30px;
    }
}
