.generate-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.upload-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-left: 10px;
  transition: background-color 0.3s;
  flex: 1;
}

.upload-btn:hover {
  background-color: #2980b9;
}

.upload-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.editor-container {
  margin: 20px 0;
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 800px;
  background-color: #34495e;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #f1c40f;
  font-size: 28px;
}

.prompt-container {
  margin-bottom: 20px;
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.prompt-container label {
  display: block;
  margin-bottom: 8px;
  color: #f1c40f;
  font-weight: bold;
}

textarea {
  width: 100%;
  height: 100px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #7f8c8d;
  margin-bottom: 15px;
  background-color: #2c3e50;
  color: #ecf0f1;
  font-family: inherit;
  resize: vertical;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.generate-btn {
  background-color: #2ecc71;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
  flex: 2;
}

.generate-btn:hover {
  background-color: #27ae60;
}

.generate-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.editor-controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #34495e;
  border-radius: 5px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  background-color: #34495e;
  padding: 5px 10px;
  border-radius: 20px;
}

.zoom-btn {
  background-color: #3498db;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  margin: 0 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zoom-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

#zoom-level {
  font-size: 14px;
  color: #ecf0f1;
  width: 60px;
  text-align: center;
  font-weight: bold;
}

.tool-controls {
  display: flex;
  gap: 10px;
}

.tool-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

#downscale-btn {
  background-color: #2ecc71;  
}

#downscale-btn:hover {
  background-color: #27ae60;  
}

.tool-btn.active {
  background-color: #e74c3c;
}

.canvas-container {
  margin: 0 auto;
  position: relative;
  overflow: auto;
  max-height: 400px;
  border: 2px solid #3498db;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="8" height="8" fill "%23222" /><rect width="8" height="8" fill "%23333" x="8" /><rect width="8" height="8" fill "%23333" y="8" /><rect width="8" height="8" fill "%23222" x="8" y="8" /></svg>');
  border-radius: 5px;
}

#editor-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.image-display {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-top: 10px;
  gap: 20px;
}

.image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #34495e;
  border-radius: 5px;
  padding: 15px;
  width: 45%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.image-card h3 {
  margin-bottom: 15px;
  color: #f1c40f;
  font-size: 16px;
  text-align: center;
  width: 100%;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 8px;
}

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  overflow: hidden;
  border: 2px solid #3498db;
  border-radius: 5px;
}

.image-container.original {
  width: 160px;
  height: 160px;
  background-color: transparent;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="8" height="8" fill "%23ccc" /><rect width="8" height="8" fill "%23fff" x="8" /><rect width="8" height="8" fill "%23fff" y="8" /><rect width="8" height="8" fill "%23ccc" x="8" y="8" /></svg>');
}

