body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #003366 0%, #B2DFF7 100%); /* Navy blue to light celeste */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, auto);
    gap: 10px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 15px; /* Slightly reduced border radius */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Softer shadow */
    width: 90%;
    max-width: 900px;
    transition: all 0.3s ease;
}

h1 {
    grid-column: span 4;
    font-size: 2.5rem; /* Adjusted font size */
    text-align: center;
    color: #003366; /* Navy blue */
    margin-bottom: 10px;
}

#bpmDisplay {
    grid-column: span 4;
    font-size: 1.6rem; /* Adjusted font size */
    text-align: center;
    font-weight: bold;
    color: #007BFF; /* Light blue */
    margin-bottom: 20px;
}

.control-panel {
    grid-column: span 4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

button, select, input {
    padding: 12px; /* Adjusted padding */
    font-size: 1.1rem;
    border: 1px solid #ddd;
    border-radius: 5px; /* Reduced border radius */
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 100%;
}

button:hover, select:hover, input:hover {
    background-color: #e0f7fa; /* Light hover effect */
}

button:active, input:active {
    background-color: #dcdcdc;
}

#startStopBtn {
    background-color: #28a745; /* Green */
    color: white;
    grid-column: span 2;
    margin-right: 10px;
    border: none; /* No border for button */
    border-radius: 5px; /* Consistent radius */
}

#pauseBtn {
    background-color: #dc3545; /* Red */
    color: white;
    grid-column: span 2;
    margin-left: 10px;
    border: none; /* No border for button */
    border-radius: 5px; /* Consistent radius */
}

.bar-container {
    grid-column: span 4;
    display: flex;
    justify-content: space-between;
    padding: 10px; /* Un poco de padding en general */
    align-items: flex-end; /* Alinear las barras al fondo */
    background-color: #f8f9fa; /* Color de fondo más claro */
    border: 1px solid #e0e0e0; /* Añadir borde para definir el contenedor */
    border-radius: 10px; /* Bordes redondeados para el contenedor */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Sombra sutil para el contenedor */
}

.bar {
    width: 40px;
    height: 120px;
    margin: 0 10px; /* Aumentar el margen para mayor separación */
    background-color: #dcdcdc; /* Light gray */
    border-radius: 8px; /* Aumentar el border radius para un diseño más suave */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Añadir transición para efectos de transformación */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Sombra sutil para las barras */
}

.bar:hover {
    transform: scale(1.05); /* Efecto de aumento al pasar el mouse */
}

.bar.active {
    background-color: #007BFF; /* Active light blue */
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6); /* Sombra brillante para el estado activo */
}

.bar.first {
    background-color: #006629; /* Navy blue */
}


.volume-control, .sound-select, .tempo-select {
    grid-column: span 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

label {
    font-weight: bold;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 5px;
}

input[type="range"] {
    width: 100%;
}

.gradient-bg {
    background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 100%);
    border-radius: 10px;
}

.active-text {
    color: #007BFF; /* Light blue for active text */
    font-size: 1.2rem;
}

select {
    background-color: #f7f7f7;
}

input[type="number"] {
    max-width: 60px;
    text-align: center;
}

.grid-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
}

.grid-panel .column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(8, auto);
        padding: 20px;
    }
    body{
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
        grid-column: span 2;
    }

    #bpmDisplay {
        font-size: 1.5rem;
        grid-column: span 2;
    }

    .control-panel {
        grid-column: span 2;
    }

    button {
        font-size: 1rem;
    }

    .bar-container {
        grid-column: span 2;
        padding: 0 10px;
    }

    .bar {
        width: 30px;
        height: 90px;
    }

    .volume-control, .sound-select, .tempo-select {
        grid-column: span 2;
    }
}
