body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background-color: #f0f0f0;
    box-sizing: border-box;
}

.container {
    width: 80%;
    max-width: 1200px;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    resize: both;
    overflow: auto;
    min-width: 300px;
    min-height: 400px;
}

h1 {
    margin-bottom: 1rem;
    font-size: 1.5em;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.tab-button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tab-button.active {
    background-color: #ddd;
}

.midi-selectors {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.midi-selectors select {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem;
}

.status-message {
    color: #ff0000;
    margin-bottom: 1rem;
    min-height: 1.5em;
}

.tempo-container {
    font-size: 1.5em;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tempo-light {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 auto 1rem;
}

.tempo-light.blink {
    background-color: #ff0000;
}

#generator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

#tempo-input {
    width: 60px;
    font-size: 1rem;
    padding: 0.3rem;
}

.graph-container {
    width: 100%;
    height: 300px;
    margin-bottom: 1rem;
}

.graph-controls {
    padding: 1rem;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.time-span-controls {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.range-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

button, input[type="number"] {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
}

input[type="number"] {
    width: 60px;
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 1rem;
    }

    h1 {
        font-size: 1.2em;
    }

    .tempo-container {
        font-size: 1.2em;
    }
}

/* ... (previous styles remain unchanged) ... */

.graph-controls {
    padding: 1rem;
    background-color: #f0f0f0;
    border-radius: 5px;
}

.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.time-span-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

button, input[type="number"] {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
}

input[type="number"] {
    width: 60px;
}

#generate-tab {
    display: none;
}

#generate-tab.active {
    display: block;
}

/* ... (rest of the styles remain unchanged) ... */