body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #13547a 0%, #80d0c7 100%);  /* Cool blue-green gradient */
  /* background-image: linear-gradient(180deg, orange, black);  */
  /* background-repeat: no-repeat; */
  height: 100vh;
  width: 100%;
  font-family: sans-serif;
}

.container {
  background-color: #ffffff;
  padding: 20px 15px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 320px;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container input {
  background-color: #f8f8f8;
  padding: 15px 10px;
  text-align: right;
  margin-bottom: 10px;
  font-size: clamp(16px, 4vw, 24px);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  width: calc(100% - 20px);
  transition: all 0.3s ease;
}

.container input:focus {
  transform: scale(1.02);
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h1 {
  text-align: center;
  color: #252525;
  margin-bottom: 20px;
  font-size: clamp(24px, 6vw, 32px);
}

.button {
  font-size: clamp(16px, 4vw, 20px);
  border-radius: 20px;
  border: none;
  padding: 5px;
  height: clamp(45px, 12vw, 60px);
  width: clamp(55px, 15vw, 70px);
  margin-top: 5px;
  background-color: #e7e6e6;
  cursor: pointer;
  transition: all 0.2s;
  /* Button press effect */
  position: relative;
  overflow: hidden;
}

.button:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.button:active {
  transform: translateY(0px) scale(0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Ripple effect on button click */
.button::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.3);
  padding: 50%;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s;
}

.button:active::after {
  padding: 0;
  margin: 0;
  opacity: 1;
  transition: 0s;
  transform: scale(1.5);
}

.opt {
  color: orange;
  font-size: 32px;
  background-color: #eeeeee;
  background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
  box-shadow: 5px 5px 10px #d1d1d1, -5px -5px 10px #ffffff;
}

.opt:hover {
  background: linear-gradient(145deg, #e6e6e6, #f0f0f0);
}

.opt:active {
  border: 3px solid orange;
}

#red {
  color: red;
}

#red:active {
  border: 3px solid red;
}

#sbtn {
  width: clamp(110px, 30vw, 141px);
  border-radius: 30px;
  background: linear-gradient(145deg, #ff9966, #ff5e62);
  color: white;
  transition: all 0.3s ease;
}

#sbtn:hover {
  background: linear-gradient(145deg, #ff5e62, #ff9966);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255,94,98,0.4);
}

.row {
  display: flex;
  gap: 5px;
  margin: 5px 0;
  justify-content: center;
}

/* Mobile devices k liye */
@media screen and (max-width: 380px) {
  .container {
    padding: 15px 10px;
  }
  
  .button {
    height: 45px;
    width: 55px;
  }
  
  #sbtn {
    width: 110px;
  }
}

/* Tablet aur bade screens k liye */
@media screen and (min-width: 768px) {
  .container {
    padding: 30px 25px;
  }
  
  .button {
    height: 60px;
    width: 70px;
  }
  
  #sbtn {
    width: 141px;
  }
}

/* Landscape mode k liye */
@media screen and (max-height: 500px) {
  .container {
    padding: 10px;
    margin: 5px auto;
  }
  
  h1 {
    margin-bottom: 10px;
  }
  
  .button {
    height: 40px;
    margin-top: 3px;
  }
  
  .row {
    margin: 3px 0;
  }
}

/* Calculator shake animation for errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Add this class when there's an error */
.shake {
  animation: shake 0.2s ease-in-out;
}
