/* General Styles */

html, body {
    width: 100%;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* Editor */

.editor {
    display: flex;
    flex: 1;
    margin: 0 30px 30px 0;
    flex-direction: column;
    gap: 2px;
}

.label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: var(--lightgray);
}

.notes {
    display: grid;
    grid-template-columns: 70px repeat(var(--cols), 1fr);
    gap: 2px;
    flex: 1;
    min-height: 0;
}

.cell {
    background: var(--darkgray);
    height: 100%;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: 0.05s ease;
}

.cell:hover {
    background: var(--gray);
}

.cell.active {
    background: var(--blurple);
    border-color: transparent;
}

.cell.playing {
    filter: brightness(1.2);
    border-right: 2px solid var(--blurple);
}

.cell.active.playing {
    box-shadow: 0 0 8px rgba(129, 140, 248, 0.35);
}

/* Controls */

.controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: var(--darkgray);
    border-top: 1px solid var(--gray);
}

.controls label {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 5px;
    color: var(--lightgray);
}

.controls label span {
    font-size: 1.2em;
    font-weight: bold;
    color: white;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--blurple);
    cursor: pointer;
}

input[type="text"] {
    width: 100%;
    color: white;
    background: var(--gray);
    font-size: 1em;
    text-align: center;
    padding: 10px;
    border: none;
    border-radius: var(--radius);
}

input[type="text"]:focus {
    outline: none;
}

button {
    background: var(--blurple);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: 0.1s ease;
    flex: 0.6;
}

button:hover {
    background: #7289da;
}

/* Responsive Styles */

@media (max-width: 768px) {
    .editor {
        margin: 0;
        padding: 0 20px 20px 0;
        overflow-x: auto;
    }

    .notes {
        min-width: 560px;
    }

    .controls {
        flex-wrap: wrap;
        padding: 10px;
        gap: 5px;
    }

    .controls label {
        flex: 1 1 40%;
    }

    button {
        flex: 1 1 100%;
    }
}
