html,
body {
    margin-bottom: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    background-color: rgb(26, 26, 26);
    font-family: sans-serif;
}

input[type="file"] {
    display: none;
}

.importers > * {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 10px;
    margin-right: 12px; /* 👈 add spacing between buttons */
    background: linear-gradient(45deg, rgb(227, 0, 114), rgb(115, 0, 255));
    color: white;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 20px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.importers > *:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    transform: scale(1.05); /* 120% */
}

.importers {
    position: relative;
    left: 10px;
    display: inline-block;
    cursor: pointer;
    color: white;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.discord_link {
    position: absolute; /* or fixed, or relative depending on context */
    left: calc(100% - 70px);
    top: 10px;
    transition: all 0.3s ease;
}

.discord_link:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    transform: scale(1.1) rotate(3deg);
}

.discord_icon {
    width: 60px;
}

.settings_img {
    width: 20px;
    height: 20px;
    position: relative;
    left: 10px;
    top: 4px;
    transition: transform 0.3s ease;
}

.settings_label {
    position: relative;
    left: 0px;
    top: -2px;
}

/* Define the animation */
@keyframes rotateInfinitely {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Apply animation on hover */
.modalSettingsBtn:hover .settings_img {
    animation: rotateInfinitely 1.5s linear infinite;
}

.modalSettingsBtn {
    line-height: 20px;
    margin-left: 5px;
    margin-right: 5px;
    position: relative;
    left: 10px;
    width: 100px;
    text-align: left;
    padding: 5px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.modalSettingsBtn:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    transform: scale(1.05); /* 120% */
}

.breaker {
    width: 100%;
    height: 15px;
    flex: 0 0 auto;
    background: linear-gradient(45deg, rgb(227, 0, 114), rgb(115, 0, 255));
    border-radius: 4px;
}

.main_window_outline {
    overflow: hidden; /* <-- add this */
    position: relative;
    width: 1506px;
    height: calc(1510px / 1.7777777);
    margin: 10px;
    border-radius: 15px;
    background: linear-gradient(45deg, rgb(227, 0, 114), rgb(115, 0, 255));
    flex: 0 0 auto;
}

.main_window {
    overflow: hidden; /* <-- add this */
    position: relative;
    width: 1500px;
    height: calc(1500px / 1.7777777);
    margin: 3px;
    border-radius: 14px;
    flex: 0 0 auto;
}

.bg_image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 14px;
}

.addElements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    color: white;
}

.addElements > * {
    margin-left: 5px;
    margin-right: 5px;
    padding: 5px;
    padding-left: 30px;
    padding-right: 30px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.addElements > *:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
}

.utilElement:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
}

.utilElements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    color: white;
}

