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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  padding: 20px;
  color: #333;
  overflow: hidden;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2.1rem;
  font-weight: 300;
  margin-bottom: 5px;
}

.header p {
  opacity: 0.8;
  font-size: 0.9rem;
}

.main-content {
  height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
}

.images-container {
  display: flex;
  gap: 100px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
}

.image-box {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  width: 40vw;
  max-width: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-area {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s ease;
  background: rgba(250, 250, 250, 0.95);
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

.upload-area:hover {
  background: rgba(240, 240, 240, 0.95);
}

.upload-area.dragover {
  background: rgba(232, 232, 232, 0.95);
}

.upload-area.has-image {
  opacity: 0;
}

.upload-area.has-image:hover {
  opacity: 1;
}

.upload-icon {
  font-size: 3rem;
  color: #ccc;
  margin-bottom: 20px;
}

.upload-text {
  color: #666;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.upload-button {
  background: #333;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.upload-button:hover {
  background: #555;
}

.clarification {
  color: #666;
  font-size: 0.8rem;
  text-align: center;
  margin-top: 20px;
}

.image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
}

.svg-preview {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

  100% {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
}

.controls-container {
  margin-top: 30px;
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.controls-title {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 500;
}

.parameter-group {
  display: flex;
  flex-direction: column;
}

.parameter-label {
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.parameter-input {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.3s ease;
}

.parameter-input:focus {
  outline: none;
  border-color: #666;
}

.style-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.color-picker {
  width: 100%;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.range-input {
  width: 100%;
}

.generate-button {
  width: 100%;
  background: #333;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.generate-button:hover {
  background: #555;
}

.generate-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.placeholder-text {
  color: #999;
  font-size: 1rem;
  text-align: center;
  padding: 40px 20px;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .images-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .parameters-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .style-controls {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .main-content {
    padding: 20px;
  }
}

.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.tooltip-icon {
  display: inline-block;
  background-color: #0077cc;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 12px;
  text-align: center;
  user-select: none;
}

.tooltip-text {
  visibility: hidden;
  width: 30ch;
  background-color: #333;
  color: #fff;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
  z-index: 10;
}

/* Little arrow below tooltip */
.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
