*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --primary: #2596ff;
    --bgprimary: #eeeeee;
    --bgsecondary: #ffffff;
    --txtpositive: #282828;
    --txtnegative: #fff;
}

.body{
    display: flex;
    background: var(--bgprimary);
}

.main{
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: center;
    padding: 4rem;
    background: var(--bgsecondary);
    margin: 1rem;
    border-radius: .5rem;
}

.sidebar{
    background: var(--bgsecondary);
    padding: 1rem;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar ul{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .4rem;
  height: 100%;
}

.top, .bottom{
display: grid;
gap: .5rem;
}

.sidebar ul li{
    padding: 1rem;
    height: 4rem;
    aspect-ratio: 1;
    display: grid;
    place-items: center; 
    border-radius: .25rem;
}

.sidebar ul .active{
    background: var(--primary);
    z-index: 1;
    color: var(--txtnegative);
}

.inactive {
  background: var(--bgprimary);
  transition: background 0.3s;
}

.inactive:hover {
  background: #ccc;
}

img{
    width: 100%;
}

.icon img {
    width: 1.6rem;
}

.cards{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
    max-height: 5rem;
}

.card{
    background: var(--bgprimary);
    padding: 2rem;
    border-radius: .5rem;
    transition: .3s;
}

a {
    text-decoration: none;
    color: var(--txtpositive);
}

.card:hover{
    background: #ccc;
    cursor: pointer;
}

.calculator {
  max-width: 20rem;
  width: 100%;
  border-radius: 12px;
  padding: .5rem;
  background: #fff;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 50px 5px;
  position: absolute;
  transform: translate(-35%, -50%);
  top: 50%;
  left: 50%;
  z-index: 3;
  display: none;
}
.calculator #display {
  height: 80px;
  width: 100%;
  outline: none;
  border: none;
  text-align: right;
  margin-bottom: 10px;
  font-size: 25px;
  color: #000e1a;
}
.calculator .buttons {
  display: grid;
  grid-gap: .5rem;
  grid-template-columns: repeat(4, 1fr);
}
.calculator .buttons button {
  padding: .5rem;
  border-radius: 6px;
  border: none;
  font-size: 20px;
  cursor: pointer;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.178) 0px 0px 2px .5px;
}
.calculator .buttons button:active {
  transform: scale(0.99);
}
.calculator .operator {
  color: #2f9fff;
}
#equal {
  background-color: #0099ff;
}
#equal:hover {
  background: #4583e7;
}
#btnRed {
  background: #ff0000;
  color: #fff;
}

#btnOrange {
  background: #ffb30e;
}

  
#overlay {
  position: fixed; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5); /* Black background with opacity */
  z-index: 2; /* Specify a stack order in case you're using a different order for other elements */
  cursor: pointer; /* Add a pointer on hover */
}

/* preloader */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}