* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

html {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1117, #1f2937, #007acc, #22c55e);
  background-color: (#0d1117);
  background: transparent;
  position: relative;
  z-index: 0;
}
body {
  background: linear-gradient(135deg, #0d1117, #1f2937, #007acc, #22c55e);
  background-size: 400% 400%;
  animation: gradient 12s ease infinite;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 18px 16px 24px;
  gap: 18px;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
  background: (#0d1117);
}
:root {
  --calc-bg: #333;
  --btn-bg: #444;
  --header-bg: rgba(6, 10, 20, 0.72);
  --header-border: rgba(34, 197, 94, 0.45);
  --header-accent: #66e3ff;
}

.hero-header {
  position: relative;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 18px 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(0, 122, 204, 0.34), rgba(34, 197, 94, 0.22)),
    var(--header-bg);
  border: 1px solid var(--header-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.hero-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
  border-color: rgba(102, 227, 255, 0.45);
}

.hero-header__glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.65;
  pointer-events: none;
}

.hero-header__glow--one {
  width: 120px;
  height: 120px;
  background: rgba(102, 227, 255, 0.22);
  top: -28px;
  right: 14%;
}

.hero-header__glow--two {
  width: 160px;
  height: 160px;
  background: rgba(34, 197, 94, 0.18);
  bottom: -62px;
  left: -28px;
}

.hero-header__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  animation: headerDrop 0.7s ease both;
}

.hero-header__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-header__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(102, 227, 255, 0.22),
    rgba(34, 197, 94, 0.2)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 28px;
  transition: transform 0.3s ease;
}

.hero-header:hover .hero-header__icon {
  transform: rotate(-8deg) scale(1.05);
}

.hero-header__eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.76);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.hero-header__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(102, 227, 255, 0.14);
}

.hero-header__subtitle {
  margin: 0;
  max-width: 56ch;
  color: rgba(232, 244, 255, 0.88);
  font-size: 0.98rem;
  line-height: 1.5;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(100%, 920px);
  margin: 0 auto;
  flex: 1;
}

.calculadora {
  background: var(--calc-bg);
  padding: 20px;
  border-radius: 10px;
  width: min(100%, 320px);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.22);
}

#visor {
  width: 100%;
  height: 50px;
  margin-bottom: 10px;
  font-size: 24px;
  text-align: right;
  padding: 5px 10px;
  border: none;
  border-radius: 5%;
}

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

button {
  height: 45px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: white;
  background: var(--btn-bg);
}

button:hover {
  opacity: 0.8;
}

.igual {
  grid-column: span 3;
}

.custom-color {
  margin-top: 8px;
  text-align: center;
  color: #fff;
  font-size: 16px;
}
.custom-color input {
  margin-top: 8px;
  width: 50px;
  height: 35px;
  cursor: pointer;
  border: none;
  background: none;
}

.footer {
  margin-top: auto;
  padding-top: 8px;
  width: 100%;
  text-align: center;
  color: whitesmoke;
  font-size: 18px;
  font-family: Arial, sans-serif;
}

.footer strong {
  color: blueviolet;
}

.footer a {
  color: inherit;
  text-decoration: none;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.footer a:hover {
  color: var(--header-accent);
  text-shadow: 0 0 12px rgba(102, 227, 255, 0.35);
}

@keyframes headerDrop {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (max-width: 640px) {
  body {
    padding: 12px 12px 18px;
    gap: 14px;
  }

  .hero-header {
    padding: 16px;
    border-radius: 20px;
  }

  .hero-header__brand {
    align-items: flex-start;
  }

  .hero-header__icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 16px;
  }

  .hero-header__title {
    font-size: 1.3rem;
  }

  .hero-header__subtitle {
    font-size: 0.92rem;
  }

  .container {
    gap: 16px;
  }

  .calculadora {
    width: min(100%, 340px);
    padding: 16px;
  }

  .footer {
    font-size: 0.95rem;
  }
}
