* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans SC', 'Inter', sans-serif; background: #0a0a0a; color: #e5e5e5; overflow: hidden; height: 100vh; width: 100vw; user-select: none; }
.app-layout { display: grid; grid-template-columns: 220px 1fr 300px; grid-template-rows: 40px 1fr; height: 100vh; width: 100vw; }
.top-bar { grid-column: 1 / -1; background: #1a1a1a; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; padding: 0 12px; gap: 8px; z-index: 100; }
.float-bar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; background: #1e1e1e; border: 1px solid #333; border-radius: 12px; padding: 4px; z-index: 100; box-shadow: 0 4px 24px rgba(0,0,0,0.5); }
.float-btn { height: 36px; min-width: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; background: transparent; border: none; color: #a3a3a3; cursor: pointer; transition: all 0.15s; position: relative; padding: 0 10px; font-size: 12px; font-family: inherit; white-space: nowrap; }
.float-btn:hover { background: #2a2a2a; color: #e5e5e5; }
.float-btn.active { background: #FA5A0A; color: #fff; }
.float-btn .ftip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #1a1a1a; border: 1px solid #333; padding: 4px 10px; border-radius: 6px; font-size: 11px; color: #e5e5e5; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 200; }
.float-btn:hover .ftip { opacity: 1; }
.pages-panel { background: #141414; border-right: 1px solid #2a2a2a; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.panel-header { padding: 10px 12px; border-bottom: 1px solid #2a2a2a; display: flex; justify-content: space-between; align-items: center; }
.panel-title { font-size: 11px; font-weight: 600; color: #737373; text-transform: uppercase; letter-spacing: 0.05em; }
.page-item { padding: 8px 12px; margin: 2px 8px; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #a3a3a3; border: 1px solid transparent; }
.page-item:hover { background: #1a1a1a; color: #e5e5e5; }
.page-item.active { background: rgba(250, 90, 10, 0.1); color: #FF8C42; border-color: rgba(250, 90, 10, 0.3); }
.page-thumb { width: 28px; height: 28px; border-radius: 4px; background: #0a0a0a; border: 1px solid #333; flex-shrink: 0; overflow: hidden; }
.canvas-area { position: relative; overflow: hidden; touch-action: none; min-height: 0; }
.canvas-area.panning { cursor: grabbing; }
.canvas-area.ready-to-draw { cursor: crosshair; }
.infinite-grid { position: absolute; top: -10000px; left: -10000px; width: 20000px; height: 20000px; background-image: linear-gradient(rgba(61, 61, 61, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 61, 61, 0.3) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.canvas-viewport { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-origin: 0 0; }
.shape-element { position: absolute; cursor: move; transition: box-shadow 0.2s; }
.shape-element:hover { box-shadow: 0 0 0 1px #FA5A0A; }
.shape-element.selected { box-shadow: 0 0 0 2px #FA5A0A; }
.shape-element.selected::after { content: ''; position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px; border: 1px dashed #FA5A0A; border-radius: inherit; pointer-events: none; }
.resize-handle { position: absolute; width: 10px; height: 10px; background: #fff; border: 2px solid #FA5A0A; border-radius: 50%; display: none; z-index: 10; }
.shape-element.selected .resize-handle { display: block; }
.resize-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.resize-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.resize-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.resize-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.right-panel { background: #141414; border-left: 1px solid #2a2a2a; overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.custom-scroll::-webkit-scrollbar { width: 5px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.prop-section { border-bottom: 1px solid #2a2a2a; padding: 14px 16px; }
.prop-section:last-child { border-bottom: none; }
.prop-label { font-size: 11px; color: #525252; font-weight: 500; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.slider-track { -webkit-appearance: none; appearance: none; height: 3px; border-radius: 2px; background: #333; outline: none; width: 100%; }
.slider-track::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #FA5A0A; cursor: pointer; box-shadow: 0 0 8px rgba(250, 90, 10, 0.4); }
.input-field { background: #0a0a0a; border: 1px solid #333; border-radius: 6px; padding: 6px 10px; font-size: 12px; color: #e5e5e5; width: 100%; outline: none; transition: all 0.2s; font-family: 'JetBrains Mono', monospace; }
.input-field:focus { border-color: #FA5A0A; box-shadow: 0 0 0 2px rgba(250, 90, 10, 0.1); }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
.segmented-control { display: flex; background: #0a0a0a; border-radius: 6px; padding: 2px; gap: 1px; border: 1px solid #333; }
.segmented-btn { flex: 1; padding: 5px 8px; border-radius: 4px; border: none; background: transparent; color: #737373; font-size: 11px; cursor: pointer; transition: all 0.15s; }
.segmented-btn.active { background: #262626; color: #e5e5e5; font-weight: 500; }
.color-swatch { width: 24px; height: 24px; border-radius: 5px; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; }
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { border-color: #FA5A0A; box-shadow: 0 0 0 2px rgba(250, 90, 10, 0.25); }
.preset-tag { padding: 4px 10px; border-radius: 4px; font-size: 11px; background: #0a0a0a; color: #737373; cursor: pointer; border: 1px solid #333; transition: all 0.15s; }
.preset-tag:hover { border-color: #444; color: #a3a3a3; }
.preset-tag.active { background: rgba(250, 90, 10, 0.12); color: #FF8C42; border-color: #FA5A0A; }
.ai-btn { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #333; background: rgba(250, 90, 10, 0.08); color: #FF8C42; font-size: 12px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ai-btn:hover { border-color: #FA5A0A; background: rgba(250, 90, 10, 0.15); }
.zoom-indicator { position: absolute; bottom: 16px; right: 16px; background: #1a1a1a; border: 1px solid #333; border-radius: 6px; padding: 4px 10px; font-size: 11px; color: #737373; font-family: 'JetBrains Mono', monospace; z-index: 50; }
.empty-canvas { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #404040; pointer-events: none; }
.draw-preview { position: absolute; border: 1px dashed #FA5A0A; background: rgba(250, 90, 10, 0.05); pointer-events: none; }
.btn-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; color: #737373; cursor: pointer; transition: all 0.15s; }
.btn-icon:hover { background: #262626; color: #e5e5e5; }
.btn-icon.active { background: #FA5A0A; color: #fff; }
.page-item:hover .page-delete-btn { opacity: 1 !important; }
.page-name-edit { background: #0a0a0a; border: 1px solid #FA5A0A; border-radius: 4px; padding: 2px 6px; font-size: 12px; color: #e5e5e5; width: 100%; outline: none; font-family: 'Noto Sans SC', 'Inter', sans-serif; }

