body {
  background: #cfd3d8;
  font-family: Arial;
  margin: 0;
  padding: 10px;
  display: flex;
  justify-content: center;
}

.calculator {
  width: 520px;
  background: #dfe3e8;
  padding: 5px;
  border: 1px solid #999;
}

/* TOP BUTTONS */
.top-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.mode-btn {
  flex: 1;
  height: 35px;
  background: #cfd6dd;
  border: 1px solid #9aa5af;
  font-weight: bold;
}

.mode-btn.active {
  background: #8aa4bf;
  color: white;
}

/* DISPLAY */
.display {
  height: 40px;
  background: #3f5f7a;
  color: white;
  text-align: right;
  padding: 8px;
  font-size: 18px;
  margin-bottom: 6px;
  box-sizing: border-box;
}

/* GRID */
.grid {
  display: grid;
  gap: 4px;
}

.basic-grid {
  grid-template-columns: repeat(5, 1fr);
}

.scientific-grid {
  grid-template-columns: repeat(10, 1fr);
}

/* BUTTON */
button {
  height: 32px;
  background: #cfd6dd;
  border: 1px solid #9aa5af;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* TYPES */
.num {
  background: #aebed0;
}

.op {
  background: #b9c7d6;
}

.equal {
  background: #8aa4bf;
  color: white;
}

/* RADIO BOX */
.radio-box {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #cfd6dd;
  border: 1px solid #9aa5af;
  font-size: 12px;
  gap: 8px;
}

/* HIDE */
.hidden {
  display: none;
}

/* MOBILE */
@media (max-width: 768px) {

  .calculator {
    width: 100%;
  }

  .scientific-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .basic-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  button {
    height: 45px;
    font-size: 14px;
  }

  .display {
    height: 55px;
    font-size: 22px;
  }
}