/* ==============================
   RESET
============================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}


/* ==============================
   CONTAINER
============================== */

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}


/* ==============================
   HEADER
============================== */

.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: #4f46e5;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav nav a {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  transition: 0.2s;
}

.nav nav a:hover {
  color: #4f46e5;
}


/* ==============================
   HERO
============================== */

.hero {
  padding: 100px 0;
  text-align: center;
  background:
    radial-gradient(circle at top, #eef2ff 0%, #f8fafc 55%);
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -2px;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 32px;
  font-size: 19px;
  color: #64748b;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  background: #4f46e5;
  color: white;
  font-weight: 700;
  transition: 0.2s;
}

.hero-button:hover {
  background: #4338ca;
  transform: translateY(-2px);
}


/* ==============================
   GENERATOR SECTION
============================== */

.generator-section {
  padding: 80px 0;
}

.generator-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  background: white;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.generator-left,
.generator-right {
  min-width: 0;
}

.generator-left h2,
.generator-right h2 {
  margin-bottom: 22px;
  font-size: 25px;
}


/* ==============================
   UPLOAD BOX
============================== */

.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  padding: 30px;
  text-align: center;
  transition: 0.2s;
  background: #f8fafc;
}

.upload-box:hover {
  border-color: #6366f1;
  background: #f5f7ff;
}

.upload-label {
  display: block;
  cursor: pointer;
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 10px;
}

.upload-label h3 {
  font-size: 19px;
  margin-bottom: 6px;
}

.upload-label p {
  color: #64748b;
  margin-bottom: 5px;
}

.upload-label span {
  color: #94a3b8;
  font-size: 13px;
}


/* ==============================
   FORM
============================== */

.form-group {
  margin-top: 22px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: white;
  color: #0f172a;
  outline: none;
  transition: 0.2s;
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
  padding: 14px;
}

.form-group select {
  padding: 13px;
  cursor: pointer;
}

.form-group textarea:focus,
.form-group select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.prompt-count {
  text-align: right;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 5px;
}


/* ==============================
   GENERATE BUTTON
============================== */

.generate-button {
  width: 100%;
  margin-top: 25px;
  padding: 15px 20px;
  border: none;
  border-radius: 12px;
  background: #4f46e5;
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.generate-button:hover:not(:disabled) {
  background: #4338ca;
  transform: translateY(-1px);
}

.generate-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ==============================
   IMAGE PREVIEW
============================== */

.upload-preview {
  margin-top: 20px;
}

.upload-preview img {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}

.remove-image {
  margin-top: 12px;
  padding: 9px 16px;
  border: none;
  border-radius: 9px;
  background: #ef4444;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.remove-image:hover {
  background: #dc2626;
}


/* ==============================
   RESULT
============================== */

#resultContainer {
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.result-image {
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image img {
  display: block;
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 16px;
}

.result-placeholder {
  text-align: center;
  padding: 40px;
  color: #64748b;
}

.result-placeholder h3 {
  color: #334155;
  margin: 15px 0 8px;
}

.result-placeholder p {
  font-size: 14px;
}


/* ==============================
   FEATURES
============================== */

.features-section {
  padding: 80px 0;
  background: #ffffff;
}

.features-section > .container > h2,
.how-section h2,
.faq-section h2 {
  text-align: center;
  font-size: 34px;
  margin-bottom: 45px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 25px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
}

.feature-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.feature-card p {
  color: #64748b;
  font-size: 15px;
}


/* ==============================
   HOW IT WORKS
============================== */

.how-section {
  padding: 80px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.step {
  text-align: center;
}

.step span {
  width: 50px;
  height: 50px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #4f46e5;
  color: white;
  font-weight: 800;
  font-size: 18px;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  color: #64748b;
  font-size: 15px;
}


/* ==============================
   FAQ
============================== */

.faq-section {
  padding: 80px 0;
  background: #ffffff;
}

.faq {
  max-width: 850px;
  margin: 0 auto 18px;
  padding: 22px 25px;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
}

.faq h3 {
  margin-bottom: 7px;
  font-size: 18px;
}

.faq p {
  color: #64748b;
}


/* ==============================
   FOOTER
============================== */

.footer {
  padding: 30px 0;
  text-align: center;
  background: #0f172a;
  color: #cbd5e1;
}

.footer p {
  font-size: 14px;
}


/* ==============================
   ERROR
============================== */

.error-message {
  padding: 35px;
  text-align: center;
  color: #dc2626;
}

.error-message h3 {
  margin-bottom: 10px;
}

.error-message p {
  word-break: break-word;
  font-size: 14px;
}


/* ==============================
   MOBILE
============================== */

@media (max-width: 900px) {

  .generator-card {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}


@media (max-width: 650px) {

  .nav {
    flex-direction: column;
    justify-content: center;
    padding: 15px 0;
    gap: 12px;
  }

  .nav nav {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav nav a {
    font-size: 13px;
  }

  .hero {
    padding: 70px 0;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 16px;
  }

  .generator-section,
  .features-section,
  .how-section,
  .faq-section {
    padding: 55px 0;
  }

  .generator-card {
    padding: 18px;
    border-radius: 18px;
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .features-section > .container > h2,
  .how-section h2,
  .faq-section h2 {
    font-size: 28px;
  }

  #resultContainer,
  .result-image {
    min-height: 320px;
  }

}
