body {
    font-family: 'Roboto', sans-serif;
    background-color: color(srgb 0.84 0.84 0.84);
    color: #333;
    margin: 0;
    padding: 0;
    width: 98vw;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    border: 3px solid color(srgb 0.0088 0.3428 0.3271);
    margin-top: 5px;
}

button {
    background-color: #025753;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    margin-right: 20px;
}

button:hover {
    background-color: #4caf50;

    transform: translateY(-2px);

}

button:active {
    transform: translateY(1px);

}


#cursorButton::before {
    content: "\f245";

    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    z-index: 1000;
}


#brushButton::before {
    content: "\f303";

    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    z-index: 1000;
}


#eraserButton::before {
    content: "\f12d";

    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    z-index: 1000;
}

#emojiButton::before {
    content: "\f118";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
    z-index: 1000;
}

.upload-label {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.upload-label:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.upload-label:active {
    transform: translateY(1px);
}


#resolutionContainer {
    display: flex;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    padding: 20px;
    max-width: 600px;
    border: 2px solid #333;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 10px 9px 38px rgba(0, 0, 0, 1);
    flex-wrap: wrap;
}


.customCursor {
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #007BFF;
    border-radius: 50%;
    display: none;
    position: absolute;
    pointer-events: none;
    transition: transform 0.1s ease;
}

#cursorIcon {
    font-size: 1.5em;
    color: #007BFF;
}

#facesContainer {
    display: flex;
    flex-wrap: wrap;
}

.faceBox {
    margin: 10px;
    text-align: center;
    cursor: pointer;
    width: 100px;
    height: 100px;
    border-radius: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

canvas {
    max-height: none;
}

#downloadButton,
#copyButton {
    background-color: #4CAF50;

    color: white;

    font-size: 18px;

    padding: 10px 20px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    height: 50px;

    width: auto;

    text-align: center;

    display: inline-block;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    transition: background-color 0.3s ease, transform 0.2s ease;

}

#downloadButton:hover,
#copyButton:hover {
    background-color: #45a049;

    transform: translateY(-2px);

}

#downloadButton:active,
#copyButton:active {
    transform: translateY(1px);

}

.custom-file-input {
    display: none;

}

.upload-label {
    background-color: #4CAF50;

    color: white;

    font-size: 18px;

    padding: 10px 20px;

    border: none;

    border-radius: 5px;

    cursor: pointer;

    height: 30px;

    line-height: 30px;

    text-align: center;

    display: inline-block;

    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    transition: background-color 0.3s ease, transform 0.2s ease;

}

.upload-label:hover {
    background-color: #45a049;

    transform: translateY(-2px);

}

.upload-label:active {
    transform: translateY(1px);

}


#resolutionContainer {
    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0 auto;

    padding: 20px;

    max-width: 300px;

    border: 2px solid #333;

    border-radius: 10px;

    background-color: #f9f9f9;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

}

.field-container {
    display: flex;
    align-items: center;
    flex-direction: column;
}

#resolutionContainer label {
    font-size: 1em;
    margin-right: 2px;
    color: #555;
}

#resolutionContainer input[type="number"] {
    width: 70px;
    padding: 5px;
    font-size: 1.2em;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

#resolutionContainer input[type="number"]:focus {
    border-color: #007BFF;
    outline: none;
}

.upload_zone {

    background-color: rgb(3, 87, 83);
    margin: 0;
}

.blur-title {
    background-color: color(srgb 0.7505 0.7854 0.8021);
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    border-radius: 150px;
    border: 4px solid rgb(3, 87, 83);
    padding-top: 10px;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-5px, 5px);
    }

    40% {
        transform: translate(5px, -5px);
    }

    60% {
        transform: translate(-5px, -5px);
    }

    80% {
        transform: translate(5px, 5px);
    }

    100% {
        transform: translate(0);
    }
}

.tools {
    padding-top: 10px;
    padding-bottom: 10px;
}

.subtitle {
    font-size: 24px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    text-align: center;
    color: #025753;
    margin: 0;
    display: inline-block;
    font-family: italic;
    width: 100%;
    background-color: color(srgb 0.905 0.905 0.905);
    padding-top: 10px;
    padding-bottom: 10px;
}

