*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:Arial, Helvetica, sans-serif;
  background: purple;
  min-height:100vh;
}

/* HOME PAGE */

.home-page{
  display:flex;
  justify-content:center;
  align-items:center;
}

.home-card{
  background:white;
  padding:40px;
  border-radius:20px;
  text-align:center;
  width:90%;
  max-width:500px;
  box-shadow:0 10px 25px rgba(0,0,0,.15);
}

.home-card h1{
  margin-bottom:15px;
}

.home-card p{
  color:#555;
  margin-bottom:25px;
}

.home-btn{
  display:inline-block;
  background:#444;
  color:white;
  text-decoration:none;
  padding:14px 24px;
  border-radius:10px;
  font-weight:bold;
}

/* CALCULATOR */

.calculator-container{
  max-width:400px;
  margin:30px auto;
  padding:0 10px;
}

.calc-header{
  text-align:center;
  margin-bottom:15px;
}

.top-bar{
  display:flex;
  justify-content:flex-start;
  margin-bottom:50px;
  margin-right: 200px;
}

.home-link{
  text-decoration:none;
  color:#222;
  font-weight:bold;
}
.calculator-card{
  background:#2f2f2f;
  border-radius:20px;
  padding:20px;
  box-shadow:0 12px 25px rgba(0,0,0,.25);
}

.display-box{
  margin-bottom:15px;
}

#result{
  width:100%;
  border:none;
  border-radius:10px;
  background:#cfd8c2;
  color:#111;
  font-size:2rem;
  text-align:right;
  padding:18px;
  opacity:1;
}

.btn-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
}

.btn{
  border:none;
  border-radius:10px;
  height:60px;
  font-size:1.2rem;
  cursor:pointer;
  font-weight:bold;
}

.btn-number{
  background:#ececec;
  color:#111;
}

.btn-operator,
.btn-clear,
.btn-util{
  background:#666;
  color:white;
}

.btn-equals{
  background:#ff9800;
  color:white;
}

.btn:hover{
  opacity:.92;
}

.btn-tall{
  grid-row:span 2;
  height:100%;
}

.span2{
  grid-column:span 2;
}

/* SOLVER */

.solver-toggle-wrap{
  margin-top:18px;
}

.btn-solver-toggle{
  width:100%;
  border:none;
  background:purple;
  color:white;
  padding:14px;
  border-radius:10px;
  cursor:pointer;
  text-align:left;
}

.solver-panel{
  margin-top:15px;
}

.solver-desc{
  color:#ddd;
  margin-bottom:12px;
  font-size:.9rem;
}

.eq-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin-bottom:12px;
  color:white;
}

.eq-row label{
  width:50px;
}

.eq-row input{
  width:60px;
  padding:8px;
  border:none;
  border-radius:6px;
  text-align:center;
}

.btn-solve{
  width:100%;
  background:#ff9800;
  color:white;
  margin-top:10px;
}

@media (max-width:420px){

  .btn{
    height:55px;
  }

  #result{
    font-size:1.6rem;
  }
}
.solver-panel{
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
  margin-top:0;
}

.solver-panel.open{
  max-height:500px;
  margin-top:15px;
}