/* =====================================
   TAMILAI IMAGE CREATOR V2 FINAL
===================================== */
#imageCreatorPopup {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 999999;
}
.image-creator-popup {
  width: 680px;
  max-width: 92%;
  background: linear-gradient(
    145deg,
    rgba(4, 15, 35, 0.98),
    rgba(5, 30, 60, 0.98)
  );
  border: 1px solid rgba(0, 229, 255, 0.7);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  box-shadow:
    0 0 20px rgba(0, 229, 255, 0.4),
    0 0 50px rgba(0, 229, 255, 0.25),
    inset 0 0 20px rgba(0, 229, 255, 0.08);
  overflow: hidden;
}
/* Glow Ring */
.image-creator-popup::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 255, 0.6),
    transparent
  );
  animation: borderGlow 4s linear infinite;
  z-index: -1;
}
@keyframes borderGlow {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
/* TITLE */
.image-creator-popup h2 {
  text-align: center;
  color: var(--primary);
  font-size: 32px;
  margin-bottom: 10px;
  text-shadow:
    0 0 10px var(--primary),
    0 0 20px var(--primary);
}
/* TEXTAREA */
#imagePrompt {
  width: 100%;
  min-height: 120px;
  resize: none;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid rgba(0, 229, 255, 0.6);
  background: #09244d;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.1);
}
/* SELECT */
#imageStyle,
#imageSize {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  background: #09244d;
  color: var(--text-primary);
  padding: 0 14px;
  margin-top: 12px;
}
/* BUTTONS */
.image-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.image-buttons button {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
}
#generateImageBtn {
  background: #00d9ff;
  color: #001827;
  box-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}
#generateImageBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 217, 255, 0.9);
}
#closeImageCreatorBtn {
  background: #1b2f5f;
  color: var(--text-primary);
}
/* RESULT */
.image-results {
  margin-top: 18px;
  min-height: 260px;
  max-height: 350px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 18px;
  background: #071f40;
  border: 1px solid rgba(0, 229, 255, 0.25);
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.05);
}
.image-placeholder {
  text-align: center;
  color: #9cefff;
  font-size: 18px;
  padding-top: 90px;
}
.generated-image {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--primary);
}
/* =====================================
   MOBILE FINAL
===================================== */
@media (max-width: 768px) {
  .image-creator-popup {
    width: 88%;
    padding: 14px;
    border-radius: 18px;
  }
  .image-creator-popup h2 {
    font-size: 16px;
  }
  #imagePrompt {
    min-height: 70px;
    font-size: 12px;
    padding: 10px;
  }
  #imageStyle,
  #imageSize {
    height: 38px;
    font-size: 12px;
    margin-top: 8px;
  }
  .image-buttons {
    gap: 8px;
  }
  .image-buttons button {
    height: 38px;
    font-size: 12px;
  }
  .image-results {
    min-height: 120px;
    max-height: 180px;
    padding: 10px;
  }
  .image-placeholder {
    padding-top: 35px;
    font-size: 12px;
  }
}
