html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #121212;
    font-family: system-ui, sans-serif;
}

/* Viewport */
.viewport {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
}

#image-wrapper {
    position: relative;
    transform-origin: center center;
}

.layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.base-layer {
    opacity: 1;
}

/* Controls */
.controls {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0,0,0,0.85);
    padding: 10px;
    border-radius: 6px;
    width: 200px;
}

.category-btn {
    background: #333;
    border: 1px solid #555;
    padding: 6px 8px;
    border-radius: 4px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    cursor: pointer;
}

.sub-menu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding-left: 6px;
    border-left: 2px solid #007bff;
}

.sub-menu.open {
    display: flex;
}

.layer-btn {
    background: #444;
    border: 1px solid #666;
    padding: 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
    cursor: pointer;
}

.layer-btn.active {
    background: #007bff;
}

.layer-slider {
    width: 100%;
    height: 10px;
    border-radius: 4px;
    background: #333;
}

.reset-btn {
    margin-top: 10px;
    padding: 6px;
    background: #666;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}
