.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}
.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background-color: #2a2a2a;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #404040;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  min-width: 600px;
}
.modal-header {
  font-size: 18px;
  font-weight: bold;
  color: #00bcd4;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #404040;
}
.modal-close {
  float: right;
  font-size: 28px;
  font-weight: bold;
  color: #00bcd4;
  cursor: pointer;
  line-height: 20px;
}
.modal-close:hover {
  color: #00e5ff;
}
.settings-modal-content {
  min-width: 500px;
  max-width: 700px;
}
.settings-section {
  margin-bottom: 24px;
}
.settings-section-title {
  font-size: 14px;
  font-weight: bold;
  color: #90caf9;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #333;
}
.settings-row label {
  color: #b0bec5;
}
.settings-row input,
.settings-row select {
  width: 200px;
  padding: 8px;
  background-color: #1a1a1a;
  border: 1px solid #404040;
  border-radius: 4px;
  color: #e0e0e0;
}
.generated-image-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
}
.generated-image-header span {
  font-size: 13px;
  color: #90caf9;
}
.generated-image-container {
  flex: 1;
  background-color: #1a1a1a;
  border: 1px solid #404040;
  border-radius: 4px;
  overflow-y: auto;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: min-content;
  gap: 6px;
  min-height: 0;
  align-content: start;
}
.generated-image-item {
  position: relative;
  border: 1px solid #404040;
  border-radius: 4px;
  overflow: hidden;
  background-color: #2a2a2a;
  cursor: pointer;
  aspect-ratio: 1/1;
}
.generated-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.download-button {
  position: absolute;
  bottom: 4px;
  right: 4px;
  padding: 4px 8px;
  background-color: rgba(0, 188, 212, 0.9);
  border: none;
  color: #1a1a1a;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: bold;
  transition: all 0.2s;
  opacity: 0;
}
.generated-image-item:hover .download-button {
  opacity: 1;
}
.download-button:hover {
  background-color: #00e5ff;
}
.generated-image-info {
  padding: 3px 6px;
  font-size: 10px;
  color: #888;
  background-color: #1a1a1a;
}
.image-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
}
.image-modal.active {
  display: block;
}
.image-modal-inner {
  width: 100%;
  height: 100%;
  overflow: auto;
}
.image-modal-inner:not(.zoomed) {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.image-modal-inner.zoomed {
  cursor: grab;
}
.image-modal-inner.zoomed:active {
  cursor: grabbing;
}
.image-modal img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  transform-origin: 0 0;
}
.image-modal-inner.zoomed img {
  max-width: none;
  max-height: none;
}
.image-modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 3001;
}
.image-modal-close:hover {
  color: #00bcd4;
}
