.grid-container{flex:1;display:flex;justify-content:center;align-items:center;padding:2rem;overflow:hidden;background-color:#0f172a;background-image:radial-gradient(#1e293b 1px,transparent 1px);background-size:20px 20px}.pixel-grid{box-shadow:0 0 20px #00000080;cursor:crosshair;-webkit-user-select:none;user-select:none}.pixel{width:100%;height:100%}.pixel-grid.show-lines .pixel{box-shadow:inset 0 0 0 .5px var(--grid-line)}.toolbar-container{display:flex;flex-direction:column;gap:1rem}.section-title{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--text-secondary);font-weight:600;margin-bottom:.25rem}.tools-grid,.history-controls{display:flex;gap:.5rem;flex-wrap:wrap}.tool-btn{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;background-color:var(--bg-primary);border:1px solid var(--border);color:var(--text-secondary);transition:all .2s ease}.tool-btn:hover:not(:disabled){background-color:var(--bg-secondary);color:var(--text-primary);border-color:var(--text-secondary)}.tool-btn.active{background-color:var(--accent);color:#fff;border-color:var(--accent)}.tool-btn:disabled{opacity:.5;cursor:not-allowed}.color-picker-container{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem;background-color:var(--bg-primary);padding:.5rem;border-radius:8px;border:1px solid var(--border)}.color-preview{width:32px;height:32px;border-radius:6px;overflow:hidden;position:relative;border:1px solid rgba(255,255,255,.1)}.color-input{position:absolute;top:-50%;left:-50%;width:200%;height:200%;cursor:pointer;opacity:0}.hex-code{font-family:monospace;font-size:.9rem;color:var(--text-primary)}.colors-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:.5rem}.color-btn{width:100%;aspect-ratio:1;border-radius:6px;border:2px solid transparent;transition:transform .1s}.color-btn:hover{transform:scale(1.1);z-index:1}.color-btn.active{border-color:#fff;box-shadow:0 0 0 2px var(--accent)}.add-color-btn{margin-left:auto;width:28px;height:28px;border-radius:4px;display:flex;align-items:center;justify-content:center;background-color:var(--bg-secondary);border:1px solid var(--border);color:var(--text-secondary);transition:all .2s}.add-color-btn:hover{background-color:var(--accent);color:#fff;border-color:var(--accent)}.custom-header{display:flex;justify-content:space-between;align-items:center;margin-top:.5rem;margin-bottom:.5rem}.clear-palette-btn{background:transparent;border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;padding:4px;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:all .2s;background-color:var(--bg-primary)}.clear-palette-btn:hover{background-color:#f43f5e1a;border-color:#f43f5e;color:#f43f5e}.brush-size-selector{display:flex;gap:.5rem}.brush-size-btn{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;background-color:var(--bg-primary);border:1px solid var(--border);color:var(--text-secondary);transition:all .2s ease}.brush-size-btn:hover{background-color:var(--bg-secondary);border-color:var(--text-secondary)}.brush-size-btn.active{background-color:var(--accent);border-color:var(--accent)}.brush-size-preview{background-color:var(--text-secondary);border-radius:50%;transition:background-color .2s}.brush-size-btn:hover .brush-size-preview{background-color:var(--text-primary)}.brush-size-btn.active .brush-size-preview{background-color:#fff}.tool-options-container{animation:slideIn .3s cubic-bezier(.4,0,.2,1)}@keyframes slideIn{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.tool-options-content{animation:fadeIn .2s ease-in-out}.shape-fill-selector{display:flex;gap:.5rem}.fill-mode-btn{width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;background-color:var(--bg-primary);border:1px solid var(--border);color:var(--text-secondary);transition:all .2s ease}.fill-mode-btn:hover{background-color:var(--bg-secondary);border-color:var(--text-secondary);color:var(--text-primary)}.fill-mode-btn.active{background-color:var(--accent);border-color:var(--accent);color:#fff}.controls-container{display:flex;flex-direction:column;gap:1rem;margin-top:auto;padding-top:1rem;border-top:1px solid var(--border)}.control-group{display:flex;flex-direction:column;gap:.25rem;color:var(--text-secondary);font-size:.9rem}.size-slider{width:100%;accent-color:var(--accent)}.actions-grid,.export-buttons{display:grid;grid-template-columns:1fr;gap:.5rem}.export-buttons{grid-template-columns:1fr 1fr 1fr}.action-btn{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.5rem;background-color:var(--bg-primary);border:1px solid var(--border);color:var(--text-primary);border-radius:6px;font-size:.85rem;transition:all .2s}.action-btn:hover{background-color:var(--bg-secondary);border-color:var(--text-secondary)}.action-btn.danger{color:#f43f5e;border-color:#f43f5e4d}.action-btn.danger:hover{background-color:#f43f5e1a;border-color:#f43f5e}.label-row{display:flex;justify-content:space-between;align-items:center}.reset-btn{padding:2px 6px;border-radius:4px;background-color:var(--bg-primary);border:1px solid var(--border);color:var(--text-secondary);display:flex;align-items:center;justify-content:center}.reset-btn:hover{color:var(--text-primary);border-color:var(--text-secondary)}.bg-picker-container{background-color:var(--bg-primary);padding:.5rem;border-radius:8px;border:1px solid var(--border)}.bg-preview-row{display:flex;align-items:center;gap:.75rem}.bg-type-btn{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);background-color:var(--bg-secondary);color:var(--text-secondary);transition:all .2s}.bg-type-btn:hover{border-color:var(--text-secondary);color:var(--text-primary)}.bg-type-btn.active{background-color:var(--accent);color:#fff;border-color:var(--accent)}.bg-color-input-wrapper{width:32px;height:32px;border-radius:6px;overflow:hidden;border:1px solid rgba(255,255,255,.1);position:relative;flex-shrink:0}.bg-color-input-wrapper input{position:absolute;top:-50%;left:-50%;width:200%;height:200%;cursor:pointer;opacity:0}.toggle-btn{width:44px;height:24px;background-color:var(--bg-primary);border:1px solid var(--border);border-radius:12px;position:relative;transition:all .2s;cursor:pointer}.toggle-btn.active{background-color:var(--accent);border-color:var(--accent)}.toggle-handle{width:18px;height:18px;background-color:var(--text-secondary);border-radius:50%;position:absolute;top:2px;left:2px;transition:all .2s}.toggle-btn.active .toggle-handle{transform:translate(20px);background-color:#fff}.toggle-btn:hover .toggle-handle{background-color:var(--text-primary)}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);animation:fadeIn .2s ease-out}.modal-content{background-color:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:1.5rem;width:90%;max-width:400px;box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;animation:slideUp .2s ease-out}.modal-title{margin:0 0 1rem;font-size:1.25rem;font-weight:600;color:var(--text-primary)}.modal-body{color:var(--text-secondary);margin-bottom:1.5rem;line-height:1.5}.modal-actions{display:flex;justify-content:flex-end;gap:.75rem}.modal-btn{padding:.5rem 1rem;border-radius:6px;font-weight:500;transition:all .2s;border:1px solid transparent}.modal-btn.cancel{background-color:transparent;border-color:var(--border);color:var(--text-secondary)}.modal-btn.cancel:hover{background-color:#ffffff0d;color:var(--text-primary)}.modal-btn.primary{background-color:var(--accent);color:#fff}.modal-btn.primary:hover{background-color:var(--accent-hover)}.modal-btn.danger{background-color:#ef4444;color:#fff}.modal-btn.danger:hover{background-color:#dc2626}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(20px);opacity:0}to{transform:translateY(0);opacity:1}}.credit-widget{position:fixed;bottom:1rem;right:1rem;display:flex;align-items:center;gap:.5rem;padding:.4rem .75rem;background-color:#0f172acc;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid var(--border);border-radius:20px;text-decoration:none;color:var(--text-primary);box-shadow:0 4px 12px #0003;transition:all .3s cubic-bezier(.4,0,.2,1);z-index:1000}.credit-widget:hover{transform:translateY(-2px);box-shadow:0 8px 20px #0000004d;border-color:var(--accent);background-color:#0f172af2}.credit-content{display:flex;align-items:center;gap:.3rem;line-height:1.2}.credit-text{font-size:.7rem;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.05em}.credit-name{font-size:.8rem;font-weight:700;background:linear-gradient(to right,#3b82f6,#8b5cf6);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.credit-icon{width:20px;height:20px;border-radius:4px;filter:drop-shadow(0 0 2px rgba(139,92,246,.2));transition:transform .3s ease}.credit-widget:hover .credit-icon{transform:rotate(10deg) scale(1.1)}@media (max-width: 768px){.credit-widget{bottom:1rem;right:1rem;padding:.5rem .75rem}.credit-icon{width:24px;height:24px}.credit-name{font-size:.8rem}.credit-text{font-size:.6rem}.credit-widget.collapsed{padding:.5rem}.credit-widget.collapsed .credit-content{display:none}}.app-layout{display:flex;height:100vh;width:100vw;overflow:hidden}.sidebar{width:300px;background-color:var(--bg-secondary);border-right:1px solid var(--border);display:flex;flex-direction:column;padding:1rem;gap:1.25rem;overflow-y:auto;z-index:10;box-shadow:4px 0 24px #0003;transition:all .3s ease-in-out}.sidebar.closed{width:0;padding:0;overflow:hidden;border-right:none;opacity:0}.sidebar-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem;padding-bottom:.5rem;border-bottom:1px solid transparent}.logo-container{display:flex;align-items:center;gap:.75rem}.logo-icon{width:28px;height:28px;border-radius:6px;image-rendering:pixelated;filter:drop-shadow(0 0 4px rgba(139,92,246,.3));transition:transform .2s}.logo-container:hover .logo-icon{transform:scale(1.1) rotate(-5deg)}.logo{font-size:1.5rem;font-weight:800;background:linear-gradient(to right,#3b82f6,#8b5cf6);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;margin:0;line-height:1;padding-top:2px}.sidebar-close-btn{background:transparent;border:none;color:var(--text-secondary);cursor:pointer;padding:6px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.sidebar-close-btn:hover{background-color:var(--bg-primary);color:var(--text-primary)}.main-content{flex:1;display:flex;flex-direction:column;position:relative}.sidebar-open-btn{position:absolute;top:1rem;left:1rem;z-index:5;background-color:var(--bg-secondary);border:1px solid var(--border);color:var(--text-primary);width:40px;height:40px;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 6px -1px #0000001a;transition:all .2s}.sidebar-open-btn:hover{background-color:var(--accent);color:#fff;border-color:var(--accent)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--bg-primary)}::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-secondary)}@media (max-width: 768px){.sidebar{position:fixed;top:0;left:0;bottom:0;transform:translate(-100%);width:80%;max-width:300px;opacity:1;padding:1rem}.sidebar.open{transform:translate(0);width:80%}.sidebar.closed{transform:translate(-100%);width:80%;padding:1rem;opacity:1}.sidebar-open-btn{display:flex}}:root{--bg-primary: #0f172a;--bg-secondary: #1e293b;--text-primary: #f8fafc;--text-secondary: #94a3b8;--accent: #3b82f6;--accent-hover: #2563eb;--border: #334155;--grid-line: #334155}body{margin:0;font-family:Inter,system-ui,-apple-system,sans-serif;background-color:var(--bg-primary);color:var(--text-primary);min-height:100vh}.app-container{display:flex;flex-direction:column;height:100vh}button{cursor:pointer;border:none;background:none;color:inherit;font-family:inherit}
