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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #E0E0E0;
    overflow: hidden;
}

/* Top Toolbar */
.top-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(26, 26, 26, 0.9);
    border-bottom: 1px solid #00AAFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    color: #00AAFF;
    font-weight: bold;
}

.logo-text {
    font-size: 18px;
    color: #E0E0E0;
    font-weight: 600;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-select, .color-picker {
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid #00AAFF;
    color: #E0E0E0;
    padding: 5px 10px;
    border-radius: 4px;
}

.control-select {
    min-width: 100px;
}

.slider {
    width: 80px;
    height: 4px;
    background: rgba(0, 170, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #00AAFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.btn {
    background: rgba(0, 170, 255, 0.2);
    border: 1px solid #00AAFF;
    color: #E0E0E0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Left Panel */
.left-panel {
    position: fixed;
    top: 50px;
    left: 0;
    width: 320px;
    height: calc(100vh - 80px);
    background: rgba(26, 26, 26, 0.95);
    border-right: 1px solid #00AAFF;
    padding: 20px;
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.left-panel.collapsed {
    transform: translateX(-280px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 170, 255, 0.3);
}

.panel-header h3 {
    color: #00AAFF;
    font-size: 18px;
}

.toggle-btn {
    background: none;
    border: none;
    color: #00AAFF;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.toggle-btn:hover {
    background: rgba(0, 170, 255, 0.2);
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section {
    border: 1px solid rgba(0, 170, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    background: rgba(0, 170, 255, 0.05);
}

.section h4 {
    color: #00AAFF;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid rgba(0, 170, 255, 0.2);
    padding-bottom: 5px;
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.param-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #E0E0E0;
}

.param-slider {
    width: 100%;
    height: 4px;
    background: rgba(0, 170, 255, 0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    margin-top: 5px;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #00AAFF;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.anim-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 10px;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.preset-btn {
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid #00AAFF;
    color: #E0E0E0;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.preset-btn:hover {
    background: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 170, 255, 0.3);
}

/* Main Scene Container */
#scene-container {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 80px);
    background: #000;
    overflow: hidden;
}

#scene-container canvas {
    display: block;
    cursor: grab;
}

#scene-container canvas:active {
    cursor: grabbing;
}

/* Bottom Status Bar */
.bottom-status {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(26, 26, 26, 0.9);
    border-top: 1px solid #00AAFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 12px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.status-left, .status-right {
    display: flex;
    gap: 20px;
}

.status-center {
    color: #00AAFF;
    font-weight: bold;
}

/* Scrollbar Styling */
.left-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.left-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 170, 255, 0.5);
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 170, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .left-panel {
        width: 100vw;
        transform: translateX(-100vw);
    }
    
    .left-panel.collapsed {
        transform: translateX(-100vw);
    }
    
    .toolbar-controls {
        gap: 8px;
    }
    
    .slider {
        width: 60px;
    }
    
    .logo-text {
        display: none;
    }
}

/* Glow Effects */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 170, 255, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 170, 255, 0.6); }
}

.btn:hover, .preset-btn:hover {
    animation: glow 2s infinite;
}

/* Math Font for Parameters */
.param-group label {
    font-family: 'Times New Roman', serif;
    font-style: italic;
}