body {
  font-family: 'Poppins', sans-serif;
  background-color: #fdf5e6;
  color: #36454f;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  box-sizing: border-box;
}

.container {
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  max-width: 900px;
  width: 100%;
  text-align: center;
  border: 1px solid #ffc0cb;
}

/* Header and Logo Styling */
.app-header {
  margin-bottom: 30px;
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.app-logo {
  height: 60px;
  width: auto;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
  font-size: 3.2em;
  color: #ff69b4;
  font-weight: 700;
  margin: 0;
  letter-spacing: 1px;
}

.app-header p {
  font-size: 1.1em;
  color: #5a5a5a;
  margin-top: 10px;
}

/* Section Descriptions */
.section-description {
  font-size: 1.05em;
  color: #555;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Upload Area */
.upload-section {
  margin-bottom: 40px;
}

.upload-area {
  border: 3px dashed #ffc0cb;
  border-radius: 12px;
  padding: 50px 30px;
  background-color: #fff0f5;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #ff69b4;
  background-color: #ffe0f0;
}

.upload-area p {
  font-size: 1.2em;
  color: #666;
  margin-bottom: 15px;
  font-weight: 600;
}

.upload-area {
  position: relative;
  border: 3px dashed #ffc0cb;
  border-radius: 12px;
  padding: 50px 30px;
  background-color: #fff0f5;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 300px;
  overflow: hidden;
}

.uploaded-preview {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
}

.uploaded-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  border: 2px solid #ff69b4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ff69b4;
  color: white;
  font-weight: bold;
  font-size: 1.3em;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.remove-image:hover {
  background-color: #dc143c;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.or-text {
  font-size: 1em;
  color: #888;
  margin: 15px 0;
}

#uploadButton {
  background-color: #87ceeb;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(135, 206, 235, 0.4);
}

#uploadButton:hover {
  background-color: #6495ed;
  transform: translateY(-2px);
}

/* Image Preview */
.image-preview {
  margin: 30px auto;
  max-width: 100%;
}

.image-preview img {
  max-width: 350px;
  max-height: 350px;
  width: auto;
  height: auto;
  border: 3px solid #ff69b4;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

/* Results and AI Review Sections */
.results-section,
.ai-review-section {
  background-color: #fffafa;
  border: 1px solid #ffc0cb;
  border-radius: 12px;
  padding: 25px;
  margin-top: 35px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.results-section h2,
.ai-review-section h2 {
  text-align: center;
  font-size: 1.8em;
  color: #ff69b4;
  margin-bottom: 20px;
  font-weight: 600;
}

#predictionResult {
  font-size: 1.8em;
  font-weight: bold;
  color: #28a745;
  text-align: center;
  margin-top: 15px;
  word-wrap: break-word;
}

#aiReview {
  font-size: 1.15em;
  color: #444;
  line-height: 1.8;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  color: #ff69b4;
  font-weight: 600;
}

.spinner {
  border: 6px solid rgba(255, 105, 180, 0.2);
  border-top: 6px solid #ff69b4;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

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

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .container {
    padding: 20px 25px;
  }
  .app-header h1 {
    font-size: 2.5em;
  }
  .app-logo {
    height: 50px;
  }
  .upload-area {
    padding: 30px 15px;
  }
  #uploadButton {
    padding: 12px 25px;
    font-size: 1em;
  }
  .results-section h2,
  .ai-review-section h2 {
    font-size: 1.5em;
  }
  #predictionResult {
    font-size: 1.5em;
  }
  #aiReview {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  .app-header h1 {
    font-size: 2em;
  }
  .app-logo {
    height: 40px;
  }
  .upload-area p {
    font-size: 1em;
  }
}

/* Prediction Card */
.prediction-card {
  background: #fef6f8;
  border: 2px solid #ffc0cb;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.prediction-class {
  font-size: 2.2em;
  font-weight: 700;
  color: #ff69b4;
  margin-bottom: 10px;
  text-transform: capitalize;
}

/* Confidence Bar */
.confidence-container {
  margin-top: 10px;
  text-align: center;
}

.confidence-text {
  font-size: 1.1em;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

.confidence-bar-bg {
  background-color: #f3f3f3;
  border-radius: 8px;
  height: 16px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #ffc0cb;
}

.confidence-bar-fill {
  background: linear-gradient(90deg, #ff69b4, #87ceeb);
  height: 100%;
  width: 0;
  transition: width 0.8s ease-in-out;
}

/* AI Review Section */
#aiReview {
  background: #fefefe;
  padding: 15px 20px;
  border-radius: 10px;
  line-height: 1.8;
  font-size: 1.1em;
  border-left: 5px solid #ff69b4;
  margin-top: 20px;
}

/* Error text */
.error-text {
  color: #dc3545;
  font-weight: 600;
}

#aiReview {
  background: #fffefa;
  padding: 20px;
  border-radius: 10px;
  line-height: 1.7;
  font-size: 1.05em;
  border-left: 5px solid #ff69b4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#aiReview strong {
  color: #ff69b4;
  font-weight: 600;
}
