* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1000px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 30px;
}

.controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

button, select {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    outline: none;
    transition: background 0.2s;
    font-weight: bold;
}

button:hover, select:hover {
    background-color: #0056b3;
}

button:disabled, select:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    color: #666;
}

.playback-controls, .race-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.playback-controls button { background-color: #2ecc71; }
.playback-controls button:hover { background-color: #27ae60; }
.race-btn { background-color: #e67e22; font-size: 18px; padding: 12px 25px; }
.race-btn:hover { background-color: #d35400; }

.arena {
    margin-bottom: 20px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.arena h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
}

.visualizer-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 450px; /* Increased from 250px */
    gap: 4px;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}
.bar {
    width: 30px;
    background-color: #3498db;
    border-radius: 3px 3px 0 0;
    transition: background-color 0.1s;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    color: white;
    font-size: 12px;
    padding-bottom: 5px;
    user-select: none;
}

/* Drag and Drop Styles */
.bar.draggable {
    cursor: grab;
}
.bar.draggable:active {
    cursor: grabbing;
}
.bar.dragging {
    opacity: 0.4;
    border: 2px solid #2ecc71;
}
.bar.drag-over {
    border: 2px dashed #e74c3c;
    transform: scale(1.05);
    background-color: #e74c3c !important;
}

.info-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card {
    background: #e9ecef;
    padding: 20px;
    border-radius: 8px;
}
.step-container {
    margin-top: 15px;
    padding: 10px;
    background: white;
    border-left: 4px solid #007bff;
}
/* Insertion Line Indicators */
.bar.drop-indicator-left {
    border-left: 4px solid #e67e22;
    margin-left: -2px; /* Prevent layout shifting */
}

.bar.drop-indicator-right {
    border-right: 4px solid #e67e22;
    margin-right: -2px;
}

/* Remove the old scaling/background highlight for a cleaner look */
.bar.drag-over {
    background-color: #3498db !important; 
    transform: none;
    border: none;
}
.darkmode input{
    font-size: 15pt; 
    font-weight: bold;
    float: right; 
    background-color: #ff4000;
    color: white;
    border: none;
    border-radius: 5px;

}