.utilElement {
    margin-left: 5px;
    margin-right: 5px;
    padding: 5px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.propertyInputButton {
    margin-top: 4px;
    padding: 6px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.propertyInputButton:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
}

.draggable-panel {
    position: absolute;
    width: 150px;
    height: 150px;
    background-color: rgb(0, 0, 255);
    outline: 2px solid black;
    cursor: grab;
    z-index: 100;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.draggable-canvas {
    position: absolute;
    background-color: rgba(255, 255, 255, 0);
    outline: 2px solid black;
    cursor: grab;
    z-index: 100;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    image-rendering: pixelated;
}

.draggable-button {
    image-rendering: pixelated;
}

.isEditableLabel {
    color: rgb(155, 155, 155);
    font-size: small;
}

.properties {
    margin: 10px;
    margin-right: 20px;
    padding: 10px;
    background-color: rgb(39, 39, 39);
    border-radius: 10px;
    color: white;
    min-height: 50px;
}

.propertyInput {
    width: 300px;
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 5px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.resize-handle {
    width: 15px;
    height: 15px;
    background-color: rgb(128, 128, 128);
    position: absolute;
    left: calc(100% - 15px);
    top: calc(100% - 15px);
    cursor: nwse-resize;
    border-top-left-radius: 5px;
}

.buttons {
    display: flex;
    flex-direction: column; /* Arrange elements vertically */
    align-items: start; /* Align buttons to the left */
    gap: 10px; /* Add spacing between buttons */
    background-color: rgb(39, 39, 39);
    border-radius: 10px;
    margin: 10px;
}

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

/* Modal Content Box */
.modal-content {
    background-color: #424242;
    margin: 10% auto;
    padding: 20px;
    border: 2px solid #9900ff;
    width: fit-content;
    border-radius: 8px;
    z-index: 100;
}

/* Close button */
.modalClose {
    color: #ff008c;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    left: calc(fit-content);
    transition: transform 0.3s ease;
}
.modalClose:hover {
    color: rgb(255, 0, 212);
    transform: scale(1.2);
}

.modalHeader {
    color: white;
}

.modalOptionLabel {
    color: rgb(155, 155, 155);
    text-align: left;
    font-weight: 500;
}

.modalOptionBody {
    color: rgb(189, 189, 189);
    text-align: left;
    font-weight: 500;
}

.modalOptionInput {
    margin-left: 5px;
    margin-right: 5px;
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 5px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.modalSubmitButton {
    margin-top: 10px;
    font-size: 28px;
    padding: 5px;
    width: 100%;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.modalSubmitButton:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
}

/* ==================== */

.main {
    display: flex;
}

.scripter {
    display: flex;
    margin-right: 20px;
    margin-top: 10px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    color: white;
    flex: 1;
    height: calc(1510px / 1.7777777);
    background-color: rgb(39, 39, 39);
    border-radius: 10px;
}

.scripter_text {
    height: 400px;
    border-radius: 10px;
    margin: 10px;
    text-align: left;
    background-color: #424242;
    outline: rgb(153, 0, 255) 2px solid;
    border: none;
    resize: none;
    white-space: nowrap;
}

.scripter_buttons {
    margin-left: 10px;
    margin-right: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    text-align: center;
    color: white;
}

.scripter_buttons > * {
    padding: 5px;
    width: 50%;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(80, 77, 77) 1px solid;
}

.scripter_buttons > *:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
}

.scripter_title_label {
    margin-top: 10px;
    font-size: 1.3em;
}

.draggable-scrolling_panel {
    height: 300px; /* Set a height */
    overflow-y: scroll; /* Enable vertical scrolling */
    overflow-x: hidden; /* Optional: hide horizontal scroll */
    scroll-behavior: smooth; /* Optional: smooth scrolling effect */
}

.draggable-scrolling_panel::-webkit-scrollbar {
    display: none;
}

.bindings {
    height: 260px;
    width: calc(100% - 20px);
    border-radius: 10px;
    margin: 10px;
    align-self: center;
    text-align: left;
    background-color: #424242;
    outline: rgb(153, 0, 255) 2px solid;
    color: white;
    border: none;
    resize: none;
    white-space: pre;
    overflow-x: auto;
    font-size: 20px;
    scrollbar-color: rgb(0, 0, 0) rgb(73, 73, 73);
}

.gridable {
    position: absolute; /* so absolute children still position relative to the panel */
    background-image: linear-gradient(to right, rgba(55, 55, 55, 1) 2px, transparent 2px), linear-gradient(to bottom, rgba(55, 55, 55, 1) 2px, transparent 2px);
    background-size: calc(100% / var(--grid-cols)) calc(100% / var(--grid-rows));

    background-position: -1px -1px; /* X offset, Y offset */

    width: 100%;
    height: 100%;
}

.textPrompt {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    min-height: 40px;
    max-height: 197px;
    border-radius: 5px;
    background-color: rgb(59, 56, 71);
    color: white;
    cursor: pointer;
    border: none;
    outline: rgb(174, 0, 255) 1px solid;
    z-index: 100;

    overflow: hidden;
    overflow-y: scroll;
    overflow-x: scroll;

    scrollbar-width: thin;
    scrollbar-color: rgb(0, 0, 0) rgb(73, 73, 73);
}

.textPromptOption {
    position: relative;
    left: 0px;
    transition: all 0.3s ease;
    padding: 5px;
}

.textPromptOption:hover {
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    outline: rgb(162, 0, 255) 2px solid;
    left: 4px;
}

.textPromptOptionHighlighted {
    background: linear-gradient(45deg, rgb(104, 0, 104), rgb(58, 0, 145));
    box-shadow: 6px 5px 31px -7px rgba(0, 0, 0, 0.75);
    position: relative;
    left: 4px;
    padding: 5px;
}

#mainWarningMessage {
    position: fixed;
    top: 20px;
    left: calc(100%);
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 10px; /* Space between notifications */
    z-index: 9999;
}

/* Container for all notifications */
#notif-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 10px; /* Space between notifications */
    z-index: 9999;
}

/* Container for all notifications */
#notif-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column; /* Stack vertically */
    gap: 10px; /* Space between notifications */
    z-index: 9999;
}

/* Individual notification */
.clipboard-notif {
    opacity: 0;
    background-color: #3f3f3f;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    outline: rgb(174, 0, 255) 2px solid;
    transform: translateX(300px); /* Start off-screen */
    transition: transform 0.5s ease, opacity 0.5s ease;
    font-size: 20px;
}

/* Slide in */
.clipboard-notif.show {
    transform: translateX(0);
    opacity: 1;
}

