:root {
    --equal-spacing: 0px;
    --button-height: 2.5em;
    --button-width: 3.5em;
    --button-padding: 0.5em;
    --button-font-size: 16px;
    --border-radius: 10px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --light-grey: #bfc7d0;
    --light-grey-hover: #a9b0b8;
    --light-red: #df747e;
    --light-purple: #906bd6;
    --success-color: #28A745;
    --success-hover: #1e7e34;
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --text-color: #111;
    --white-color: white;
    --border-color: #ccc;
    --canvas-width: 800px;
    --canvas-height: 600px;
}

body {
    background: var(--light-grey);
    margin: 0;
    padding: 0.5em;
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 16px;
    font-weight: normal;
}

h1 {
    margin-bottom: var(--equal-spacing);
    text-align: center;
}

.toolbar {
    width: var(--canvas-width);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1em;
    padding: 1em;
    margin: 0.5em auto;
    margin-bottom: 1em;
    box-shadow: var(--box-shadow);
    box-sizing: border-box;
    min-height: fit-content;
    max-height: 2*var(--button-height);
    background: var(--white-color);
    border: none;
    border-radius: var(--border-radius);
}

canvas {
    width: var(--canvas-width);
    height: var(--canvas-height);
    display: block;
    margin-top: var(--equal-spacing);
    margin: 0.5em auto;
    margin-bottom: 1em;
    box-shadow: var(--box-shadow);
    min-height: fit-content;
    max-height: 2*var(--button-height);
    background: var(--white-color);
    border: none;
    border-radius: var(--border-radius);
}

button,
select {
    height: var(--button-height);
    padding: var(--button-padding);
    font-size: var(--button-font-size);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: auto;
    min-width: 0;
    cursor: pointer;
    transition: var(--transition);
}

select {
    background-color: var(--light-grey);
    text-align: center;
    text-align-last: center;
}

.toolbar button {
    width: auto;
    min-width: var(--button-width);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 var(--button-padding);
    white-space: nowrap;
    box-sizing: border-box;
}

.toolbar .fa-solid {
    font-size: 1.5em;
}

select:hover {
    background-color: var(--light-grey-hover);
}

#openImage:hover {
    background-color: var(--light-grey-hover);
}

#upload:hover {
    background-color: var(--light-grey-hover);
}

#download:hover {
    background-color: var(--light-grey-hover);
}

#reset:hover {
    background-color: var(--light-red);
}

#help:hover {
    background-color: var(--light-purple);
}

#detectBlobs:hover {
    background-color: var(--light-grey-hover);
}

#addImage:hover {
    background-color: var(--light-grey-hover);
}

.note-button:hover {
    background-color: var(--light-grey-hover);
}

.spore-mode-on {
    background-color: var(--success-color);
}

.spore-mode-off {
    background-color: var(--light-grey);
}

.spore-mode:hover {
    background-color: var(--success-hover);
}

.scale-mode-on {
    background-color: var(--primary-color);
}

.scale-mode-off {
    background-color: var(--light-grey);
}

.scale-mode:hover {
    background-color: var(--primary-hover);
}

.text-center {
    text-align: center;
}

footer {
    display: flex;
    justify-content: center;
    width: var(--canvas-width);
    margin: 0.5em auto;
}

footer i {
    color: black;
    font-size: 1.5em;
    padding: 0 10px;
}

footer .fa-house:hover {
    color: var(--success-hover);
    cursor: pointer;
}

footer .fa-github:hover {
    color: var(--primary-hover);
    cursor: pointer;
}

footer .fa-circle-question:hover {
    color: var(--light-purple);
    cursor: pointer;
}