body {
    font-family: 'Outfit', sans-serif;
    background-color: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    box-sizing: border-box;
}

h1 {
    font-size: 100px;
    margin-left: 0px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.dropdowns, #chartContainer {
    margin: 20px 0;
    margin-left: -80px;
    margin-right: 250px;
}

button {
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    margin-left: 80px;
}

.chart-grid-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

#timeSignatureIndicator {
    font-size: 40px;
    margin-top: 50px;
    margin-left: 100px;
    margin-right: 80px;
}

.chart-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-bar {
    border-left: 2px solid white;
    border-right: none;
    border-top: none;
    border-bottom: none;
    padding: 10px;
    width: 230px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-row .chart-bar:last-child {
    border-right: 2px solid white;
}

.chart-bar input {
    width: 100%;
    height: 100%;
    background: transparent;
    color: white;
    border: none;
    text-align: left;
    font-size: 40px;
}

.dropdowns {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.dropdowns div {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.dropdowns label {
    margin-right: 10px;
    font-size: 25px;
}

.dropdowns select {
    display: inline-block;
    font-size: 20px;
}

.dropdowns-and-button {
    display: flex;
    align-items: center;
    margin-left: 70px;
    gap: 20px; /* Increased gap to add space around the New Chart button */
}

#createChart {
    order: -1; /* Ensures the New Chart button appears first in line */
    margin-right: 100px; /* Add margin to separate it from the dropdowns */
    margin-left: -260px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        max-width: 100%;
        padding: 10px;
        min-height: auto;
        transform: scale(0.85); /* Adjust the scale as needed */
        transform-origin: top center;
    }

    #chartContainer {
        padding-left: 70px; /* Adjust to the width of a single .chart-bar */
    }    

    /* Adjust font sizes */
    h1 {
        font-size: 36px;
        margin: 10px 0;
    }

    #timeSignatureIndicator {
        font-size: 20px;
        margin: 30px 0;
        margin-right: -5px;
    }

    .dropdowns label,
    .dropdowns select,
    button {
        font-size: 14px;
    }

    /* Adjust button and dropdown layout */
    .dropdowns {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        margin-left:-15px;
        margin-right:220px;
    }

    .dropdowns-and-button {
        flex-direction: row; /* Keep buttons in a row */
        align-items: center;
        justify-content: space-between; /* Distribute space evenly */
        gap: 5px; /* Reduce gap for tighter layout */
        margin-left: 20px; /* Remove left margin to reduce space */
        margin-right: 100px; /* Remove right margin to reduce space */
        width: 100%; /* Ensure full width for better spacing */
    }

    button {
        margin-left: -200px; /* Remove extra left margin to reduce space */
        margin-right: 220px;
        padding: 0px 0px; /* Adjust padding as needed */
    }
    
    /* Compact Chart Bars */
    .chart-bar {
        width: 70px; /* Smaller width for full four-column fit */
        height: 40px;
        padding: 5px;
    }

    .chart-bar input {
        font-size: 16px; /* Smaller font to match bar size */
    }

    /* Horizontal Scrolling as a backup */
    .chart-grid-container {
        overflow-x: auto;
        display: inline-flex;
        padding-bottom: 5px;
    }

    .chart-row {
        gap: 5px; /* Reduced gap for tighter layout */
        margin-bottom: 8px;
    }

    #createChart {
        margin-right: 20px; /* Remove right margin to reduce space */
        margin-left:-60px; /* Remove left margin to reduce space */
    }
}