.export_zone {
    background-color: color(srgb 0.0088 0.3428 0.3271);
    padding: 20px;
}

.collapsible i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.collapsible.active i {
    transform: rotate(90deg);
}

.footer {
    background-color: rgb(96, 96, 96);
}

.footer-accordion {
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.footer-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    font: 500 18px/1.2 "Roboto", system-ui, -apple-system, Segoe UI, Arial;
    color: #fff;
    background: #2f2f2f;
    border: none;
    cursor: pointer;
    border-radius: 0;
    margin-bottom: 0px;
}

.footer-trigger:hover {
    background-color: rgb(3, 87, 83);
    border: 2px solid white;
    transform: none;
}

.footer-trigger:focus-visible {
    outline: 3px solid #fff7;
    outline-offset: 2px;
}

.footer-trigger__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-trigger .fa-chevron-down {
    transition: transform .25s ease;
}

.footer-trigger[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.footer-content {
    padding: 6px 10px 14px;
}


.sub-accordion {
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.sub-accordion:last-child {
    border-bottom: none;
}

.sub-accordion__btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 12px;
    background: transparent;
    color: #fff;
    font: 500 16px/1 "Roboto", system-ui, -apple-system, Segoe UI, Arial;
    cursor: pointer;
    background-color: rgb(83, 83, 83);
    border: 1px solid white;
}

.sub-accordion__btn:hover {
    background-color: rgb(3, 87, 83);
}

.sub-accordion__btn .fa-chevron-right {
    transition: transform .22s ease;

}

.sub-accordion__btn .fa-chevron-down {
    transition: transform .22s ease;

}

.sub-accordion__btn i {
    padding-right: 10px;
}

.sub-accordion__btn[aria-expanded="true"] .fa-chevron-right {
    transform: rotate(90deg);
}



.sub-accordion__panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
    padding: 0 10px;
    background-color: rgb(193, 193, 193);
    margin-bottom: 10px;
}

.sub-accordion__panel[data-open] {

    padding: 8px 10px 14px;
}


.sub-accordion__panel p {
    margin: 0 0 10px;
    line-height: 1.55;
}

.sub-accordion__panel a {
    color: #1a261d !important;
    text-decoration: underline;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loadingSpinner {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid color(srgb 0.0088 0.3428 0.3271);
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-direction: column;
}

.mode-button {
    width: 50px;
    height: 46px;
    border-radius: 50%;
    border: 3px solid transparent;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: border 0.3s, transform 0.2s;
}


#blurModeButton {
    background-image: url('images/blur.png');
    background-color: #065753;
}


#emojiModeButton {
    background-image: url('images/emoji.png');
    background-color: #065753;
}


.mode-button.selected {
    border: 3px solid white;
    transform: scale(1.1);
    border-radius: 20%;
}


.mode-button:hover {
    border: 3px solid #007BFF;
    transform: scale(1.1);
}

.mode-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1;
}


.mode-button::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}


.mode-button:hover::before,
.mode-button:hover::after {
    opacity: 1;
}

.button {
    border: none !important;
}

.button.active {
    border: 3px solid white !important;
}

#outputCanvas {
    touch-action: pinch-zoom;
}

#sizeSlider {
    touch-action: none;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #023432;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    max-width: 800px;
    position: relative;
    color: white;
    margin-top: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#emojiList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    justify-content: center;
    background-color: color(srgb 0.2411 0.2917 0.2476);
    padding: 0px;
    border-radius: 10px;
    border: 3px solid white;
}

#emojiListTool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    justify-content: center;
    background-color: color(srgb 0.2411 0.2917 0.2476);
    padding: 0px;
    border-radius: 10px;
    border: 3px solid white;
}

.emoji-item {
    font-size: 1.5rem;
    background: none;
    border: 1px solid #ccc;
    cursor: pointer;
    border-radius: 5px;
    width: 2.5rem;
    height: 2.5rem;
    text-align: center;
    line-height: 2.3rem;
    padding: 0.5rem;
    background-color: #4caf50;
}

