.box.maximized {
    position: fixed;
    top: 0;
    left: 0;
    width: 60%;
    height: 60%;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    background-color: rgba(173, 216, 230, 0.90);
    /* 65% transparent light blue background */
    text-shadow: 0 1px 3px #333333;
}

.box.minimized {
    height: 30px;
    /* Shrink to title bar height */
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    /* Smooth transition */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 200px;
    /* Centered at the bottom */
}

.box.closed {
    display: none;
}

.box.closing {
    animation: closeBox 0.2s forwards;
    /* Shrink very fast until it disappears */
}

.box.opening {
    animation: openBox 0.2s forwards;
    /* Grow very fast until it appears */
}

.box.wobble {
    animation: wobble 0.5s ease-in-out;
}

@keyframes closeBox {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes openBox {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes restoreBox {
    0% {
        display: none;
    }

    100% {
        display: block;
    }
}

@keyframes moveBackground {
    0% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 10% 0%;
    }

    /* Move right */
    50% {
        background-position: 10% 10%;
    }

    /* Move down */
    75% {
        background-position: 0% 10%;
    }

    /* Move left */
    100% {
        background-position: 0% 0%;
    }

    /* Move up */
}

@keyframes wobble {

    0%,
    100% {
        transform: translateX(0%);
    }

    15% {
        transform: translateX(-25%) rotate(-5deg);
    }

    30% {
        transform: translateX(20%) rotate(3deg);
    }

    45% {
        transform: translateX(-15%) rotate(-3deg);
    }

    60% {
        transform: translateX(10%) rotate(2deg);
    }

    75% {
        transform: translateX(-5%) rotate(-1deg);
    }

    90% {
        transform: translateX(5%) rotate(1deg);
    }
}

@keyframes spinShine {
    0% {
        border-color: gold;
        box-shadow: 0 0 5px gold;
    }

    50% {
        border-color: transparent;
        box-shadow: 0 0 20px gold;
    }

    100% {
        border-color: gold;
        box-shadow: 0 0 5px gold;
    }
}

@keyframes breath {
    0% {
        color: #333333;
        /* Start with dark gray */
    }

    50% {
        color: #0000ff;
        /* Transition to blue */
    }

    100% {
        color: #333333;
        /* Transition back to dark gray */
    }
}

form input:focus,
form textarea:focus {
    animation: spinShine 5s infinite;
}

/* Static background for no-JS scenario */
.no-js .container {
    background-image: url("../images/trbk1a.png");
    background-size: cover;
    animation: none;
    /* Disable animation */
}

/* Enable animation when JS is available */
.js .container {
    animation: moveBackground 40s infinite alternate;
    /* Slow down background animation */
}

.snippet {
    color: #00FF00;
    /* Set text color to green */
    background: rgba(0, 0, 0, 0.8);
    /* Slightly transparent black background */
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    /* Add shadow for better visibility */
}