@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    background-attachment: fixed;
}

#gameContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    height: 100vh;
    min-width: 800px;
    box-sizing: border-box;
}

#canvas {
    border: 2px solid #00ff88;
    border-radius: 15px;
    background: radial-gradient(circle at center, #001122 0%, #000000 100%);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

#controls {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    width: 800px;
    gap: 15px;
}

#buttonRow {
    display: flex;
    gap: 20px;
}

#buttonRow button {
    flex: 1;
}

.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(10px);
}

label {
    font-size: 14px;
    font-weight: 700;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 200px;
}

input[type="range"] {
    width: 300px;
    height: 8px;
    background: linear-gradient(to right, #00ff88, #00ffff);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.value-display {
    font-weight: 900;
    color: #00ffff;
    font-size: 16px;
    min-width: 50px;
    text-align: right;
}

select {
    padding: 5px 10px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 5px;
    color: #00ff88;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    min-width: 500px;
}

button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.5);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

#stats {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    width: 800px;
    gap: 15px;
}

.stat-box {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    text-align: center;
    flex: 1;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.stat-label {
    font-size: 12px;
    font-weight: 400;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 900;
    color: #00ffff;
}

#leaderboard {
    margin-top: 20px;
    width: 800px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
    min-height: 250px;
}

#leaderboard h3 {
    margin: 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00ff88;
}

#leaderboardList {
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

#leaderboardList::-webkit-scrollbar {
    width: 8px;
}

#leaderboardList::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#leaderboardList::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 4px;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.leaderboard-item:hover {
    background: rgba(0, 255, 136, 0.1);
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-weight: 900;
    color: #00ff88;
    margin-right: 10px;
}

.fitness {
    color: #00ffff;
    font-weight: 700;
}

.status {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status.active {
    color: #00ff88;
}

.status.finished {
    color: #ffaa00;
}

.status.crashed {
    color: #ff4444;
}

/* Animation for progress bars */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.generating {
    animation: pulse 1s ease-in-out infinite;
}

#titleScreen {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 21px;
    width: 800px;
    height: 800px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 10;
    text-align: center;
    border-radius: 15px;
}

#titleScreen h1 {
    font-size: 48px;
    color: #00ff88;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.7);
}

#titleScreen h2 {
    font-size: 24px;
    color: #00ffff;
    margin: 40px 0;
}

#titleScreen p {
    font-size: 16px;
    color: #00ff88;
    margin-bottom: 0;
}
#editorContainer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#editorControls {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

#trackEditor {
    border: 2px solid #ffaa00;
    border-radius: 15px;
    background: #111;
}
#trackData {
    width: 800px;
    margin-top: 10px;
    background: #222;
    color: #fff;
    border: 1px solid #ffaa00;
    border-radius: 10px;
    padding: 10px;
    font-family: monospace;
}
.attribute-container {
    display: flex;
    align-items: center;
}

.attribute-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 0 10px;
    overflow: hidden;
    width: 300px;
}

.attribute-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #00ff88, #00ffff);
    width: 40%;
}

.attr-btn {
    padding: 5px 10px;
    min-width: 30px;
}
