@import url('https://fonts.googleapis.com/css2?family=Racing+Sans+One&family=Russo+One&display=swap');

body {
    font-family: 'Russo One', sans-serif;
    background-color: #111;
    color: #fff;
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), repeating-linear-gradient(45deg, #222 0px, #222 10px, #333 10px, #333 20px);
    overflow-x: hidden
}

.font-racing {
    font-family: 'Racing Sans One', cursive
}

.track-container {
    perspective: 1000px;
    overflow: hidden
}

.track {
    background: #333;
    border-left: 10px solid #fff;
    border-right: 10px solid #fff;
    transform: rotateX(40deg) scale(1.5);
    height: 400px;
    position: relative;
    background-image: linear-gradient(#444 2px, transparent 2px), linear-gradient(90deg, #fff 2px, transparent 2px);
    background-size: 100% 50px, 100px 100%
}

.finish-line {
    position: absolute;
    top: 50px;
    width: 100%;
    height: 30px;
    background-image: repeating-linear-gradient(90deg, #000 0px, #000 20px, #fff 20px, #fff 40px);
    z-index: 10
}

.racer-card {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden
}

.racer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.5);
    border-color: #3b82f6
}

.racer-card.selected {
    border-color: #fbbf24;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
    background: linear-gradient(180deg, #451a03, #451a03)
}

.racer-card.correct-order {
    background: linear-gradient(180deg, #064e3b, #065f46);
    border-color: #10b981;
    opacity: 0.5;
    pointer-events: none
}

.racer-card.wrong-order {
    animation: shake 0.5s
}

.car-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.5))
}

.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #fbbf24;
    color: #000;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-bottom-right-radius: 8px;
    font-weight: bold
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-10px)
    }

    75% {
        transform: translateX(10px)
    }
}

@keyframes drive-off {
    0% {
        transform: translateY(0) scale(1)
    }

    100% {
        transform: translateY(-500px) scale(0);
        opacity: 0
    }
}

.driving-off {
    animation: drive-off 1s cubic-bezier(0.5, 0, 1, 1) forwards
}

.start-lights {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px
}

.light {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #333;
    border: 4px solid #000
}

.light.red {
    background: #ef4444;
    box-shadow: 0 0 20px #ef4444
}

.light.green {
    background: #22c55e;
    box-shadow: 0 0 30px #22c55e
}