.image-container.processed {
  width: 160px;
  height: 160px;
  background-color: transparent;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="8" height="8" fill "%23ccc" /><rect width="8" height="8" fill "%23fff" x="8" /><rect width="8" height="8" fill "%23fff" y="8" /><rect width="8" height="8" fill "%23ccc" x="8" y="8" /></svg>');
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-container.processed img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.image-container img {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.download-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 5px;
}

.download-btn:hover {
  background-color: #2980b9;
}

.download-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.bg-removal-wrapper {
  display: flex;
  align-items: center;
  margin-right: 10px;
  padding: 5px 10px;
  background-color: #2c3e50;
  border-radius: 3px;
}

.bg-removal-wrapper input[type="checkbox"] {
  margin-right: 5px;
}

.bg-removal-wrapper label {
  color: #ecf0f1;
  font-size: 14px;
  cursor: pointer;
}

.editor-options-wrapper {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #34495e;
  border-radius: 5px;
}

.editor-option-section {
  flex: 1;
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 10px;
}

.editor-option-section h4 {
  color: #f1c40f;
  margin: 0 0 10px 0;
  font-size: 14px;
  text-align: center;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 5px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-wrapper {
  display: flex;
  align-items: center;
  background-color: #34495e;
  padding: 5px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.radio-wrapper:hover {
  background-color: #3d566e;
}

.radio-wrapper input[type="radio"] {
  margin-right: 5px;
}

.radio-wrapper label {
  color: #ecf0f1;
  font-size: 13px;
  cursor: pointer;
}

.radio-wrapper input[type="radio"]:checked + label {
  color: #f1c40f;
  font-weight: bold;
}

.library-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background-color: #f1c40f;
  color: #2c3e50;
  padding: 15px 10px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: bold;
  transition: right 0.3s ease;
}

.library-panel {
  position: fixed;
  top: 0;
  right: -300px; /* Hidden by default */
  width: 300px;
  height: 100vh;
  background-color: #34495e;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding: 20px;
}

.library-panel.active {
  right: 0;
}

.library-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 5px 0;
}

.library-section-header h3 {
  margin: 0;
  color: #f1c40f;
  flex: 1;
}

.collapse-icon {
  color: #f1c40f;
  font-size: 14px;
  padding: 0 5px;
}

.library-section-content {
  display: block;
  transition: all 0.3s ease;
}

.library-section {
  margin-bottom: 25px;
}

.library-section h3 {
  color: #f1c40f;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.sprite-grid, .palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.sprite-container {
  position: relative;
  margin-bottom: 10px;
}

.sprite-item {
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.sprite-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.sprite-item.active {
  border: 2px solid #f1c40f;
}

.sizes-dropdown {
  display: none;
  position: absolute;
  width: 100%;
  background-color: #34495e;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.size-option {
  padding: 8px 10px;
  color: #ecf0f1;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
}

.size-option:hover {
  background-color: #2c3e50;
  color: #f1c40f;
}

.sprite-item img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="8" height="8" fill "%23222" /><rect width="8" height="8" fill "%23333" x="8" /><rect width="8" height="8" fill "%23333" y="8" /><rect width="8" height="8" fill "%23222" x="8" y="8" /></svg>');
}

.palette-container {
  position: relative;
  margin-bottom: 10px;
}

.palette-sizes-dropdown {
  display: none;
  position: absolute;
  width: 100%;
  background-color: #34495e;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.palette-item {
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.palette-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.palette-item.active {
  border: 2px solid #f1c40f;
}

.palette-canvas {
  width: 100%;
  height: 80px;
  border-radius: 3px;
}

.sprite-label, .palette-label {
  margin-top: 8px;
  font-size: 12px;
  color: #ecf0f1;
  text-align: center;
}

.library-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 20px;
  cursor: pointer;
}

.library-close:hover {
  color: #f1c40f;
}

.result-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 15px;
  width: 100%;
}

.options-container {
  display: none;
}

.design-sound-btn {
  background-color: #9b59b6;
}

.design-sound-btn:hover {
  background-color: #8e44ad;
  transform: translateY(-2px);
}

.design-sound-btn i {
  margin-right: 8px;
}

.editor-wrapper {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
}

.embedded-options {
  margin-top: 15px;
  background-color: #34495e;
  border-radius: 5px;
  padding: 12px;
}

.arttune-toggle {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background-color: #e74c3c;
  color: white;
  padding: 15px 10px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: bold;
  transition: left 0.3s ease;
}

.arttune-panel {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100vh;
  background-color: #34495e;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  transition: left 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding: 20px;
}

.arttune-panel.active {
  left: 0;
}

.arttune-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 20px;
  cursor: pointer;
}

.arttune-close:hover {
  color: #f1c40f;
}

.arttune-section {
  margin-bottom: 20px;
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 10px 15px;
}

.arttune-section h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 5px;
}

.arttune-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
  padding: 5px;
  background-color: #223344;
  border-radius: 5px;
}

.arttune-control-row input[type="checkbox"] {
  margin-right: 8px;
}

.arttune-control-row label {
  margin-right: 10px;
  flex: 1;
  min-width: 100px;
  font-size: 14px;
}

