/* Background */
/* ================================================================ */

body {
    font-family: Arial;
    background: #181818;
    text-align: left;
    padding: 8px;
    max-width: 960px;
    margin: auto;
    color: #FFFFFF;
}

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 10px 0;
}

hr {
    border: 2px solid #404040;
}

/* Text */
/* ================================================================ */

h1 {
    font-size: 32px;
    text-align: center;
}

h2 {
    font-size: 28px;
}

p {
    font-size: 16px;
    line-height: 24px;
    margin: 8px 0px;
}

code {
    background: #000000;
    padding: 2px 6px;
    border-radius: 4px;
}

label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

/* Button */
/* ================================================================ */

button {
    background: #2080FF;
    color: #FFFFFF;
    box-sizing: border-box;
    border: 0 solid #000;
    max-width: 240px;
    padding: 6px 10px;
    margin: 6px 6px 6px 0px;
    font-size: 20px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

button:active {
    background: #0060E0;
}

button:disabled {
    background: #606060;
    cursor: not-allowed;
}

/* Input */
/* ================================================================ */

input {
    width: 80px;
    height: 32px;
    background: #000000;
    color: #e8e8e8;
    border: 1px solid #2b2b2b;
    border-radius: 8px;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 20px;
}

/* Text area */
/* ================================================================ */

textarea {
    width: 100%;
    height: 200px;
    min-height: 160px;
    background: #000000;
    color: #FFFFFF;
    border: 1px solid #606060;
    padding: 12px;
    font-family: monospace;
    font-size: 16px;
    box-sizing: border-box;
    resize: vertical;
    border-radius: 4px;
}

/* Canvas */
/* ================================================================ */

canvas {
    display: block;
    margin: auto;
}

/* Level selector */
/* ================================================================ */

.level-selector {
    margin: 12px auto 12px auto;
    display: grid;
    grid-template-columns: repeat(6, 48px);
    gap: 12px;
    justify-content: center;
    user-select: none;
}

.level-selector button {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: none;
    background: #303030;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 24px;
    cursor: pointer;
    margin: 0;
}

.level-selector button:active {
    transform: translateY(2px);
}

.level-selector button[aria-current="true"] {
    outline: 2px solid #00A0FF;
    background: #004080;
}

.level-selector button.completed {
    background: #008000;
}

.level-selector button[aria-current="true"].completed {
    outline: 2px solid #00C000;
    background: #006000;
}

/* Mobile controls */
/* ================================================================ */

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 12px auto;
    max-width: 400px;
}

.controls-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 12px;
}

.controls button {
    font-size: 32px;
    width: 80px;
    height: 64px;
    border-radius: 8px;
    margin: 0;
    border: none;
    background: #404040;
    color: #FFFFFF;
}

#btn-reset {
    text-align: center;
    font-size: 24px;
    width: 192px;
    height: 48px;
}

.controls button:active {
    background: #505050;
    transform: translateY(4px);
}

/* Block selector */
/* ================================================================ */

.block-selector {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: none;
    background: #303030;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    cursor: pointer;
}

.block-selector.selected {
    outline: 2px solid #00A0FF;
    background: #004080;
}

/* Editor */
/* ================================================================ */

.editor-dimensions {
    margin: 0 auto;
    flex-wrap: wrap;
}
