body {
    background-color: #121212;
    /* Dark gray background */
    color: #E0E0E0;
    /* Light gray text */
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    opacity: 0;
    /* Initially hide the content */
    transition: opacity 0.5s ease-in;
    /* Fade-in effect */
}

#ui-controls {
    flex: 0 0 auto;
    display: none;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    width: 100%;
    max-width: 640px;
    padding: 0 20px;
    box-sizing: border-box;
}

#ui-controls.active {
    display: flex;
}

.ui-control {
    margin: 10px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.ui-control input[type="range"] {
    width: 100%;
    margin: 0;
}

.ui-control label {
    min-width: 120px;
    margin-right: 10px;
    flex-shrink: 0;
}

h1 {
    font-size: 6em;
    margin-top: 10vh;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.2;
    position: relative;
    animation: continuousGlow 4s ease-in-out infinite;
}

@keyframes continuousGlow {
    0% {
        text-shadow: 0 0 5px rgba(224, 224, 224, 0.1);
    }

    25% {
        text-shadow: 0 0 20px rgba(224, 224, 224, 0.3);
    }

    50% {
        text-shadow: 0 0 30px rgba(224, 224, 224, 0.5);
    }

    75% {
        text-shadow: 0 0 20px rgba(224, 224, 224, 0.3);
    }

    100% {
        text-shadow: 0 0 5px rgba(224, 224, 224, 0.1);
    }
}

#main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px; /* Adjust this value as needed */
    margin: 20px auto;
}

#top-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

#canvas-container {
    flex: 0 0 auto;
}

#myCanvas {
    background-color: #1E1E1E;
    width: 320px;
    height: 320px;
    image-rendering: pixelated;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

#fastled-description {
    width: 100%;
    max-width: 1000px; /* Match the max-width of main-container */
    box-sizing: border-box;
    text-align: center;
    margin: 10px auto; /* Center horizontally */
    padding: 0 20px;
    color: #B0B0B0;  /* Changed from #666 to a lighter gray for better contrast */
    font-size: 1.1em;
}

#output {
    font-size: 1em;
    padding: 20px;
    white-space: pre-wrap;
    width: 100%;
    background-color: #1E1E1E;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    margin: 0;  /* Add this line to remove margins */
}

.ui-control {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.ui-control label {
    margin-right: 10px;
    /* Adjust space between label and checkbox */
}

.ui-control input[type="checkbox"] {
    cursor: pointer;
    transform: scale(1.5);
    /* Optionally, scale the checkbox for better visibility */
}

.ui-control button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #1E90FF;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
}

.ui-control button:active,
.ui-control button.active {
    background-color: #0066CC;
}

.ui-control input[type="number"] {
    width: 100%;
    padding: 5px;
    margin: 0;
    font-size: 16px;
    background-color: #2E2E2E;
    color: #E0E0E0;
    border: 1px solid #444;
    border-radius: 4px;
}

.ui-control button {
    width: 100%;
    margin: 0;
}


.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #1E1E1E;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #333;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-height: 80vh;
    width: 80%;
    max-width: 800px;
    overflow-y: auto;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999;
    transition: opacity 0.2s ease;
}

#output-popup {
    /* disable scroll bars */
    overflow: hidden;
    margin: 0;
    padding: 0;
}
#output {
    margin: 0;
    padding: 10px;
}

.toast-notification {
    position: fixed;
    top: 33vh;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(50, 50, 50, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    pointer-events: none;
    z-index: 9999;
}

.toast-notification-show {
    opacity: 1;
    transition: opacity 0.1s ease-in;
}

.toast-notification-hide {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Audio Control Styling */
.audio-control {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.audio-upload-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #1E90FF;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
    width: 100%;
    margin: 5px 0;
    font-family: 'Roboto Condensed', sans-serif;
}

.audio-upload-button:hover {
    background-color: #0066CC;
}

.audio-player {
    width: 100%;
    height: 36px;
    margin-top: 10px;
    background-color: #2E2E2E;
    border-radius: 4px;
    outline: none;
    border: 1px solid #444;
}

/* Custom styling for audio controls */
audio::-webkit-media-controls-panel {
    background-color: #2E2E2E;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
    color: #E0E0E0;
}

audio::-webkit-media-controls-play-button,
audio::-webkit-media-controls-mute-button {
    filter: invert(100%);
}

#canvas-container {
    position: relative;
}

@keyframes labelFade {
    0% { opacity: 0; }
    3% { opacity: 0; }  /* Quick fade in (0.25s) */
    10% { opacity: 1; } /* Hold for 0.5s */
    80% { opacity: 1; }  /* Hold for 1s */
    100% { opacity: 0; } /* Slow fade out (2s) */
}

#canvas-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(50, 50, 50, .5);
    color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 3px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;  /* Start hidden */
    z-index: 10;
    min-width: 80px;
    text-align: center;
}

/* Add a new class for when we want to trigger the animation */
#canvas-label.show-animation {
    animation: labelFade 10s ease-out forwards;
    animation-delay: 0;  /* Delay animation start */
}
