body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: Arial, sans-serif;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><line x1="16" y1="4" x2="16" y2="28" stroke="rgb(0,100,255)" stroke-width="2"/><line x1="4" y1="16" x2="28" y2="16" stroke="rgb(0,100,255)" stroke-width="2"/><circle cx="16" cy="16" r="3" fill="none" stroke="rgb(0,100,255)" stroke-width="1.5"/></svg>') 16 16, crosshair;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Cursor tracker is hidden initially as the app starts in autonomous mode */
#cursor-tracker {
    position: fixed;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 50;
    display: none;
}

#cursor-tracker::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 200, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(0, 200, 255, 0.6), inset 0 0 8px rgba(0, 200, 255, 0.4);
}

#cursor-tracker::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff0000;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.8);
}

.panel {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 280px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.95), rgba(20, 40, 60, 0.95));
    backdrop-filter: blur(12px);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    z-index: 100;
    max-height: 85vh;
    overflow-y: auto;
    pointer-events: auto;
}

.panel * {
    pointer-events: auto;
}

.panel.collapsed {
    width: 50px;
    padding: 10px;
}

.title {
    color: #00ff88;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.panel.collapsed .title {
    display: none;
}

.content {
    opacity: 1;
    max-height: 2000px;
    transition: 0.3s;
}

.panel.collapsed .content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.slider-group {
    margin-bottom: 16px;
}

.label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 6px;
}

.track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.2), rgba(100, 200, 255, 0.2));
    border: 1px solid rgba(0, 255, 136, 0.3);
    position: relative;
    cursor: pointer;
}

.thumb {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 20%, #00ff88 80%);
    border: 2px solid rgba(255, 255, 255, 0.8);
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
}

.value {
    color: rgba(100, 200, 255, 0.8);
    font-size: 10px;
    margin-top: 4px;
    text-align: right;
}

.btn {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    border: 2px solid rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(100, 200, 255, 0.1));
    color: #00ff88;
    font-weight: bold;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(100, 200, 255, 0.2));
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.btn:active {
    transform: scale(0.95);
}

@media (hover: none) {
    .btn {
        background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(100, 200, 255, 0.2));
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
    }
}

/* Adjusted mobile panel width for better button text readability */
@media (max-width: 767px) {
    .panel {
        width: 250px;
        padding: 15px;
        left: 10px;
        top: 10px;
    }

    .panel.collapsed {
        width: 40px;
        padding: 8px;
    }

    .btn {
        padding: 8px;
        font-size: 11px;
    }

    .label {
        font-size: 10px;
    }

    .value {
        font-size: 9px;
    }
}

.color-btns {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.color-btn {
    flex: 1;
    min-width: 60px;
    padding: 8px;
    border: 2px solid rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(100, 200, 255, 0.05));
    color: #00ff88;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(100, 200, 255, 0.15));
}

.color-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(100, 200, 255, 0.3));
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.6);
}

.info {
    margin-top: 20px;
    padding-top: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}

.toggle {
    background: none;
    border: none;
    color: #00ff88;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}
/* Interaction Mode Buttons */
.mode-btn {
    background: linear-gradient(135deg, rgba(200, 0, 255, 0.05), rgba(0, 100, 255, 0.05));
    border: 2px solid rgba(150, 100, 255, 0.4);
    color: #aaddff;
}
.mode-btn.active {
    background: linear-gradient(135deg, rgba(200, 0, 255, 0.3), rgba(0, 100, 255, 0.3));
    box-shadow: 0 0 12px rgba(150, 100, 255, 0.6);
    color: #fff;
    border-color: #fff;
}

/* Enhanced Cursor Glow */
#cursor-tracker::before {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; box-shadow: 0 0 8px rgba(0, 200, 255, 0.6); }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.4; box-shadow: 0 0 15px rgba(0, 200, 255, 0.8); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; box-shadow: 0 0 8px rgba(0, 200, 255, 0.6); }
}
