html {
  box-sizing: border-box;
  height: 100%;
  overflow: hidden;
  position: absolute; //or fixed
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 100vw;
  max-height: 100vh;
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px; /* Adjust the margin as needed */
}

.toggle-input {
  display: none;
}

.toggle-label {
  position: relative;
  width: 50px;
  height: 25px;
  background-color: #ccc;
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-circle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  background-color: white;
  border-radius: 50%;
  transition: left 0.3s;
}

.toggle-text {
  font-size: 14px;
  color: #333;
}

.dark-mode .toggle-text {
  font-size: 14px;
  color: white;
}

.toggle-input:checked + .toggle-label {
  background-color: #008dda;
}

.toggle-input:checked + .toggle-label .toggle-circle {
  left: 27px;
}

*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  align-items: center;
  background: linear-gradient(320deg, #cfd9df 0%, #e2ebf0 100%);
  display: flex;
  font-family: "Dosis", sans-serif;
  font-display: swap;
  height: inherit;
  justify-content: center;
}

.title {
  font-size: 3rem;
  text-align: left;
}

.container {
  flex-basis: 400px;
  display: block;
  overflow: auto;
}

.wrapper {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(35, 35, 35, 0.1);
  color: #232323;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.34);
  flex-basis: 400px;
  display: block;
  overflow: auto;
  padding: 20px 35px;
}

.screen {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  background: linear-gradient(320deg, #cfd9df 0%, #e2ebf0 100%);
  border: 1px solid rgba(82, 82, 82, 0.107);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(255, 255, 255, 0.01);
  color: #232323;
  height: 120px;
  padding: 20px;
  text-align: right;
  width: 326;
}

.screen .previous-operand {
  color: rgba(36, 36, 36, 0.498);
  font-size: 1.5rem;
}

.screen .current-operand {
  color: rgb(16, 16, 16);
  font-size: 2.5rem;
}

.screen .error-message {
  color: red;
  font-size: 1.5rem;
}

.calc-button-row {
  display: flex;
  justify-content: space-between;
  margin: 5% 0;
}

.calc-button {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  background: rgba(255, 255, 255, 255, 0.75);
  border: 1px solid rgba(35, 35, 35, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(35, 35, 35, 0.1);
  color: #232323;
  flex-basis: 20%;
  font-family: inherit;
  font-size: 24px;
  height: 65px;
  transition: 0.3s;
}

.calc-button1 {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  background: rgba(255, 255, 255, 255, 0.75);
  border: 1px solid rgba(35, 35, 35, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(35, 35, 35, 0.1);
  color: #232323;
  flex-basis: 50%;
  font-family: inherit;
  font-size: 24px;
  height: 65px;
  transition: 0.3s;
}

.calc-button:last-child {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  background: rgba(255, 255, 255, 255, 0.75);
  border: 1px solid rgba(35, 35, 35, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(35, 35, 35, 0.1);
  color: white;
  background: #f28c28;
  transition: 0.3s;
}

.calc-button:last-child:hover {
  background-color: #141414;
  transition: 0.3s;
}

.calc-button:hover {
  background-color: #141414;
  color: white;
  transition: 0.3s;
}

.calc-button1:hover {
  background-color: #141414;
  color: white;
  transition: 0.3s;
}

.double {
  flex-basis: 47%;
  color: white;
  background-color: #f64747;
}

.triple {
  flex-basis: 73%;
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px;
  border-radius: 5px;
  z-index: 1000;
}

.popup-text {
  font-size: 18px;
}

.calc-buttone {
  backdrop-filter: blur(5.5px);
  -webkit-backdrop-filter: blur(5.5px);
  background: rgb(77, 196, 53);
  border: 1px solid rgba(35, 35, 35, 0.1);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(35, 35, 35, 0.1);
  color: white;
  flex-basis: 20%;
  font-family: inherit;
  font-size: 24px;
  height: 65px;
  transition: 0.3s;
}

.calc-buttone:hover {
  background-color: black;
  color: white;
  transition: 0.3s;
}

.dark-mode {
  background: #232323;
  color: white;
}

.dark-mode .title {
  color: white;
}

.dark-mode .wrapper {
  background: rgba(50, 50, 50, 0.5);
  color: #e0e0e0;
  border: 1px solid rgb(43, 43, 43);
}

.dark-mode .screen {
  background: #333;
  color: white;
}

.dark-mode .screen .previous-operand {
  color: rgba(220, 220, 220, 0.7);
}

.dark-mode .screen .current-operand {
  color: white;
}

.dark-mode .screen .error-message {
  color: red;
}

.dark-mode .calc-button,
.dark-mode .calc-button1 {
  background: rgba(0, 0, 0, 0.5);
  color: white;
}

.dark-mode .calc-button:last-child {
  background: #f28c28;
  color: white;
}

.dark-mode .calc-button:hover,
.dark-mode .calc-button1:hover,
.dark-mode .calc-button:last-child:hover {
  background-color: #fbfbfb;
  color: #141414;
}

.dark-mode .popup {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
}

.dark-mode .double {
  flex-basis: 47%;
  color: white;
  background-color: #f64747;
}

.dark-mode .calc-buttone:hover {
  background-color: #fbfbfb;
  color: black;
  transition: 0.3s;
}
@media (min-width: 375px) and (max-width: 400px) {
  .screen .current-operand {
    font-size: 2.2rem; /* Adjusted font size for current operand on mobile */
  }
}
/* CSS for screens between 320px and 375px */
@media (max-width: 375px) {
  .screen .current-operand {
    font-size: 1.6rem; /* Adjusted font size for current operand on mobile */
  }
}
