body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1f 0%, #1a1a3e 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#canvas {
    display: block;
    cursor: grab;
}

#canvas:active {
    cursor: grabbing;
}

.control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a9eff;
    border-radius: 15px;
    padding: 20px;
    color: white;
    max-width: 300px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(74, 158, 255, 0.3);
}

.control-panel h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #4a9eff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group {
    margin: 15px 0;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #aaa;
}

button {
    background: linear-gradient(135deg, #4a9eff 0%, #2d5eff 100%);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s;
    margin: 5px 0;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.4);
}

button:active {
    transform: translateY(0);
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.value-display {
    display: inline-block;
    background: rgba(74, 158, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #4a9eff;
}

.info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a9eff;
    border-radius: 15px;
    padding: 15px;
    color: white;
    max-width: 300px;
    backdrop-filter: blur(10px);
    font-size: 11px;
    line-height: 1.6;
}

.legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a9eff;
    border-radius: 15px;
    padding: 15px;
    color: white;
    backdrop-filter: blur(10px);
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
