* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
}

#canvas {
    display: block;
    background: #0a0a0a;
    cursor: grab;
}

#canvas:active {
    cursor: grabbing;
}

.controls-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 300px;
    background: rgba(15, 15, 25, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 90vh;
    overflow-y: auto;
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.controls-header h1 {
    font-size: 20px;
    background: linear-gradient(135deg, #64b5ff, #ff64f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.toggle-btn {
    background: rgba(100, 100, 255, 0.2);
    border: 1px solid rgba(100, 100, 255, 0.3);
    border-radius: 8px;
    padding: 8px;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(100, 100, 255, 0.3);
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.3);
}

.controls-content {
    display: block;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #cccccc;
    font-weight: 500;
}

.control-group select,
.control-group input[type="range"] {
    width: 100%;
    padding: 8px;
    background: rgba(30, 30, 40, 0.8);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
}

.control-group select {
    cursor: pointer;
}

.control-group select:focus,
.control-group input[type="range"]:focus {
    outline: none;
    border-color: rgba(100, 180, 255, 0.6);
    box-shadow: 0 0 10px rgba(100, 180, 255, 0.2);
}

input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(100, 100, 255, 0.2);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64b5ff, #ff64f7);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(100, 180, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #64b5ff, #ff64f7);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(100, 180, 255, 0.5);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.action-buttons .btn:last-child {
    grid-column: span 2;
}

.btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #4ecdc4, #6ee7df);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, #a8e6cf, #7fd3c1);
    color: #2d4a3e;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 230, 207, 0.4);
}

.info-panel {
    background: rgba(50, 50, 70, 0.3);
    border: 1px solid rgba(100, 100, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.info-panel p {
    font-size: 12px;
    color: #aaaaaa;
    text-align: center;
    line-height: 1.4;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .controls-panel {
        width: calc(100% - 40px);
        max-width: 350px;
        top: 10px;
        left: 20px;
        right: 20px;
        padding: 15px;
    }
    
    .controls-header h1 {
        font-size: 18px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-buttons .btn:last-child {
        grid-column: span 1;
    }
}

@media (max-height: 600px) {
    .controls-panel {
        max-height: 85vh;
    }
}

/* Custom scrollbar */
.controls-panel::-webkit-scrollbar {
    width: 6px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(50, 50, 70, 0.2);
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 255, 0.3);
    border-radius: 3px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 255, 0.5);
}

/* Glow effects */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(100, 180, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(100, 180, 255, 0.4);
    }
}

.controls-panel {
    animation: glow 4s ease-in-out infinite;
}