body{
  display:flex;
  justify-content:center;
  align-items:center;
  min-height:100vh;
  background:#f8fafc;
  font-family:Arial;
  padding:20px;
}

.calculator-card{
  width:100%;
  max-width:450px;
  background:white;
  padding:40px;
  border-radius:24px;
  text-align:center;
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.calculator-card h2{
  margin-bottom:30px;
  color:#111827;
}

.fraction-box{
  width:180px;
  margin:auto;
}

.fraction-box input{
  width:100%;
  height:55px;
  border-radius:12px;
  border:2px solid #dbe4ee;
  text-align:center;
  font-size:18px;
  outline:none;
}

.fraction-box input:focus{
  border-color:#2563eb;
}

.fraction-line{
  height:3px;
  background:black;
  margin:10px 0;
}

button{
  margin-top:30px;
  width:100%;
  height:55px;
  border:none;
  border-radius:14px;
  background:#2563eb;
  color:white;
  font-size:18px;
  cursor:pointer;
  transition:0.3s;
}

button:hover{
  background:#1d4ed8;
}

#result{
  margin-top:30px;
  background:#f1f5f9;
  padding:20px;
  border-radius:16px;
  text-align:left;
  display:none;
}

#result h3{
  margin-bottom:15px;
  color:#111827;
}

.answer{
  font-size:24px;
  font-weight:bold;
  color:#2563eb;
  margin:15px 0;
}

.formula{
  background:white;
  padding:12px;
  border-radius:10px;
  margin-top:12px;
  line-height:1.7;
  border:1px solid #dbe4ee;
}

.error{
  color:red;
  font-weight:bold;
}

@media(max-width:600px){

  .calculator-card{
    padding:25px;
  }

  .fraction-box{
    width:100%;
    max-width:220px;
  }

}