body { 
    /* font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif !important; */
    margin: 0;
    min-height: 100vh;
}
body.keyboard-open {
    position: fixed;
    width: 100%;
}
body.keyboard-open #captcha-container {
    position: fixed;
    z-index: 1000;
    background-color: white;
    padding-top: 12px;
    padding-bottom: 12px;
    bottom: 0;
}
div, input, button, p {
    box-sizing: border-box;
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif !important;
}
button {
    user-select: none; 
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    -webkit-tap-highlight-color: transparent;
}

.container {
    position: relative;
    margin: 0 auto;
    /* transform: translate(-50%, -50%); */
    top: -80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-height: calc(100vh - 20px);
}

input[type="text"] {
    padding: 10px;
    font-size: 16px;
}

#character {
    position: relative;
    height: 300px;
    width: 208px;
    right: 7%;
    top: -20px;
}
#character .body-part {
    position: absolute;
    background-position: 0 0;
    transform: translateZ(0);
    will-change: transform;
}
#head-container {
    width: 256px;
    height: 218px;
    z-index: 12;
}
#head {
    width: 256px;
    height: 218px;
    background-image: url("images/head.png");
    z-index: 14;
}
#face {
    width: 212px;
    height: 222px;
    background-image: url("images/eyes.png");
    z-index: 15;
    left: 22px;
    top: 10px;
}
#ear_left {
    width: 125px;
    height: 118px;
    background-image: url("images/ears_left.png");
    z-index: 13;
    top: -13px;
    transform-origin: 70% 55%;
}
#ear_right {
    width: 125px;
    height: 118px;
    background-image: url("images/ears_right.png");
    z-index: 13;
    top: -13px;
    left: 125px;
    transform-origin: 70% 40%;
}
#hair {
    width: 82px;
    height: 34px;
    background-image: url("images/hair.png");
    z-index: 16;
    top: 0px;
    left: 80px
}
#whiskers {
    width: 281px;
    height: 63px;
    background-image: url("images/whiskers.png");
    z-index: 17;
    top: 145px;
    left: -10px;
}
#tail {
    width: 237px;
    height: 262px;
    background-image: url("images/tail.png");
    z-index: 10;
    left: 100px;
    top: 130px;
}
#hand {
    width: 312px;
    height: 287px;
    background-image: url("images/body.png");
    z-index: 18;
    top: 84px;
    left: -30px;
}

#body {
    width: 202px;
    height: 196px;
    background-image: url("images/back.png");
    z-index: 11;
    top: 165px;
    left: 25px;
}

#captcha-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 1rem;
    width: 100%;
    transition: all .3s ease-in-out;
}
#captcha-controls {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    gap: 10px;
    padding: 0 20px;
}

#submit-btn {
    margin-left: 1rem;
    flex-basis: 24px;
    padding: 8px 15px;
}
#submit-btn svg {
    position: relative;
    top: 2px;
}
.button-main[disabled] {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
    box-shadow: none;
}
#refresh-captcha-btn {
    padding: 6px 15px;
    flex-basis: 24px;
}
#refresh-captcha-btn svg {
    position: relative;
    top: 2px;
}
#open-secret-btn {
    flex: 1;
}

#response {
    border: 1px solid black;
    padding: 1rem;
    border-radius: 10px;
    flex: 1 0 100%;
    align-self: stretch;
    margin: 0 1rem;
    box-sizing: border-box;
    background-color: rgb(244, 244, 244);
    display: inline-block;
}
#response.response-info {
    background-color: rgb(244, 244, 244);
}
#response.response-error {
    background-color: rgb(234, 203, 203);
}
#response.response-success {
    background-color: rgb(186, 221, 186);
}
#response img {
    vertical-align: middle;
}

#loading-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: flex;
    margin:0 auto;
}
#loading-container #loading {
    display: block;
    font-size: 2rem;
    text-align: center;
    width: 90%;
    /* width: 100px;
    height: 100px; */
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 100px;
    width: 100%;
}

.toggle-container button {
    border-radius: 0;
    flex: 1;
}
.toggle-container button.active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px black;
    background-color: rgb(203, 203, 203);
}

.toggle-container button:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.toggle-container button:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.button-main {
    font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
    font-size: 16px;
    padding: 10px 20px;
    background-color: white;
    border: 3px solid black;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    outline: none;
    box-shadow: 3px 3px 0px black;
    transition: all 0.1s ease-in-out;
}

.button-main:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px black;
}

.button-main:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px black;
}

.button-main::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 5px;
    left: -3px;
    border: 1px solid black;
    border-radius: 10px;
    opacity: 0.6;
}

.input-main {
    
    font-size: 16px;
    padding: 10px;
    background-color: white;
    border: 3px solid black;
    border-radius: 8px;
    outline: none;
    box-shadow: 1px 1px 0px black;
    transition: all 0.1s ease-in-out;
    flex: 1;
}

.input-main:focus {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px black;
}

.input-main::placeholder {
    color: gray;
    font-style: italic;
}