.emoji-item:hover {
    background: #eee;
    transform: scale(250%);
}

.emoji-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    transition: max-height 0.4s ease;
}

.choose-emoji-button {
    position: absolute;
    width: 50px;
    font-size: 40px;
    margin-top: -90px;
    align-items: center;
    border-radius: 50%;
    margin-left: -15px;
    height: 50px;
    padding-left: 5px;
    padding-top: 15px;
}

.choose-emoji-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}


.choose-emoji-button::after {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.choose-emoji-button:hover::before,
.choose-emoji-button:hover::after {
    opacity: 1;
}


.reset-position-button {
    position: absolute;
    width: 30px;
    font-size: 20px;
    border-radius: 50%;
    height: 30px;
    padding-left: 5px;
    padding-top: 12px;
    margin-top: 90px;
    margin-left: 80px;
    border: 1px solid color(srgb 0.0004 0.501 0);
}


.reset-position-button::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1000;
}


.reset-position-button::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000;
}

.reset-position-button:hover::before,
.reset-position-button:hover::after {
    opacity: 1;
}


#skinToneButtons {
    margin: 0px;
    display: flex;
    padding: 10px 20px 3px;
    width: 100%;
    background-color: #5e8460;
    justify-content: center;
    gap: 5px;
}

#skinToneButtons button {
    margin-right: 5px;
    padding: 4px 8px;
    border: 1px solid #888;
    cursor: pointer;
    border-radius: 4px;

}

#skinToneButtons button:hover {
    background-color: #ddd;
    transform: scale(150%);

}

#skinToneButtons button.active {
    background-color: #ccc;
    color: #025753;
}

.people-list {
    display: none;
    margin-top: 6px;
    flex-wrap: wrap;
}

.panelChoiceBtn {
    display: flex;
    background-color: #c2d5c3;
    margin-top: 0px;
    width: 100%;
    padding: 10px 20px 0px 20px;
    justify-content: center;
}

.people-panel {
    padding: 0px 20px;
}


.hidden {
    display: none !important;
}

.canvas-container {
    display: inline-block;
    position: relative;
    width: 100% !important;
    line-height: 0;

}

#outputCanvas,
#fabricCanvas {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
}

#canvasContainer {
    position: relative;
    overflow: hidden;
}

.upper-canvas {
    width: 100% !important;
    height: auto !important;
}

body.emoji-mode #fabricCanvas {
    pointer-events: auto;
}


@keyframes softBlink {
    0% {
        border-radius: 50%;
    }

    10% {
        border-radius: 45%;
    }

    20% {
        border-radius: 40%;
    }

    30% {
        border-radius: 35%;
    }

    40% {
        border-radius: 30%;
    }

    50% {
        border-radius: 25%;
    }

    60% {
        border-radius: 30%;
    }

    70% {
        border-radius: 35%;
    }

    80% {
        border-radius: 40%;
    }

    90% {
        border-radius: 45%;
    }

    100% {
        border-radius: 50%;
    }
}

.blink-border {
    animation: softBlink 2.5s ease-in-out infinite;
    border: 10px solid rgb(255, 255, 0) !important;
}


#dropOverlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2000;
}

#dropOverlay.visible {
    display: flex;
}

#dropOverlayBox {
    background: #fff;
    border: 4px dashed #0a0;
    border-radius: 10px;
    padding: 40px 60px;
    text-align: center;
    max-width: 80vw;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#dropIcon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 12px;
}

#dropText {
    font-size: 18px;
    font-weight: 600;
}


#dropOverlay.ok #dropOverlayBox {
    border-color: #16a34a;
}

#dropOverlay.ok #dropIcon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f093";
    font-size: 2em;
    display: inline-block;
    color: #16a34a;
}


#dropOverlay.error #dropOverlayBox {
    border-color: #c62828;
}

#dropOverlay.error #dropIcon::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f057";
    font-size: 2em;
    display: inline-block;
    color: #c62828;
}

#dropOverlay.error #dropText {
    color: #c62828;
}