/* mini-viewer/style.css */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f0f0;
    /* Fallback */
    overflow: hidden;
    /* Prevent scroll */
}

#mini-viewer-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #ffffff 0%, #e0e0e0 100%);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    outline: none;
}

#loading-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: #666;
    pointer-events: none;
    transition: opacity 0.5s;
}

/* Vertical Right-Side Palette */
.palette-panel {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    bottom: auto;
    left: auto;

    background: rgba(255, 255, 255, 0.85);
    padding: 12px;
    /* Reduced padding */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

    width: auto;
    min-width: 0;
    /* Clear min-width */
    backdrop-filter: blur(4px);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-height: 95vh;
    overflow-y: auto;
    /* Safety scroll */
}

/* Hide titles to save space, purely visual UI now */
.palette-panel h3 {
    display: none;
}

.slots-row {
    display: flex;
    flex-direction: column;
    /* Stack slots vertically */
    gap: 8px;
    margin-bottom: 5px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-right: none;
    width: 100%;
    align-items: center;
}

.color-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns of colors */
    gap: 6px;
    margin-bottom: 5px;
    justify-content: center;
}

/* Separator between Standard and Reflex if needed, or just specific spacing */
#row-reflex {
    margin-top: 5px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
}

.slot-btn {
    width: 28px;
    height: 28px;
    margin: 0;

    /* Restored Visuals */
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #eee;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-weight: bold;
    transition: all 0.2s;
}

.slot-btn.top-slot {
    border-radius: 4px;
    /* Distinct shape for top */
}

.color-btn {
    width: 24px;
    height: 24px;

    /* Restored Visuals */
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
    z-index: 2;
}

.color-btn.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #3079F3, 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Reflex shine effect */
.color-btn[data-type="reflex"]::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 20%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.debug-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    width: 220px;
    z-index: 1000;
}

.debug-panel h4 {
    margin-top: 0;
    color: #ffa;
}

.debug-panel label {
    display: block;
    margin-bottom: 8px;
}

.debug-panel input[type=range] {
    width: 100%;
    display: block;
    margin-top: 4px;
}