:root {
    --glow-rgb: 239 42 201;
}

* {
    box-sizing: border-box;
}

.glow-point {
    position: absolute;
    box-shadow: 0rem 0rem 1.2rem 0.6rem rgb(var(--glow-rgb));
    pointer-events: none;
}

.star {
    position: absolute;
    z-index: 2;
    color: white;
    font-size: 1rem;
    animation-duration: 1500ms;
    animation-fill-mode: forwards;
    pointer-events: none;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

#canvas {
    width: 100%;
    height: 100%;
}

#controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: linear-gradient(90deg, rgba(35, 97, 217, 0.75) 0%, rgba(94, 36, 217, 0.75) 100%);
    padding: 13px;
    border-radius: 16px;
    display: flex;
    align-items: center;
}


button {
    margin: 0 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background: linear-gradient(90deg, #2361D9 0%, #5E24D9 100%);
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(45deg, #8f94fb, #572dd8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#savedButton {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    box-shadow: 0px -1px 20px 40px #5e24d933;
}

#savedButton.selected {
    background: linear-gradient(45deg, #43cea2, #185a9d);
}

#contextMenu {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    padding: 5px 0;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

#contextMenu button {
    display: block;
    width: 100%;
    padding: 5px 10px;
    text-align: left;
    background: none;
    border: none;
    color: black;
    cursor: pointer;
}

#contextMenu button:hover {
    background-color: #f0f0f0;
}

@keyframes rainbow-border {
    0% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: 100;
    }
}

#back-button-container {
    position: fixed;
    top: 20px;
    left: 20px;
}

#categoryFilter {
    position: fixed;
    top: 90px;
    left: 20px;
    z-index: 1000;
    width: 100%;
    max-width: 250px;
}

#categoryBtn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 10px 20px;
    border-radius: 5px;
    background: linear-gradient(90deg, #2361D9 0%, #5E24D9 100%);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 0;
}

#categoryBtn .arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

#categoryBtn .arrow.open {
    transform: rotate(180deg);
}

#categoryBtn:hover {
    background: linear-gradient(45deg, #8f94fb, #572dd8);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#categoryDropdown {
    display: block;
    background: #F9F9F9;
    border-radius: 0 0 1rem 1rem;
    overflow-y: auto;
    max-height: 500px;
    transform-style: preserve-3d;
    perspective: 1000px;
    border: 1px solid #E9E9E9;
}

#categoryDropdown label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 17px;
    transition: transform 0.35s, box-shadow 0.35s, background 0.35s;
    cursor: pointer;
    opacity: 0;
    animation: firstShow 0.3s ease-in-out, show 0.15s linear forwards;
    border: 0;
    border-bottom: 1px solid #E9E9E9;
    margin: 0 auto;
    font-weight: normal;
    color: #909090;
}

#categoryDropdown label:hover {
    background: #f0f0f0;
    transform: translate3d(0, 0, 3rem);
}

#categoryDropdown label:hover+label,
#categoryDropdown label:focus-within+label {
    box-shadow: inset 0 1rem 1rem -1rem #0003;
    transform: translate3d(0, 0, 2rem);
}

#categoryDropdown label:has(+ label:hover),
#categoryDropdown label:has(+ label:focus-within) {
    box-shadow: inset 0 -1rem 1rem -1rem #0003;
}

/* Checkbox styles */

#categoryDropdown input[type="checkbox"] {
    display: none;
}

#categoryDropdown label:hover {
    background-color: #f0f0f0;
}

/* Create a custom checkbox */
.checkbox {
    width: 23px;
    height: 23px;
    border: 2px solid #E9E9E9;
    background-color: #ffffff;
    border-radius: 3px;
    display: inline-block;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
    border-radius: 8px;
}

/* Create the checkmark using the after pseudo-element */
.checkbox::after {
    content: '';
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Show the checkmark when the checkbox is checked */
#categoryDropdown input[type="checkbox"]:checked+label .checkbox {
    background: linear-gradient(90deg, #2361D9 0%, #5E24D9 100%);
    border-color: #2361D9;
}

#categoryDropdown input[type="checkbox"]:checked+label .checkbox::after {
    display: block;
}

/* Add some animation */
#categoryDropdown label .checkbox {
    transition: all 0.3s ease;
}

#categoryDropdown label:hover .checkbox {
    transform: scale(1.1);
}

