* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #ffffff; color: #1a1a1a; overflow: hidden; }
#canvas-container { width: 100vw; height: 100vh; position: relative; }
canvas { display: block; }
.control-panel { position: fixed; top: 20px; right: 20px; z-index: 100; width: 280px; background: #ffffff; border: 1px solid #e0e0e0; border-radius: 12px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); overflow: hidden; font-size: 13px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e0e0e0; background: #fafafa; flex-shrink: 0; }
.panel-header h3 { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.panel-toggle { background: none; border: 1px solid #d0d0d0; border-radius: 6px; padding: 6px 10px; font-size: 11px; cursor: pointer; color: #666; transition: all 0.15s ease; }
.panel-toggle:hover { background: #f0f0f0; border-color: #c0c0c0; }
.panel-content { padding: 16px 20px; overflow-y: auto; flex: 1; }
.panel-section { margin-bottom: 20px; }
.panel-section:last-child { margin-bottom: 0; }
.section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #999; margin-bottom: 12px; }
.control-group { margin-bottom: 16px; }
.control-group:last-child { margin-bottom: 0; }
.control-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 12px; color: #333; }
.control-value { font-size: 12px; color: #666; font-family: 'Monaco', 'Menlo', monospace; background: #f5f5f5; padding: 2px 8px; border-radius: 4px; transition: background 0.3s ease, color 0.3s ease; }
.control-value.changed { background: #e8f4ff; color: #4A90D9; }
input[type="range"] { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; background: #e8e8e8; border-radius: 3px; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #4A90D9; cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #4A90D9; border: none; cursor: pointer; }
select { width: 100%; padding: 10px 12px; border: 1px solid #d0d0d0; border-radius: 6px; background: #ffffff; font-size: 13px; color: #1a1a1a; cursor: pointer; outline: none; }
.btn-group { display: flex; gap: 8px; }
.btn { flex: 1; padding: 10px 16px; border: 1px solid #d0d0d0; border-radius: 6px; background: #ffffff; font-size: 12px; font-weight: 500; color: #333; cursor: pointer; transition: all 0.15s ease; }
.btn:hover { background: #f5f5f5; border-color: #c0c0c0; }
.btn.primary { background: #4A90D9; border-color: #4A90D9; color: #ffffff; }
.btn.primary:hover { background: #3a7bc8; }
.btn.danger { background: #ffffff; border-color: #E85D4D; color: #E85D4D; }
.btn.danger:hover { background: #fff0ef; }
.info-panel { position: fixed; top: 20px; left: 20px; z-index: 10; background: rgba(255, 255, 255, 0.95); border: 1px solid #e0e0e0; padding: 16px 20px; border-radius: 8px; font-size: 13px; line-height: 1.6; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); max-width: 320px; }
.stats { position: fixed; top: 20px; right: 20px; z-index: 10; background: rgba(255, 255, 255, 0.95); border: 1px solid #e0e0e0; padding: 12px 16px; border-radius: 8px; font-size: 12px; font-family: 'Monaco', 'Menlo', monospace; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); color: #333; }
.spawn-hint { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; background: rgba(255, 255, 255, 0.95); border: 1px solid #e0e0e0; padding: 10px 20px; border-radius: 8px; font-size: 13px; color: #666; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.control-panel.collapsed .panel-content { display: none; }