.button-treasure {
    font-size: 16px;
    padding: 10px 24px 10px 30px;
    background-color: goldenrod;
    border: 4px solid brown;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    outline: none;
    box-shadow: 4px 4px 0px brown;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: black;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.button-treasure:not([disabled]) {
    background-color: rgb(84, 175, 76);
    border: 4px solid rgb(54, 127, 47);
    box-shadow: 4px 4px 0px rgb(54, 127, 47);
}

.button-treasure:not([disabled]):hover {
    background-color: rgb(115, 203, 107);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgb(54, 127, 47);
}

.button-treasure:not([disabled]):active {
    background-color: rgb(63, 125, 67);
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgb(54, 127, 47);
}

.button-treasure:active {
    background-color: darkgoldenrod;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px brown;
}

.button-treasure::after {
    content: "🔒"; /* Locked emoji */
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.button-treasure:not([disabled])::after {
    content: "🔓";
}

.popup-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    background: #333;
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 9000;
    /* visibility: hidden; */
}
.popup-action {
    display: flex;
    justify-content: right;
}
.popup-action button {
    background: none;
    border: 1px solid white;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
}

.minimized-button {
    visibility: visible;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 8999;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}
.popup-container p {
    white-space: pre-line;
}
.shaky {
    animation: shaky 1s 3 ease-in-out;
}

/* START NOTIFIER */
.response-notifier img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}
.response-notifier {
    z-index: 100;
    position: absolute;
    top: 28px;
    right: 22px;
    width: 100px;
    height: 100px;
    transform: scale(0);
    /* opacity: 0; */
    /* display: none; */
}
.response-notifier.show {
    display: block;
}
.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #7ac142;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
}

.checkmark.animated {
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both
}
.checkmark.animated .checkmark__check{
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards
}
.checkmark.animated .checkmark__circle{
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none
    }

    50% {
        transform: scale3d(1.1, 1.1, 1)
    }
}
@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #7ac142
    }
}

/* CROSSMARK */
.crossmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #c93636;
    fill: none;
  }
  
  .crossmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #c93636;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #c93636;
  }
  
  .crossmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
  }
  
  .cross__path {
    stroke: #ffffff;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    transform-origin: 50% 50% 0;
  }

  .crossmark.animated {
    animation: fillred .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
  }
  .crossmark.animated .crossmark__circle{
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
  }
  .crossmark.animated .crossmark__check{
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
  }
  .crossmark.animated   .cross__path--right{
    animation: 0.3s ease 0.8s normal forwards 1 running stroke;
  }
  .crossmark.animated   .cross__path--left{
    animation: 1s ease 0.8s normal forwards 1 running stroke;
  }
  @keyframes fillred {
    100% {
      box-shadow: inset 0px 0px 0px 30px #c93636;
    }
    
  }
  @keyframes stroke {
    100% {
      stroke-dashoffset: 0;
    }
  }

  /* LOADER */
  .loader-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #000000;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #000000;
    display: none;
  }
  .loader-path {
    stroke-dasharray: 150,200;
    stroke-dashoffset: -10;
    -webkit-animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
            animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite;
    stroke-linecap: round;
  }
  
  @-webkit-keyframes rotate {
    100% {
      -webkit-transform: rotate(360deg);
              transform: rotate(360deg);
    }
  }
  
  @keyframes rotate {
    100% {
      -webkit-transform: rotate(360deg);
              transform: rotate(360deg);
    }
  }
  @-webkit-keyframes dash {
    0% {
      stroke-dasharray: 1,200;
      stroke-dashoffset: 0;
    }
    50% {
      stroke-dasharray: 89,200;
      stroke-dashoffset: -35;
    }
    100% {
      stroke-dasharray: 89,200;
      stroke-dashoffset: -124;
    }
  }
  @keyframes dash {
    0% {
      stroke-dasharray: 1,200;
      stroke-dashoffset: 0;
    }
    50% {
      stroke-dasharray: 89,200;
      stroke-dashoffset: -35;
    }
    100% {
      stroke-dasharray: 89,200;
      stroke-dashoffset: -124;
    }
  }
  @-webkit-keyframes color {
    0% {
      stroke: #000000;
    }
    40% {
      stroke: #000000;
    }
    66% {
      stroke: #000000;
    }
    80%, 90% {
      stroke: #000000;
    }
  }
/* END NOTIFIER */
/* CHAT BOX */
#chat-container {
    display: flex;
    align-items: flex-start;
    max-width: 300px;
    position: absolute;
    right: 0;
    top: 20px;
    transform: scale(0);
}

#chat-bubble {
    position: relative;
    background-color: #fff;
    padding: 8px 10px;
    border-radius: 12px;
    border: 2px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    width: 140px;
    max-width: 140px;
    font-size: 0.7rem;
    text-align: center;
}

/* Triangle (Chat Tail) */
#chat-bubble::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid #ccc;
    border-top: 10px solid #ccc;
    border-bottom: 10px solid transparent;
    transform: rotate(-45deg);
}

#chat-bubble::before {
    content: "";
    position: absolute;
    bottom: -10px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid #fff;
    border-top: 10px solid #fff;
    border-bottom: 10px solid transparent;
    transform: rotate(-45deg);
    z-index: 1;
}

/* END CHAT BOX */
@keyframes shaky {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 2px) rotate(-2deg); }
    40% { transform: translate(2px, -2px) rotate(2deg); }
    60% { transform: translate(-2px, 2px) rotate(-2deg); }
    80% { transform: translate(2px, -2px) rotate(2deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@media screen and (min-width: 768px) {
    #response {
        margin: 0;
    }
    #captcha-container {
        padding: 0;
    }
    #captcha-controls {
        width: 400px;
        padding: 0;
    }
    .container {
        width: 400px;
        top: 50%;
    }
    #character {
        scale: 1;
        height: 410px;
        top: 50px;
    }
    .popup-container {
        width: 400px;
    }
    .toggle-container {
        width: 400px;
        margin: 0 auto;
    }
    #chat-container {
        right: -20%;
    }
    #chat-bubble {
        font-size: 1rem;
        width: 170px;
        max-width: 170px;
    }
    #loading {
        width: auto;
    }
}