* {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Comic Sans MS';
    src: url('../fonts/Comic Sans MS.ttf') format('truetype');
}

html, body {
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Comic Sans MS', monospace, sans-serif;
    overflow: hidden;
    background: url(../img/bg.webp) no-repeat center center fixed;
    background-size: cover;;
    position: relative;
    color: #333;
}


@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

/* Control buttons */
.controls {
    display: flex;
    justify-content: space-between;
    position: fixed;
    pointer-events: none;

    left: 0;
    z-index: 1000;
    gap: 10px;
    width: 100%;

    padding: 20px;

    &.top {
        top: 0;
    }
    &.bottom {
        bottom: 0;
    }
}

.btn {
    display: inline-block;
    color: #333;
    text-decoration: none;
    background: #c0c0c0;
    padding: 8px 12px;
    font-size: 16px;
    font-family: 'Comic Sans MS', monospace, sans-serif;
    pointer-events: all;

    border-top: 3px solid #dfdfdf;
    border-left: 3px solid #dfdfdf;
    border-bottom: 3px solid #808080;
    border-right: 3px solid #808080;

    &:active {
        border-top: 3px solid #808080;
        border-left: 3px solid #808080;
        border-bottom: 3px solid #dfdfdf;
        border-right: 3px solid #dfdfdf;

        padding: 10px 10px 6px 14px;
    }

}

#prev-image-btn,
#next-image-btn {
    padding: 8px 22px;

    &:active {
        padding: calc(8px + 2px) calc(22px - 2px) calc(8px - 2px) calc(22px + 2px);
    }
}

/* Hidden file input */
.file-input {
    display: none;
}

/* Drop zone overlay */
.drop-zone {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    border: 3px dashed #fff;
    box-sizing: border-box;
}

.drop-zone-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: white;
    font-size: 2rem;
}

/* Settings dialog */
.settings-dialog {
    padding: 20px 20px 20px 20px;
    min-width: 300px;
    max-width: 400px;
    position: fixed;
    top: 84px;
    right: 20px;
    left: auto;
    margin: 0;
    background: #c0c0c0;

    border-top: 3px solid #dfdfdf;
    border-left: 3px solid #dfdfdf;
    border-bottom: 3px solid #808080;
    border-right: 3px solid #808080;

}

.dialog-header {
    display: flex;
    justify-content: end;
    align-items: center;
}

.dialog-title {
    margin: 0;
}
.close-btn {
    font-size: 30px;
    line-height: 0;
    padding: 10px 24px 15px 10px;
    height: 30px;
    width: 30px;
    outline: none;

    &:focus {
        outline: none;
    }

    &:active {
        padding: 12px 22px 13px 12px;

    }
}

.settings-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-item label {
    display: block;
    margin-bottom: 5px;
}

.setting-item input[type="range"] {
    /* Range input variables - tweak these values */
    --range-height: 24px;
    --range-bg: #a5a5a5;
    --range-border-width: 2px;
    --range-border-dark: #808080;
    --range-border-light: #dfdfdf;
    --range-border-radius: 0px;

    --thumb-size: 20px;
    --thumb-bg: #c0c0c0;
    --thumb-border-width: 2px;
    --thumb-border-dark: #808080;
    --thumb-border-light: #dfdfdf;
    --thumb-border-radius: 0px;

    width: 100%;
    height: var(--range-height);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.setting-item input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: var(--range-height);
    background: var(--range-bg);
    border-top: var(--range-border-width) solid var(--range-border-dark);
    border-left: var(--range-border-width) solid var(--range-border-dark);
    border-bottom: var(--range-border-width) solid var(--range-border-light);
    border-right: var(--range-border-width) solid var(--range-border-light);
    border-radius: var(--range-border-radius);
    box-sizing: border-box;
    box-shadow: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: var(--thumb-size);
    width: var(--thumb-size);
    background: var(--thumb-bg);
    border-top: var(--thumb-border-width) solid var(--thumb-border-light);
    border-left: var(--thumb-border-width) solid var(--thumb-border-light);
    border-bottom: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-right: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-radius: var(--thumb-border-radius);
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb:active {
    border-top: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-left: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-bottom: var(--thumb-border-width) solid var(--thumb-border-light);
    border-right: var(--thumb-border-width) solid var(--thumb-border-light);
}

.setting-item input[type="range"]::-moz-range-track {
    width: 100%;
    height: var(--range-height);
    background: var(--range-bg);
    border-top: var(--range-border-width) solid var(--range-border-dark);
    border-left: var(--range-border-width) solid var(--range-border-dark);
    border-bottom: var(--range-border-width) solid var(--range-border-light);
    border-right: var(--range-border-width) solid var(--range-border-light);
    border-radius: var(--range-border-radius);
    box-sizing: border-box;
}

.setting-item input[type="range"]::-moz-range-thumb {
    height: var(--thumb-size);
    width: var(--thumb-size);
    background: var(--thumb-bg);
    border-top: var(--thumb-border-width) solid var(--thumb-border-light);
    border-left: var(--thumb-border-width) solid var(--thumb-border-light);
    border-bottom: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-right: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-radius: var(--thumb-border-radius);
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: none;
}

.setting-item input[type="range"]::-moz-range-thumb:active {
    border-top: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-left: var(--thumb-border-width) solid var(--thumb-border-dark);
    border-bottom: var(--thumb-border-width) solid var(--thumb-border-light);
    border-right: var(--thumb-border-width) solid var(--thumb-border-light);
}

.dialog-footer {
    margin-top: 20px;
    text-align: center;

    & p {
        text-align: center;
        font-size: 12px;
        margin: 20px 0 0 0;

        & a {
            text-decoration: none;
            color: blue;
        }
    }
}