@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 1.25rem;
}

body {
  background-color: #2c3fe7;
}

.calculator {
  width: 600px;
  height: 90vh;
  margin: 50px auto;
  background-color: #4254db;
  padding: 30px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(37, 37, 37, 0.95);
}

.calculator-container {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 15px;
}
.screen-result {
  grid-column: span 4;
  height: 125px;
  background-color: rgba(94, 93, 93, 0.95);
  border-radius: 20px;
}

button {
  border: none;
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-weight: 700;
  transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}

button:active {
  background-color: rgba(255, 255, 255, 0.5);
  transform: scale(0.9);
}

.equal {
  grid-column: span 2;
  background-color: #f39c12;
  color: white;
  transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}
.equal:hover {
  background-color: #e67e22;
}
.footer {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.footer pre,
.footer a {
  text-decoration: none;
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  transition: transform 0.3s ease, border-color 0.3s ease;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.footer a:hover {
  transform: translateY(-3px);
  border-bottom: 3px solid white;
}

.screen-result {
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* numbers stick to the bottom */
}

.previous-operand {
  display: none;
}

.current-operand {
  padding: 5px;
  text-align: right;
  font-size: 4rem;
  font-family: "Orbitron", sans-serif;
  color: white;
  overflow-x: auto; /* enable horizontal scroll */
  scrollbar-width: none;
  overflow-y: hidden; /* block vertical scroll */
  white-space: nowrap; /* keep text in one line */
  cursor: grab; /* cursor looks like a hand */
}

.current-operand:active {
  cursor: grabbing; /* when dragging */
}