.explorer {
    position: relative;
    width: calc(100% - 10px);
    height: 100%;
    margin: 5px;
    border-radius: 10px;
    background-color: rgb(71, 71, 71);
    white-space: pre;
    overflow-x: auto;
    max-width: 210px; /* don’t grow wider than parent */
    max-height: 381.34px;
    scrollbar-color: rgb(0, 0, 0) rgb(59, 59, 59);
}

.explorerDiv {
    position: relative;
}

.explorerArrow {
    display: inline;
    padding: 4px;
    border-radius: 50%;
    position: relative;
    top: 5px;
    width: 13px;
    transition: all 0.3s ease;
}

.explorerArrow:hover {
    top: 2px;
}

.explorerText {
    display: inline;
    color: white;
}

.explorerText:hover {
    text-decoration: underline;
    user-select: none; /* Prevents text selection */
}
.selected {
    background: linear-gradient(45deg, rgb(104, 0, 104), rgb(58, 0, 145));
    padding: 2px;
    border-radius: 5px;
}

.explorerLocked {
    width: 13px;
    position: relative;
    top: 3px;
    padding-left: 10px;
}

.explorerVisibilityToggle {
    width: 25px;
    position: relative;
    top: 5px;
    padding-left: 10px;
    transition: all 0.3s ease;
}

.explorerVisibilityToggle:hover {
    width: 25px;
    position: relative;
    top: 5px;
    padding-left: 10px;
    rotate: -7deg;
    scale: 1.1;
}

.explorerDragTextBackground {
    position: absolute;
    color: white;
    user-select: none; /* Prevents text selection */
    background-color: rgba(68, 68, 182, 0.2);
    outline: rgb(105, 105, 201) 2px solid;
    border-radius: 50vh;
    padding: 2px 6px 2px 6px;
}

.explorerDragText {
    position: relative;
    color: white;
    user-select: none; /* Prevents text selection */
    padding: 5px;
}

.explorerHasNineslice {
    width: 20px;
    position: relative;
    top: 5px;
    padding-left: 10px;
    transition: all 0.3s ease;
}

.help_button {
    position: absolute;
    top: 15px;
    left: calc(100% - 130px);
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

.help_button:hover {
    transform: scale(1.1);
}

.modalChooseImageForm {
    max-height: 400px;
    width: 500px;
    overflow-y: scroll;
    scrollbar-color: rgb(0, 0, 0) rgb(73, 73, 73);
    padding: 10px;
    outline: #000000 3px solid;
    border-radius: 5px;
    background-color: #3f3f3f;
    margin-top: 15px;
}

@font-face {
    font-family: "MinecraftRegular";
    src: url("./fonts/MinecraftRegular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "MinecraftTen";
    src: url("./fonts/MinecraftTen.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

/* ====== Choose Image Search Styles ====== */
.chooseImageSearchWrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: linear-gradient(145deg, #2a2a2a, #323232);
    border: 1px solid rgba(153, 0, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.chooseImageSearchInput {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid rgba(153, 0, 255, 0.2);
    background: linear-gradient(165deg, #1a1a1a, #242424);
    color: #ffffff;
    font-size: 15px;
    letter-spacing: 0.3px;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
                0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.chooseImageSearchInput::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.chooseImageSearchInput:focus {
    border-color: rgba(153, 0, 255, 0.8);
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
    background: linear-gradient(165deg, #1d1d1d, #282828);
}

.chooseImageSearchDropdown {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(165deg, #1e1e1e, #262626);
    color: #ffffff;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4),
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
    scrollbar-width: thin;
    scrollbar-color: rgba(153, 0, 255, 0.5) rgba(0, 0, 0, 0.2);
}

.chooseImageSearchDropdown::-webkit-scrollbar {
    width: 8px;
}

.chooseImageSearchDropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chooseImageSearchDropdown::-webkit-scrollbar-thumb {
    background: rgba(153, 0, 255, 0.5);
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.chooseImageSearchDropdown option {
    background: transparent;
    color: #ffffff;
    padding: 10px 12px;
    margin: 2px 4px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.chooseImageSearchDropdown option:hover,
.chooseImageSearchDropdown option:focus {
    background: linear-gradient(135deg, rgba(153, 0, 255, 0.2), rgba(153, 0, 255, 0.1));
    border-color: rgba(153, 0, 255, 0.3);
}

.chooseImageSearchDropdown option:checked {
    background: linear-gradient(135deg, rgba(153, 0, 255, 0.8), rgba(153, 0, 255, 0.6));
    border-color: rgba(153, 0, 255, 0.8);
}
/* ====== End Choose Image Search Styles ====== */
