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

body {
    background-color: #111;
    /* Extra height for scrolling */
    height: 500vh; 
    overflow-x: hidden;
    font-family: sans-serif;
}

.gallery-viewport {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Hide overflow */
}

.gallery-track {
    display: flex;
    gap: 40px;
    /* Start position */
    transform: translateX(0px);
    will-change: transform;
}

/* --- Card Styling --- */
.card {
    position: relative;
    /* Fixed width is crucial for the calculation */
    width: 300px; 
    height: 400px;
    flex-shrink: 0; /* Prevent squishing */
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    
    /* Grayscale Default State */
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Color Hover State */
.card:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* --- UI Elements --- */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ff5252;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    cursor: pointer;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(255, 82, 82, 0.4);
    transition: transform 0.2s;
}

.nav-btn:hover { transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 40px; }
.next-btn { right: 40px; }

.scroll-hint {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}