.tracks-bg {
    background-color: #d6d3d1;
    background-image:
        repeating-linear-gradient(90deg, transparent 0, transparent 40px, rgba(0, 0, 0, 0.05) 40px, rgba(0, 0, 0, 0.05) 80px),
        linear-gradient(to bottom, #a8a29e 0%, #e7e5e4 100%);
    background-attachment: fixed;
}

.rail {
    background: linear-gradient(180deg, #57534e, #292524, #57534e);
    box-shadow:
        0 4px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sleeper {
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0V0zm10 10h10v10H10V10zM0 10h10v10H0V10zM10 0h10v10H10V0z' fill='%23603d30' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E"),
        linear-gradient(90deg, #451a03, #78350f, #451a03);
    box-shadow: 0 4px 2px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.train-metal {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    box-shadow:
        inset 0 2px 5px rgba(255, 255, 255, 0.3),
        inset 0 -5px 10px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #7f1d1d;
}

.carriage {
    transition: transform 0.3s;
    background:
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 12px),
        linear-gradient(to bottom, #f3f4f6, #d1d5db);
    border: 4px solid #4b5563;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.carriage:hover {
    transform: scale(1.05) translateY(-5px);
    border-color: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
    cursor: pointer;
}

.train-move {
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes puff {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-80px) scale(3);
        opacity: 0;
    }
}

.smoke {
    animation: puff 1.5s infinite;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(200, 200, 200, 0) 70%);
}

/* High-quality claymation background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('clay_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}