/* Custom styles for Pixel Art Maker */

/* Pixel grid styling */
#pixelGrid {
  display: grid;
  grid-template-columns: repeat(var(--grid-width, 16), 1fr);
  grid-template-rows: repeat(var(--grid-height, 16), 1fr);
  gap: 1px;
  background-color: #f0f0f0;
}

.pixel {
  width: var(--pixel-size, 20px);
  height: var(--pixel-size, 20px);
  background-color: white;
  cursor: pointer;
  transition: background-color 0.1s;
}

.pixel:hover {
  opacity: 0.8;
}

/* Color presets styling */
.color-preset {
  width: 100%;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s;
}

.color-preset:hover {
  transform: scale(1.05);
}

.color-preset.selected {
  box-shadow: 0 0 0 2px #4f46e5, 0 0 0 4px rgba(79, 70, 229, 0.3);
}

/* Frame thumbnails */
.frame-thumbnail {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.frame-thumbnail.active {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.frame-thumbnail .delete-frame {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background-color: rgba(239, 68, 68, 0.8);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.frame-thumbnail:hover .delete-frame {
  opacity: 1;
}

.frame-number {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
}

/* Animation preview */
#animationPreview {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .container {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  #pixelGrid {
    max-width: 100%;
    overflow: auto;
  }
}