.animate-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);
  display: none;
}

.animate-content-wrapper {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.animate-sprite-section, 
.animate-control-section {
  background-color: #2c3e50;
  border-radius: 8px;
  padding: 15px;
  flex: 1;
}

.animation-preview {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
  height: 256px;
}

.animation-canvas {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  max-width: 100%;
  max-height: 100%;
  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="%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>');
}

.animate-sprite-grid-section {
  margin-top: 20px;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
}

.animate-sprite-grid-section h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  text-align: center;
}

.animate-sprite-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.animate-sprite-thumbnail {
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 5px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  height: 60px;
}

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

.animate-sprite-thumbnail.active {
  border: 2px solid #f1c40f;
  background-color: #34495e;
}

.animate-sprite-thumbnail img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.back-btn {
  background-color: #7f8c8d;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

.back-btn:hover {
  background-color: #95a5a6;
}

.animation-type-control {
  margin: 15px 0;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
  display: flex;
  align-items: center;
}

.animation-type-control label {
  color: #ecf0f1;
  margin-right: 10px;
  min-width: 120px;
}

.animation-type-control select {
  flex: 1;
  background-color: #34495e;
  color: #ecf0f1;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.animation-type-control select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3498db;
}

.fps-control {
  margin: 15px 0;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
  display: flex;
  align-items: center;
}

.fps-control label {
  color: #ecf0f1;
  margin-right: 10px;
  min-width: 120px;
}

.fps-control span {
  color: #f1c40f;
  margin-right: 10px;
  min-width: 30px;
  text-align: center;
}

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

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

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

.animation-param-section {
  margin: 15px 0;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
}

.animation-param-section h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
}

.param-control {
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.param-control label {
  color: #ecf0f1;
  margin-right: 10px;
  min-width: 100px;
}

.param-control span {
  color: #f1c40f;
  margin-right: 10px;
  min-width: 40px;
  text-align: center;
}

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

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

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

.animation-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.animation-generate-btn,
.animation-play-btn,
.animation-stop-btn,
.animation-export-btn,
.animation-add-to-library-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  flex: 1;
  text-align: center;
}

.animation-generate-btn {
  background-color: #2ecc71;
  flex: 2;
}

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

.animation-play-btn {
  background-color: #f1c40f;
}

.animation-play-btn:hover {
  background-color: #f39c12;
}

.animation-stop-btn {
  background-color: #e74c3c;
}

.animation-stop-btn:hover {
  background-color: #c0392b;
}

.animation-export-btn:hover,
.animation-add-to-library-btn:hover {
  background-color: #2980b9;
}

.animation-generate-btn:disabled,
.animation-play-btn:disabled,
.animation-stop-btn:disabled,
.animation-export-btn:disabled,
.animation-add-to-library-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.frame-navigation {
  margin-top: 20px;
  background-color: #1a2531;
  border-radius: 5px;
  padding: 10px;
}

.frame-navigation h4 {
  color: #f1c40f;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  text-align: center;
}

.frame-display {
  color: #ecf0f1;
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
}

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

.prev-frame-btn,
.next-frame-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
  flex: 1;
}

.prev-frame-btn:hover,
.next-frame-btn:hover {
  background-color: #2980b9;
}

.prev-frame-btn:disabled,
.next-frame-btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.animate-sprite-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #2c3e50;
  border-radius: 5px;
  padding: 5px;
  margin-bottom: 10px;
}

.animate-sprite-resolution {
  width: 100%;
  margin-top: 5px;
  background-color: #34495e;
  color: #ecf0f1;
  border: none;
  padding: 5px;
  border-radius: 3px;
  font-size: 12px;
  text-align-last: center;
}

.animate-sprite-resolution option {
  background-color: #34495e;
  color: #ecf0f1;
}

