body {
    font-family: 'Poppins', sans-serif; /* A more modern font */
    background: linear-gradient(135deg, #1a1a1a, #000000); /* Darker, gradient background */
    color: #f0f0f0;
    margin: 0;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top for better scrolling on content */
    min-height: 100vh;
}

#main-container {
    width: 95%;
    margin: 0 auto;
    text-align: center;
    background-color: rgba(25, 25, 25, 0.9); /* Semi-transparent dark background */
    border-radius: 15px;
    padding: 2.5rem;
}

h1 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 2.2em;
}

p {
    color: #b0b0b0;
    margin-bottom: 2rem;
}

input[type="file"] {
    margin: 1.5rem 0;
    padding: 10px;
    border: 1px solid #ffffff;
    border-radius: 5px;
    background-color: #0d0d0d;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    background-color: #ffffff;
    color: #1a1a1a;
}

/* Visualizer Customization Controls */
#visualizer-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
    background-color: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
}

#visualizer-controls.hidden {
    display: none;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.8em;
    color: #aaa;
}

.control-group select, .control-group input {
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 0.3rem;
}

/* Master Controls Styling */
#master-controls {
    background-color: #1a1a1a;
    padding: 1.2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center; /* Center items */
    gap: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #333;
}

#master-controls.hidden {
    display: none;
}

#play-pause-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px; /* Pill shape */
    cursor: pointer;
    font-size: 1.1rem;
    min-width: 90px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#play-pause-btn:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

#seek-bar, #volume-control {
    -webkit-appearance: none; /* Override default browser styles */
    height: 8px;
    border-radius: 5px;
    background: #555;
    outline: none;
    transition: background 0.2s ease-in-out;
    cursor: pointer;
}

#seek-bar::-webkit-slider-thumb, #volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

#seek-bar {
    flex-grow: 1; 
    max-width: 400px; /* Limit seek bar width */
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #ffffff;
    font-size: 1.2rem;
}

#volume-control {
    width: 80px;
}

/* Visualizer Grid Styling */
#visualizer-grid-container {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Responsive columns */
    gap: 0rem; /* Space between visualizers */
    justify-content: center; /* Center items in the grid */
    align-items: flex-end; /* Align bars to the bottom of the grid cells */
    min-height: 250px; /* Ensure some height even with no tracks */
}

.visualizer-column {
    display: flex;
    flex-direction: column; /* Stack bars vertically */
    align-items: center; /* Center canvas within its grid cell */
    justify-content: flex-end; /* Bars start from bottom */
    height: 750px; /* Fixed height for each visualizer column */
    position: relative;
    overflow: hidden; /* Prevent bars from going outside */
    cursor: grab; /* Indicate that the column is draggable */
}

.visualizer-column.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.visualizer-column canvas {
    width: 100%; /* Take full width of its column */
    height: 100%; /* Take full height to render vertical bars */
    background-color: transparent; /* Let the column background show */
}

/* Track Label Styling */
.track-label {
    width: 90%;
    background-color: transparent;
    border: 0px;
    color: #f0f0f0;
    text-align: center;
    padding: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.9em;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.track-label:focus {
    outline: none;
    border-color: #ffffff;
    background-color: #1a1a1a;
}