
@import url('https://fonts.googleapis.com/css2?family=Rozha+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Ranga:wght@400;700&family=Rozha+One&display=swap');

:root {
  --primary-color: #2c6e49; /* Teal for buttons */
  --secondary-color: #ff6b6b; /* Coral for accents */
  --text-color: #1a1a3d; /* Navy for text */
  --background-color: #f0f8ff; /* Light blue background */
  --gradient-btn: linear-gradient(135deg, var(--primary-color), #4ca89c);
  --gradient-accent: linear-gradient(135deg, var(--secondary-color), #ff8787);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
  background-color: var(--background-color);
  font-family: 'Roboto Condensed', sans-serif;
  color: var(--text-color);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  /* flex-direction: column; */
  align-items: center;
}

.container-greeting {
  width: 50%;
  max-width: 550px;
  padding: 1rem;
  background-color: white;
  box-shadow: var(--shadow);
  border-radius: 12px;
  margin: 1rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.image-section {
  position: relative;
  text-align: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
}

#natureImage {
  width: 100%;
  height: 100%;
  object-fit:contain;
  display: block;
}

.user-upload {
  position: absolute;
  bottom: 1px;
  left: 10px;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  object-fit: cover;
  z-index: 100;
  border: 3px solid white;
  box-shadow: var(--shadow);
}

.username {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 1rem;
  width: 100%;
  color: var(--text-color);
  text-align: right;
}

.quote {
  position: absolute;
  width: 90%;
  max-width: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.2;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: .7rem 1rem;
  border-radius: 10px;
  font-weight: 400;
  text-align: center;


font-family: "Ranga", cursive;
  /* font-weight: 600; */
  font-style: normal;


}

.input-text {
  position: absolute;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 700;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
}

#inputText1 {
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 0;
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  text-align: center;
   

}

#inputText2 {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 0.2rem .5rem;
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  color: white;
  top: 10%;
  left: 20%; 
  right: 20%;

  text-align: center;
  width: 80%;
  /* min-width: 35%; */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: wrap;

  /* min-width: 10rem; */
  line-height: 1;
  margin-bottom: .5rem;

  font-family: "Rozha One", serif;
  font-weight: 400;
  font-style: normal;
}

#uploadImage {
  margin: .7rem 0;
  padding: 0.5rem;
  border: 2px dashed var(--primary-color);
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  -ms-border-radius: 6px;
  -o-border-radius: 6px;
}

.download-btn, .share-btn, .refresh-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  width: 100%;
  max-width: 200px;
  margin: 0.5rem auto;
}

.download-btn {
  background: var(--gradient-btn);
  box-shadow: var(--shadow);
}

.share-btn {
  background: var(--gradient-accent);
}

.refresh-btn {
  background: linear-gradient(135deg, #ffa500, #ffcc80);
}

.download-btn:hover, .share-btn:hover, .refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.share-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  justify-items: center;
  margin-top: 1rem;
}

.share-buttons a, .share-buttons p {
  font-size: 0.9rem;
  text-align: center;
}


.input-fields, .category-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-fields input, .category-selector select, .container-greeting input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-fields input:focus, .category-selector select:focus , .container-greeting input:focus{
  border-color: var(--primary-color);
  outline: none;
}

label {
  /* margin-top: -3rem; */
  /* background-color: #1a1a3d; */
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}


.loading {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  z-index: 200;
}

@media (max-width: 800px) {
  .container-greeting {
    width: 90%;
    padding: 1rem;
  }

  .image-section {
    aspect-ratio: 4 / 3;
  }

  .quote {
    font-size: clamp(1.3rem, 1.8vw, 1.5rem);
    padding: 0.75rem;
    width: 85%;
    font-weight: 500;

  }

  .user-upload {
    width: 60px;
    height: 60px;
  }

  .username {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    padding: 0.4rem;
  }

  #inputText2 {
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    left: 25%;
    right: 25%;
    top: 12%;
  }
}

@media (max-width: 480px) {
  .container-greeting {
    width: 90%;
    padding: 0.75rem;
  }

  .image-section {
    aspect-ratio: 3 / 4;
  }

  .quote {
    width: 90%;
    font-size: clamp(1.2rem, 1.5vw, 1.6rem);
    line-height: 1.3;
    padding: 0.5rem;
    font-weight: 400;
  }

  .user-upload {
    width: 50px;
    height: 50px;
    bottom: 5px;
    left: 5px;
  }

  .username {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.2;
    padding: 0.3rem;
  }

  #inputText2 {
    font-size: clamp(1.5rem, 1.8vw, 1.9rem);
    left: 10%;
    right: 10%;

    top: 10%;
    padding: 0.3rem;
    /* background-color: transparent; */
    /* font-size: 1.8rem; */
  }

  .download-btn, .share-btn, .refresh-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  label {
    font-size: 0.9rem;
  }

  .input-fields input, .category-selector select {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
 .container-greeting input{
  padding: .4rem;
  font-size: .9rem;
 }

}

.btn-greeting{
  display: flex;
  gap: 2rem;
  flex-wrap: nowrap;
}