:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --item-bg-color: #1e1e1e;
    --item-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    --selected-shadow: 0 0 20px rgba(0, 120, 255, 0.6);
    --button-bg: #0060f1;
    --button-hover-bg: #0056b3;
    --button-highlight-bg: #0088ff;
    --history-bg: #1e1e1e;
    --history-hover-bg: #221d1d;
    --history-border: #333;
    --scroll-bg: #191919;
    --scroll-thumb: #323232;
}
html, body {
    overflow-x: hidden;
}
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #b0b0b0;
    position: relative;
}
.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 5px;
    z-index: 1000;
    height: 55px;
    width: 100px;
    box-shadow: rgba(0, 0, 0, 0.32) 0px 3px 7px;
}
.button:hover {
    background-color: var(--button-hover-bg);
}
.enlarge::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -9px;
    bottom: -10px;
    left: -9px;
    z-index: 1001;
    border-radius: inherit;
    pointer-events: auto;
}
.enlarge2::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -25px;
    bottom: -15px;
    left: -25px;
    z-index: 1001;
    border-radius: inherit;
    pointer-events: auto;
}


#clearBtn {
    position: fixed;
    bottom: 20px;
    right: -10px;
}
#textBtn {
    position: fixed;
    bottom: 160px;
    right: -10px;
}
#eraseBtn {
    position: fixed;
    bottom: 90px;
    right: -10px;
}
#eraseBtn.active {
    background-color: var(--button-highlight-bg);
}
.style-buttons {
    position: fixed;
    bottom: 20px;
    left: -7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 60px;
}
.style-btn {
    width: 60px;
    height: 50px;
}
.style-btn.active {
    background-color: var(--button-highlight-bg);
    color: white;
}
.style-footer {
    font-size: 10px;
    width: 42px;
    height: 240px;
    padding: 5px;
    transform: translate(2px, 235px);
    text-align: center;
    background-color: #0f1a2085;
    color: var(--text-color);
    border-radius: 5px;
}
.button-group {
    width: 292px;
    height: 50px;
    align-items: center;
    z-index: 1001;
}
.message {
    display: inline-block;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    color: var(--text-color);
    pointer-events: none;
    user-select: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#canvas {
    position: absolute;
    border: 1px solid #000;
    box-shadow: rgba(0, 0, 0, 0.32) 0px 34px 35px, rgba(0, 0, 0, 0.12) 0px -12px 20px, rgba(0, 0, 0, 0.12) 0px 4px 6px;
    background-color: white;
    max-height: calc(100vh - 80px);
    max-width: calc((100vh - 80px) * 0.75);
    top: 70px;
    transform: translate(0, 0);
}
#responseCanvas {
    position: absolute;
    display: none;
    top: 70px;
    left: 50%;
    transform: translate(-50%, 0);
    max-height: calc(100vh - 80px);
    max-width: calc((100vh - 80px) * 0.75);
    pointer-events: none;
}
.response-image {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translate(-50%, 0);
    max-height: calc(100vh - 80px);
    max-width: calc((100vh - 80px) * 0.75);
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    display: none;
    pointer-events: none;
}

.fade-in {
    opacity: 1;
    pointer-events: auto;
}

.header {
    position: fixed;
    top: 20px;
    right: 10px;
    display: flex;
    align-items: center;
    z-index: 1000;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--button-bg);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
}


.action-buttons {
    position: absolute;
    top: 20px;
    left: 10px;
    display: flex;
    gap: 8px;
}

.action-buttons .button {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--button-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.action-buttons .button:hover {
    background-color: var(--button-hover-bg);
}

.action-buttons .button i {
    font-size: 18px;
    color: var(--text-color);
}

#undoBtn, #redoBtn, #downloadBtn {
    position: static;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 8px;
    background-color: var(--button-bg);
    transition: width 0.3s ease;
}

.prompt-input {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 240px);
    max-width: 55%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid var(--item-bg-color);
    border-radius: 5px;
}

@media (max-width: 990px) {
    /*.prompt-input {
        left: 170px;
        transform: none;
        width: calc(100% - 340px);
        max-width: none;
    }*/
    .prompt-input {
        left: 198px;
        width: calc(100% - 274px);
        max-width: none;
        transform: none;
    }
}

#captureBtn {
    position: fixed;
    bottom: 20px;
    width: 130px;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    align-items: center;
}
#captureBtn:hover {
    background-color: var(--button-hover-bg);
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border-left-color: var(--button-bg);
    animation: spin 1s linear infinite;
    position: fixed;
    left: 36%;
    top: 19%;
}

#xygenTextInput {
    border: 1px dashed #ddd;
    field-sizing: content;
    outline: none;
    font-size: 80px;
    padding: 5px;
    margin-bottom: 5px;
    -webkit-text-stroke: 3px black;
}
#xygenTextInput:focus {
    border: 1px solid #aaa;
}
#xygenTextInput::placeholder {
    opacity: 0.3;
    color: #000;
}

#textBoxContainer {
    position: fixed;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    pointer-events: none;
    width: 100px;
}
#textBoxContainer.active {
    pointer-events: auto;
}

#saveTextButton {
    height: 40px;
}

.text-box-tools {
    width: 300px;
}

.text-size-button {
    position: absolute;
    width: 40px;
    height: 40px;
}

#decreaseTextSizeButton {
    font-size: 10px;
    left: 110px;
}
#increaseTextSizeButton {
    font-size: 22px;
    left: 155px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}