*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins',sans-serif;
}

body{
  min-height:100vh;

  /* 🔥 Background Image + Dark Overlay */
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url("back.jpg") no-repeat center center/cover;

  display:flex;
  justify-content:center;
  align-items:center;
}

/* 🔥 Glassmorphism Card */
.container{
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(15px);
  border:1px solid rgba(255,255,255,0.3);
  padding:25px;
  width:370px;
  border-radius:20px;
  text-align:center;
  box-shadow:0 15px 40px rgba(0,0,0,0.4);
  color:#fff;

  /* Animation */
  animation: fadeIn 0.8s ease;
}

/* ⭐ Average Box */
.avg-box{
  background:rgba(255,255,255,0.2);
  padding:10px;
  border-radius:10px;
  margin-bottom:10px;
  font-weight:bold;
}

/* Inputs */
input, textarea{
  width:100%;
  padding:10px;
  margin:10px 0;
  border-radius:10px;
  border:none;
  outline:none;
}

/* Focus Glow */
input:focus, textarea:focus{
  box-shadow:0 0 10px rgba(255,77,109,0.7);
}

/* Textarea */
textarea{
  height:80px;
  resize:none;
}

/* Headings */
h3{
  margin-top:10px;
  font-size:15px;
}

/* Emoji Row */
.emoji-group{
  display:flex;
  justify-content:space-around;
  margin:10px 0;
}

/* Emoji Style */
.emoji-group span{
  font-size:28px;
  cursor:pointer;
  transition:0.3s;
}

.emoji-group span:hover{
  transform:scale(1.3);
}

/* Click Animation */
.emoji-group span:active{
  transform:scale(1.8) rotate(10deg);
}

/* Selected Emoji */
.selected{
  transform:scale(1.5);
  border-bottom:3px solid #ff4d6d;
}

/* Button */
button{
  width:100%;
  padding:12px;
  margin-top:10px;
  border:none;
  border-radius:10px;
  font-size:16px;
  cursor:pointer;
  color:white;

  background: linear-gradient(45deg,#ff4d6d,#ff758c);
  transition:0.3s;
}

button:hover{
  transform:translateY(-3px);
  box-shadow:0 8px 20px rgba(0,0,0,0.4);
}

/* Message */
#msg{
  margin-top:10px;
  color:#2ecc71;
  animation: pop 0.5s ease;
}

/* Animations */
@keyframes pop{
  0%{transform:scale(0);}
  100%{transform:scale(1);}
}

@keyframes fadeIn{
  from{
    opacity:0;
    transform:translateY(30px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}


/* 📱 Mobile First Improvements */
.container{
  width:90%;
  max-width:370px;
  padding:20px;
}

/* Inputs responsive */
input, textarea{
  font-size:14px;
}

/* Emoji responsive */
.emoji-group span{
  font-size:24px;
}

/* Button responsive */
button{
  font-size:15px;
  padding:10px;
}

/* 📲 Small Devices (Phones <480px) */
@media (max-width:480px){

  body{
    align-items:flex-start;
    padding:20px 10px;
  }

  .container{
    width:100%;
    border-radius:15px;
  }

  h2{
    font-size:20px;
  }

  h3{
    font-size:14px;
  }

  .emoji-group span{
    font-size:22px;
  }

}

/* 📟 Tablets (481px - 768px) */
@media (min-width:481px) and (max-width:768px){

  .container{
    width:85%;
    max-width:450px;
  }

  .emoji-group span{
    font-size:26px;
  }

}

/* 🖥 Large Screens */
@media (min-width:1024px){

  .container{
    max-width:400px;
  }

}

/* 🔥 Smooth Scroll Fix (optional) */
html{
  scroll-behavior:smooth;
}
.emoji-group span {
  font-size: 28px;
  cursor: pointer;
  margin: 5px;
  transition: 0.2s;
  display: inline-block;
}

.emoji-group span:hover {
  transform: scale(1.2);
}

.emoji-group span.active {
  transform: scale(1.3);
  background: #fff3;
  border-radius: 10px;
  padding: 5px;
}
.popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  display: none;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from { transform: translateX(-50%) translateY(-30px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