.arttune-control-row input[type="color"] {
  height: 30px;
  width: 60px;
  background: none;
  border: none;
  cursor: pointer;
}

.arttune-control-row span {
  width: 30px;
  text-align: center;
  font-size: 14px;
  margin-right: 5px;
}

.arttune-control-row input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #7f8c8d;
  border-radius: 3px;
  outline: none;
}

.arttune-control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  background: #f1c40f;
  cursor: pointer;
  border-radius: 50%;
}

.arttune-tool-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  margin-right: 5px;
  font-size: 12px;
}

.arttune-tool-btn:hover {
  background-color: #2980b9;
}

.arttune-tool-btn.active {
  background-color: #e74c3c;
}

.arttune-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  margin-top: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.arttune-btn:hover {
  background-color: #2980b9;
}

.arttune-apply-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.arttune-apply-btn:hover {
  background-color: #c0392b;
}

.mask-tools {
  justify-content: space-between;
}

.feature-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
}

.feature-btn {
  background-color: #9b59b6;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  flex: 1;
  min-width: 150px;
  text-align: center;
}

.feature-btn:hover {
  background-color: #8e44ad;
  transform: translateY(-2px);
}

.feature-btn i {
  margin-right: 8px;
}

.feature-btn.disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.feature-btn.disabled:hover {
  transform: none;
  background-color: #95a5a6;
}

.animate-btn {
  background-color: #e67e22;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: all 0.3s;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

}

.animate-btn:hover {
  background-color: #d35400;
}

.projectiles-btn {
  background-color: #e74c3c;
}

.projectiles-btn:hover:not(.disabled) {
  background-color: #c0392b;
}

.background-btn {
  background-color: #27ae60;
}

.background-btn:hover:not(.disabled) {
  background-color: #219653;
}

.play-btn {
  background-color: #3498db;
}

.play-btn:hover:not(.disabled) {
  background-color: #2980b9;
}

.animation-dropdown {
  margin-top: 5px;
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 8px;
  font-size: 14px;
}

.animation-label {
  color: #f1c40f;
  margin-bottom: 5px;
  font-weight: bold;
}

.animation-option {
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.animation-option:hover {
  background-color: #3498db;
  color: white;
}

.pixel-editor-container {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-top: 0;
}

.pixel-editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  background-color: #34495e;
  padding: 10px;
  border-radius: 5px;
  flex-wrap: wrap;
  gap: 10px;
}

.pixel-editor-control-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pixel-editor-control-group label {
  color: #ecf0f1;
  font-size: 14px;
}

.pixel-editor-control-group select {
  background-color: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #3d566e;
  padding: 5px;
  border-radius: 3px;
}

.pixel-editor-tool-btn {
  background-color: #3498db;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

.pixel-editor-tool-btn:hover {
  background-color: #2980b9;
}

.pixel-editor-tool-btn.active {
  background-color: #e74c3c;
}

.pixel-editor-action-btn {
  background-color: #7f8c8d;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 16px;
}

.pixel-editor-action-btn:hover:not(:disabled) {
  background-color: #95a5a6;
}

.pixel-editor-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pixel-editor-save-btn {
  background-color: #2ecc71;
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}

.pixel-editor-save-btn:hover {
  background-color: #27ae60;
}

.pixel-editor-workspace {
  display: flex;
  gap: 20px;
}

.pixel-editor-canvas-container {
  position: relative;
  width: 512px;
  height: 512px;
  background-color: #1a2531;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><rect width="8" height="8" fill "%23222" /><rect width="8" height="8" fill "%23333" x="8" /><rect width="8" height="8" fill "%23333" y="8" /><rect width="8" height="8" fill "%23222" x="8" y="8" /></svg>');
  border: 2px solid #3498db;
  border-radius: 5px;
  overflow: auto;
}

.pixel-editor-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated !important;
  image-rendering: -moz-crisp-edges !important;
  image-rendering: crisp-edges !important;
}

