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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

#game-container {
    width: 90%;
    max-width: 1200px;
    text-align: center;
}

h1 {
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#robot-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.robot-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 30px;
    border-radius: 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.robot-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.robot-icon {
    font-size: 3em;
}

#race-track {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px 20px;
    position: relative;
    margin: 40px 0;
}

.lane {
    height: 80px;
    margin: 20px 0;
    position: relative;
    border-bottom: 2px dashed rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
}

.robot {
    font-size: 3em;
    position: absolute;
    left: 0;
    transition: left 0.1s linear;
}

.robot-label {
    position: absolute;
    left: 10px;
    top: -20px;
    font-size: 0.9em;
    font-weight: bold;
}

.finish-line {
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    font-size: 4em;
    display: flex;
    align-items: center;
}

.result-screen h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.result-screen p {
    font-size: 1.5em;
    margin: 20px 0;
}

.play-again-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s;
}

.play-again-btn:hover {
    transform: scale(1.1);
}

#winner-screen {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    padding: 60px;
    border-radius: 20px;
}

#loser-screen {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    padding: 60px;
    border-radius: 20px;
}
