body {
  background: linear-gradient(135deg, #121212, #28184a);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
}

#header {
  position: absolute;
  top: 0;
  left: 40px;
}

.calculadora {
  background: linear-gradient(145deg, #1e1e2f, #2c2c40);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.05);
  width: 360px;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
}

.calculadora::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 70%);
  pointer-events: none;
}

.display {
  align-items: center;
  background-color: #111;
  color: #ac5bfd;
  text-shadow: #ac5bfd 0px 0px 2px;
  font-size: 3em;
  padding: 20px;
  border-radius: 12px;
  text-align: right;
  margin-bottom: 20px;
  height: 60px;
  overflow-x: auto;
  font-family: 'Segment7', monospace;
}

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

.botao {
  aspect-ratio: 1 / 1;
  font-size: 1.4em;
  border: none;
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.botao::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.3s;
}

.botao:hover::after {
  opacity: 1;
}

.botao:hover {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.1);
}

.numero {
  background-color: #3b3b4f;
}

.numero:hover {
  background-color: #505067;
}

.operador {
  background-color: #ac5bfd;
}

.operador:hover {
  background-color: #7b3fb7;
}

.funcao {
  background-color: #52297e;
}

.funcao:hover {
  background-color: #57208e;
}

.igual {
  background-color: #52297e;
  grid-row: span 2;
  aspect-ratio: auto;
}

.igual:hover {
  background-color: #57208e;
}

.botao.numero.zero {
  grid-column: span 2;
  aspect-ratio: auto;
}





@media (max-width: 850px) {
  #header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #090909;
    padding-left: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    z-index: 1000;
  }

  body {
    padding-top: 100px;
  }

  .calculadora {
    position: relative;
    margin: 0 auto;
    width: calc(100vw - 40px);
    max-width: 200px;
    padding: 20px;
  }

  .botoes {
    gap: 8px;
  }

  .botao {
    border-radius: 8px;
  }
}
