/* Center wrapper and add fade-in animation */
.wrap {
  max-width: 880px;
  margin: 2rem auto;
  padding: 1.5rem;
  font-family: system-ui, sans-serif;
  background: #fff;
  color: #202124;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(-10px);}
  100% { opacity: 1; transform: translateY(0);}
}

/* Header styling */
header {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  text-align: center;
}

select {
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* Card animations */
.card {
  border: 1px solid #e3e3e3;
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: #f7fff9;
  width: 100%;
  max-width: 500px;
  text-align: center;
  animation: cardPop 0.6s ease-out;
}

@keyframes cardPop {
  0% { transform: scale(0.95); opacity: 0;}
  100% { transform: scale(1); opacity: 1;}
}

/* Form styling */
form {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Custom Browse button */
.browse-btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.3s, transform 0.2s;
}
.browse-btn:hover {
  background: linear-gradient(135deg, #66bb6a, #388e3c);
  transform: scale(1.05);
}
.browse-btn input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* Analyze button */
.analyze-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #0aa36b, #067a52);
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.analyze-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0fc37d, #0a8a62);
  transform: scale(1.07);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.analyze-btn:disabled {
  background: #b7dbc9;
  cursor: not-allowed;
}

/* Image preview animation */
.preview {
  margin-top: 1rem;
  animation: fadeIn 0.6s ease-out;
}
.preview img {
  max-width: 360px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Result styling with slide-in */
.result {
  margin-top: 1rem;
  background: #f0fff4;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #d0f0e8;
  text-align: left;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  0% { transform: translateY(10px); opacity: 0;}
  100% { transform: translateY(0); opacity: 1;}
}

/* Error styling */
.error {
  color: #b00020;
  margin-top: 0.8rem;
  animation: fadeIn 0.5s ease-out;
}

/* Footer tips */
.tips {
  margin-top: 2rem;
  opacity: 0.8;
  text-align: center;
  font-size: 0.9rem;
}

h1 {
   position: relative;
  top: -5%;
  right: -2%;
  font-family: 'Jejak', cursive;
  font-size: clamp(2.5rem, 5vw, 3.2rem);
  color: #27ae60; /* fallback solid color */
 
  background-size: 200% auto;
  /* No -webkit-background-clip or -webkit-text-fill-color */
}
