* {
  font-family: 'Alata', sans-serif;
  color: #ffffff;
}

body { 
  background-image: url(media/fondo.png);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed; 
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 85vh;
}

.card {
  padding: 10px;
  max-width: 240px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  background-color: #EB4485;
  font-family: serif;
  margin: 60px;
}

.image {
  width: 220px;
  height: 130px;
  border-radius: 4px;
  background-color: #D7EE49;
  background-image: url(media/img.png);
  padding: 9px;
}

.name {
  display: flex;
  font-size: 0.75rem;                            
  line-height: 1rem;
  align-items: center;
  margin: 2px;
}

.title {
  display: block;
  font-size: 1.25rem;                            
  line-height: 1.35rem;
  font-weight: 600;                              
  padding-bottom: 5px;
  padding-top: 14px;
}

.description {
  line-height: 1.375;                            
}

.calcuContainer {
  background-color: #E4DDDD;
  margin: 30px;
  padding: 20px;
  border-radius: 32px;
  box-shadow: 0px 0px 0px 3px #cf3561;
  height: auto;
  width: 480px;
  max-width: 98vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.calculadora h1 {
  color: #000000;
  font-size: 2.7em;
  text-align: center;
  margin-left: 0;
  text-shadow: 0px 1px #c2189474;
}

.botones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.calculadora input[type="number"] {
    background-color: #5855A0;
    width: 180px;
    margin: 10px 10px;
    color: #ffffff;
    font-weight: 500;
    font-size: 23px;
    height: 50px;
    border-radius: 12px;
    padding-left: 14px;
    border: none;
    border-bottom: 2px solid #000000;
    outline: none;
}

::-webkit-input-placeholder { color: #E4DDDD; }
::-moz-placeholder { color: #E4DDDD; }

.calculadora input[type="text"] {
   pointer-events: none;
  background-color: #EB4485;
  border: none;
  border-radius: 22px;
  height: 80px;
  margin: 10px 0;
  padding-left: 15px;
  color: #ffffff;
  font-size: 2.7em;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 0px 0px 3px white;
  display: block;
  margin: 10px auto;
}

.button, .borrar {
  outline: none;
  color: #EB4485;
  font-size: 1.4em;
  width: 180px;
  height: 58px;
  text-align: center;
  border: 2px dashed #EB4485;
  border-radius: 15px;
  background-color: #D7EE49;
  box-shadow: 0 0 0 4px #EADDCA, 2px 2px 4px 2px rgba(0, 0, 0, 0.5);
  transition: .1s ease-in-out, .4s color;
  margin: 10px 0;
}

.borrar {
  background-color: #D7EE49;
  color: #EB4485;
  border: 2px dashed #EB4485;
}

button:active {
  transform: translateX(0.1em) translateY(0.1em);
  box-shadow: 0 0 0 4px #EADDCA, 1.5px 1.5px 2.5px 1.5px rgba(0, 0, 0, 0.5);
}


/* Pantallas menores a 900px: calculadora más grande, tarjeta más pequeña */
@media (max-width: 900px) {
  .calcuContainer {
    width: 90vw;
    padding: 15px;
    margin: 20px;
  }
  .card {
    margin: 20px;
    max-width: 180px;
    font-size: 0.9em;
  }
  .image {
    width: 150px;
    height: 90px;
  }
}

/* Pantallas menores a 600px: oculta la tarjeta, calculadora ocupa casi todo */
@media (max-width: 600px) {
  body {
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
  }
  .card {
    opacity: 0;
    visibility: hidden;
    height: 0;
    pointer-events: none;
    position: absolute;
  }
  .calcuContainer {
    width: 98vw;
    max-width: 99vw;
    margin: 0;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0px 0px 0px 2px #cf3561;
  }
  .calculadora h1 {
    font-size: 2em;
  }
  .calculadora input[type="text"] {
    width: 95vw;
    font-size: 2em;
    height: 60px;
  }
  .calculadora input[type="number"] {
    width: 95vw;
    font-size: 1.3em;
    height: 40px;
    margin: 8px auto;
    display: block;
  }
  .botones {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
  }
  .button, .borrar {
    width: 95vw;
    font-size: 1.15em;
    height: 45px;
    margin: 6px auto;
    display: block;
  }
}

/* Pantallas super pequeñas (<400px): aún más compacto */
@media (max-width: 400px) {
  .calcuContainer {
    padding: 5px;
    border-radius: 7px;
  }
  .calculadora input[type="text"], .button, .borrar, .calculadora input[type="number"] {
    width: 98vw;
    font-size: 1em;
    padding: 5px;
  }
  .calculadora h1 {
    font-size: 1.3em;
  }
}