.pixel-editor-grid-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pixel-editor-palette {
  background-color: #34495e;
  border-radius: 5px;
  padding: 10px;
  width: 200px;
}

.pixel-editor-palette h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 5px;
}

.pixel-editor-selected-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  background-color: #2c3e50;
  padding: 8px;
  border-radius: 5px;
}

.pixel-editor-color-preview {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  border: 1px solid #3d566e;
}

.pixel-editor-color-input {
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.pixel-editor-palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 15px;
}

.pixel-editor-color-box {
  width: 100%;
  padding-bottom: 100%; /* Square aspect ratio */
  border-radius: 3px;
  border: 1px solid #3d566e;
  cursor: pointer;
  transition: transform 0.1s;
}

.pixel-editor-color-box:hover {
  transform: scale(1.1);
  border-color: #f1c40f;
}

.pixel-editor-palette-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pixel-editor-palette-selector label {
  color: #ecf0f1;
  font-size: 14px;
}

.pixel-editor-palette-selector select {
  background-color: #2c3e50;
  color: #ecf0f1;
  border: 1px solid #3d566e;
  padding: 5px;
  border-radius: 3px;
  width: 100px;
}

.collapsible-section {
  background-color: #2c3e50;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 10px 15px;
  background-color: #34495e;
  border-radius: 5px;
}

.collapsible-header h3 {
  color: #f1c40f;
  margin: 0;
}

.collapse-icon {
  color: #f1c40f;
  font-size: 16px;
}

.collapsible-content {
  padding: 15px;
  background-color: #2c3e50;
  border-top: 1px solid #3d566e;
}

.loading {
  display: none;
  text-align: center;
  margin: 20px 0;
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid #f1c40f;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #ecf0f1;
  font-size: 16px;
  font-weight: bold;
}

.pixel-editor-animation-section {
  margin-top: 20px;
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 10px;
  width: 100%;
}

.pixel-editor-animation-section h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  font-size: 16px;
  border-bottom: 1px solid #3d566e;
  padding-bottom: 5px;
}

.pixel-editor-animation-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pixel-editor-anim-select-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pixel-editor-anim-select-container label {
  color: #ecf0f1;
  font-size: 14px;
}

.pixel-editor-anim-select-container select {
  background-color: #34495e;
  color: #ecf0f1;
  border: 1px solid #3d566e;
  padding: 5px;
  border-radius: 3px;
  width: 120px;
}

.pixel-editor-frame-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  background-color: #34495e;
  padding: 8px;
  border-radius: 4px;
}

.pixel-editor-frame-counter {
  color: #ecf0f1;
  font-size: 14px;
  text-align: center;
}

.pixel-editor-frame-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.pixel-editor-frame-btn:hover:not(:disabled) {
  background-color: #2980b9;
}

.pixel-editor-frame-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.pixel-editor-anim-preview-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
}

.pixel-editor-anim-preview-btn:hover:not(:disabled) {
  background-color: #c0392b;
}

.pixel-editor-anim-preview-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

@media (max-width: 850px) {
  .pixel-editor-workspace {
    flex-direction: column;
  }
  
  .pixel-editor-canvas-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }
  
  .pixel-editor-palette {
    width: 100%;
  }
}

.animation-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #2c3e50;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  max-width: 400px;
  z-index: 1000;
  transition: all 0.3s ease;
  opacity: 1;
  border: 2px solid transparent;
}

.animation-popup.info {
  border-color: #3498db;
}

.animation-popup.success {
  border-color: #2ecc71;
}

.animation-popup.warning {
  border-color: #e74c3c;
}

.animation-popup-content {
  color: #ecf0f1;
  font-size: 14px;
  margin-right: 15px;
  flex-grow: 1;
}

.animation-popup-close {
  background: none;
  border: none;
  color: #95a5a6;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.animation-popup-close:hover {
  color: #f1c40f;
}

.animation-popup.fadeout {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}

@keyframes popupAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.animation-popup {
  animation: popupAppear 0.3s ease forwards;
}