/* Base Styles */
body {
  font-family: 'Poppins', sans-serif;
}

/* Credit Score Meter */
.credit-score-container {
  margin: 20px auto;
  text-align: center;
  max-width: 600px;
  
}

.credit-score-meter {
  position: relative;
  width: 100%;
  height: 30px;
  background: linear-gradient(to right, #dc3545 0%, #ffc107 50%, #28a745 100%);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 
    inset 0 3px 8px rgba(0, 0, 0, 0.2), /* Deeper inset for 3D recess */
    0 4px 12px rgba(0, 0, 0, 0.15); /* Outer shadow for depth */
}

.meter-bar {
  position: absolute;
  width: 0;
  height: 0;
  top: 100%; /* Base at meter's bottom */
  transform: translateX(-50%);
  transition: left 0.5s ease;
}

.meter-bar::after {
  content: '';
  position: absolute;
  top: -10px; /* Top edge at meter's bottom */
  left: 50%;
  transform: translateX(-50%);
  width: 8px; /* Small pin size */
  height: 8px;
  background: radial-gradient(circle at 30% 30%, #e6b800, #b8860b 60%); /* Shiny 3D effect */
  border-radius: 50%; /* Circular pin head */
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.3), /* Depth shadow */
    inset 0 -1px 2px rgba(0, 0, 0, 0.2); /* Inner shadow for 3D */
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); /* Soft glow */
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  color: #000;
  font-size: 16px;
  z-index: 1; /* Above gradient */
}

/* Confidence Diamond */
.confidence-container {
  margin: 20px auto;
  text-align: center;
  max-width: 600px;
}

.confidence-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.confidence-diamond {
  position: relative;
  width: 100px;
  height: 100px;
  background: darkgoldenrod;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.confidence-diamond span {
  transform: rotate(-45deg);
  font-size: 24px;
  font-weight: 700;
  color: #000;
}

.confidence-reason {
  max-width: 400px;
  text-align: left;
  font-size: 14px;
  color: #333;
}

/* Details Section */
.details-container {
  margin: 20px auto;
  max-width: 600px;
  text-align: left;
}

.detail-section {
  margin-bottom: 20px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

/* General Input Section Styling */
main .container {
  padding: 40px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
  margin-top: 40px;
}

/* Heading and Description */
main h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

main h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: darkgoldenrod;
  transition: width 0.3s ease;
}

main h1:hover::after {
  width: 150px;
}

main p {
  font-size: 1.1rem;
  color: #333;
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Section Headings */
main h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #000;
  margin: 20px 0 15px;
  position: relative;
  display: inline-block;
}

main h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 50%;
  height: 2px;
  background: darkgoldenrod;
}

/* File Upload (OCR) */
.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  justify-content: center;
}

.image-container {
  position: relative;
  width: 100px;
  height: 100px;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.image-container:hover {
  border-color: darkgoldenrod;
  transform: scale(1.05);
}

.image-container:hover .preview {
  background-color: rgba(220, 53, 69, 0.3); /* Transparent red overlay */
}

.preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: background-color 0.3s ease;
}

.delete-icon {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 16px;
  color: #fff;
  background: rgba(220, 53, 69, 0.7); /* Red to match hover */
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.image-container:hover .delete-icon {
  display: flex;
}

.delete-icon:hover {
  background: rgba(220, 53, 69, 1);
}

.plus-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  background: darkgoldenrod;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.plus-icon:hover {
  background: #b8860b;
  color: #000;
  transform: scale(1.05);
}

/* URL Input */
#urlInput {
  width: 100%;
  max-width: 600px;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 15px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#urlInput:focus,
#urlInput:hover {
  border-color: darkgoldenrod;
  box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
}

#urlInput::placeholder {
  color: #999;
  font-style: italic;
}

#urlList {
  max-width: 600px;
  margin: 0 auto 20px;
  padding: 0;
}

#urlList li {
  font-size: 0.9rem;
  color: #333;
  padding: 8px 15px;
  background: #f9f9f9;
  border-radius: 5px;
  margin-bottom: 8px;
  word-break: break-all;
  transition: background-color 0.3s ease;
}

#urlList li:hover {
  background: #f0f0f0;
}

/* Notes Textarea */
#notesInput {
  width: 100%;
  max-width: 600px;
  height: 120px;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 20px;
  resize: vertical;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#notesInput:focus,
#notesInput:hover {
  border-color: darkgoldenrod;
  box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
}

#notesInput::placeholder {
  color: #999;
  font-style: italic;
}

/* Buttons */
button {
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #000;
  background: darkgoldenrod;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  margin: 10px 5px;
}

button:hover {
  background: #b8860b;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

button:active {
  transform: translateY(0);
}

#cancelButton {
  background: #dc3545;
}

#cancelButton:hover {
  background: #c82333;
}

/* Status Message */
.status {
  text-align: center;
  font-size: 1rem;
  color: #333;
  margin: 15px 0;
  min-height: 24px; /* Prevent layout shift */
}

/* Progress Bar */
#progressContainer {
  max-width: 600px;
  margin: 15px auto;
  text-align: center;
}

#totalProgress {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: #f0f0f0;
  appearance: none;
}

#totalProgress::-webkit-progress-bar {
  background: #f0f0f0;
  border-radius: 5px;
}

#totalProgress::-webkit-progress-value {
  background: darkgoldenrod;
  border-radius: 5px;
  transition: width 0.3s ease;
}

#totalProgress::-moz-progress-bar {
  background: darkgoldenrod;
  border-radius: 5px;
}

/* Output Section */
.output {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 95%;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .confidence-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .confidence-reason {
    text-align: center;
  }
  main .container {
    padding: 20px 15px;
  }
  main h1 {
    font-size: 2rem;
  }
  main p {
    font-size: 1rem;
  }
  main h2 {
    font-size: 1.3rem;
  }
  .image-container,
  .plus-icon {
    width: 80px;
    height: 80px;
  }
  button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}