@keyframes firstShow {
    0% {
        transform: perspective(1000px) translate3d(0, -10px, 0);
        opacity: 0;
    }

    100% {
        transform: perspective(1000px) translate3d(0, 0, 0);
        opacity: 1;
    }
}

@keyframes show {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

#appName {
    position: absolute;
    background: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
}

#resetCategories {
    display: block;
    width: 90%;
    text-align: center;
    margin: 10px auto;
    padding: 10px 0;
    background: linear-gradient(90deg, #2361D9 0%, #5E24D9 100%);
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.glow-point {
    position: absolute;
    box-shadow: 0rem 0rem 1.2rem 0.6rem rgb(var(--glow-rgb));
    pointer-events: none;
}

.star {
    position: absolute;
    z-index: 2;
    color: white;
    font-size: 1rem;
    animation-duration: 1500ms;
    animation-fill-mode: forwards;
    pointer-events: none;
}

@keyframes fall-1 {
    0% {
        transform: translate(0px, 0px) rotateX(45deg) rotateY(30deg) rotateZ(0deg) scale(0.25);
        opacity: 0;
    }

    5% {
        transform: translate(10px, -10px) rotateX(45deg) rotateY(30deg) rotateZ(0deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(25px, 200px) rotateX(180deg) rotateY(270deg) rotateZ(90deg) scale(1);
        opacity: 0;
    }
}

@keyframes fall-2 {
    0% {
        transform: translate(0px, 0px) rotateX(-20deg) rotateY(10deg) scale(0.25);
        opacity: 0;
    }

    10% {
        transform: translate(-10px, -5px) rotateX(-20deg) rotateY(10deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-10px, 160px) rotateX(-90deg) rotateY(45deg) scale(0.25);
        opacity: 0;
    }
}

@keyframes fall-3 {
    0% {
        transform: translate(0px, 0px) rotateX(0deg) rotateY(45deg) scale(0.5);
        opacity: 0;
    }

    15% {
        transform: translate(7px, 5px) rotateX(0deg) rotateY(45deg) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(20px, 120px) rotateX(-180deg) rotateY(-90deg) scale(0.5);
        opacity: 0;
    }
}

button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

button:hover::before {
    opacity: 1;
}

.color-picker-container {
    width: 40px;
    height: 40px;
    position: relative;
}

.btn-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.selector-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.selector {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    transition: transform 0.3s ease-out;
}

.svg-sliders {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#colorPicker {
    margin-left: 10px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(45deg, #ff0000, #00ff00, #0000ff);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
}

#colorPicker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#colorPicker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2361D9 0%, #5E24D9 100%);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
}

#progressBar {
    width: 200px;
    height: 20px;
    background-color: #ddd;
    border-radius: 10px;
    margin-top: 10px;
}

#progressFill {
    width: 0%;
    height: 100%;
    background-color: #5E24D9;
    border-radius: 10px;
    transition: width 0.3s ease-in-out;
}

.control-btn {
    padding: 5px 20px 5px 20px;

}

/* HTML: <div class="loader"></div> */
.spinner-loader {
    width: 48px;
    height: 48px;
    position: relative;
}

.spinner-loader::before,
.spinner-loader::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 48em;
    height: 48em;
    background-image:
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0),
        radial-gradient(circle 10px, #FFF 100%, transparent 0);
    background-position: 0em -18em, 0em 18em, 18em 0em, -18em 0em,
        13em -13em, -13em -13em, 13em 13em, -13em 13em;
    background-repeat: no-repeat;
    font-size: 0.5px;
    border-radius: 50%;
    animation: blast 1s ease-in infinite;
}

.spinner-loader::after {
    font-size: 1px;
    background: #fff;
    animation: bounce 1s ease-in infinite;
}

@keyframes bounce {

    0%,
    100% {
        font-size: 0.75px
    }

    50% {
        font-size: 1.5px
    }
}

@keyframes blast {

    0%,
    40% {
        font-size: 0.5px;
    }

    70% {
        opacity: 1;
        font-size: 4px;
    }

    100% {
        font-size: 6px;
        opacity: 0;
    }
}

.drop-effect {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    animation: ripple 0.5s linear;
    pointer-events: none;
  }
  
  @keyframes ripple {
    to {
      transform: scale(3);
      opacity: 0;
    }
  }

.loader-text {
    margin-top: 20px;
    color: #fff;
    text-align: center;
    font-family: Arial, sans-serif;
}