#viewerCanvasWrapper,
#viewerCanvasWrapper canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    outline: 0;
}

.wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    color: #4a5d70; /* Warm gray for text */
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    background: #f0f4f8; /* Soft background */
}

.viewer-wrapper {
    position: relative;
    background: #e8eef5; /* Light gradient-like background */
    flex: 1;
}

.viewer-loader {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 12;
}

.header,
.footer {
    display: flex;
    padding: 0.75em;
    background: #1a3c50; /* Deep teal header/footer */
    border-bottom: 2px solid #d67d6e; /* Soft coral accent */
    z-index: 10;
}

.header {
    justify-content: center;
}

.footer {
    justify-content: center;
    gap: 1.5em; /* Increased spacing between footer items */
}

.header-item,
.footer-item {
    display: flex;
    border-radius: 0.8em;
    padding: 0.6em 1.2em;
    color: #f0f4f8; /* Light text for contrast */
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1); /* Subtle transparent background */
}

.header-item:hover,
.footer-item:hover {
    background: rgba(255, 255, 255, 0.2); /* Lighter hover effect */
    color: #d67d6e; /* Soft coral hover color */
    transform: translateY(-2px); /* Slight lift on hover */
}

.header-item:active,
.footer-item:active,
.item-selected,
.item-selected:hover {
    background: rgba(214, 125, 110, 0.3); /* Coral accent for active/selected */
    color: #fff;
    transform: translateY(0);
    box-shadow: none;
}

.header-item {
    align-items: center;
}

.header-icon {
    font-size: 1.3em;
    padding: 0 0.5em;
    color: #d67d6e; /* Coral icon color */
}

.footer-item {
    flex-direction: column;
    align-items: center;
    padding: 0.8em 1em;
}

.footer-icon {
    font-size: 1.8em; /* Slightly reduced for balance */
    color: #d67d6e; /* Coral icon color */
}

.header-left,
.header-right {
    display: flex;
    gap: 1.2em; /* Increased spacing between header items */
}

.slider-container {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #1a3c50; /* Matches header/footer */
    border-top: 2px solid #d67d6e; /* Coral accent */
    width: 100%;
    text-align: center;
    padding: 0.5em 0;
}

.slider {
    appearance: none;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 8px;
    outline: 0;
    background: #4a5d70; /* Warm gray track */
    opacity: 0.8;
    transition: opacity 0.3s ease;
    margin: 15px 0;
    width: 80%;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #d67d6e; /* Coral thumb */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(214, 125, 110, 0.5);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #d67d6e; /* Coral thumb */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(214, 125, 110, 0.5);
}

.loader {
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(26, 60, 80, 0.9); /* Semi-transparent teal */
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 8px solid #f0f4f8; /* Light background color */
    border-top: 8px solid #d67d6e; /* Coral spinner */
    animation: spin 1.5s linear infinite;
}

.loader-text {
    color: #f0f4f8;
    margin-top: 1em;
    font-size: 1.1em;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#explodeSlider {
    width: 250px; /* Increased for better usability */
}

.right-container {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
}

.explode-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

.cb-container {
    position: relative;
    padding-left: 40px;
    margin-bottom: 15px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    color: #f0f4f8;
}

.cb-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    margin: 10px;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    border-radius: 5px; /* Changed to square with rounded corners */
    background-color: #4a5d70; /* Warm gray */
    border: 2px solid #d67d6e; /* Coral border */
}

.cb-container:hover input ~ .checkmark {
    background-color: #3c4d60; /* Darker gray on hover */
}

.cb-container input:checked ~ .checkmark {
    background-color: #d67d6e; /* Coral when checked */
}

.cb-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.cb-container input:checked ~ .checkmark:after {
    display: block;
}

.cb-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

@media only screen and (max-width: 600px) {
    .footer-title {
        display: none;
    }
}

@media only screen and (max-width: 500px) {
    .header-title {
        display: none;
    }
    .footer {
        justify-content: space-between;
        overflow-x: scroll;
    }
}