/* Enhanced styles for the refactored app */
:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color: #213547;
  background-color: #ffffff;
}

body {
  margin: 0;
  padding: 2rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.tools {
  max-width: 960px;
  margin: 0 auto 2rem;
}

.instructions {
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grid img:hover {
  transform: scale(1.05);
}

.palette {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.palette div {
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dominant-color {
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-weight: bold;
  color: white;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

input[type="file"] {
  display: none;
}

label[for="file"] {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  border: 2px dashed #ccc;
  border-radius: 4px;
  cursor: pointer;
  background-color: #f9f9f9;
  transition: background-color 0.2s;
}

label[for="file"]:hover {
  background-color: #eee;
}

/* Preview container styles */
.preview-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.image-preview {
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.image-details {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

details {
  margin-bottom: 1rem;
}

summary {
  cursor: pointer;
  padding: 0.5rem 0;
  font-weight: bold;
}

textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  resize: vertical;
  margin-top: 0.5rem;
}

.hover-instructions {
  font-style: italic;
  color: #666;
  text-align: center;
  margin-top: 1rem;
}

/* Style for the placeholder class */
.i-placeholder {
  background-size: cover;
  transition: background 0.3s ease-in-out;
}

@media (max-width: 960px) {
  body {
    padding: 1rem;
  }

  .preview-container {
    width: 100%;
  }
}
