/* ===== DRAGON BALL Z CALCULATOR THEME ===== */

body {
  background: radial-gradient(circle at center, #ff7f00, #ff3c00 60%, #120000);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Oxanium', 'Poppins', sans-serif;
  color: #fff;
  overflow: hidden;
}

/* Add subtle glowing energy waves in background */
body::before {
  content: "";
  position: absolute;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 10%, transparent 10%) 0 0 / 10px 10px;
  animation: energy 6s linear infinite;
  z-index: 0;
  opacity: 0.15;
}

@keyframes energy {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(20px, 20px) rotate(360deg); }
}

#calculator {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #1a1a1a, #262626);
  border: 3px solid #ff9d00;
  border-radius: 20px;
  box-shadow:
    0 0 25px #ff9d00,
    inset 0 0 10px rgba(255, 255, 255, 0.1);
  padding: 25px;
  width: 320px;
}

#display {
  background: #000;
  border: 2px solid #00aaff;
  border-radius: 10px;
  color: #00eaff;
  font-size: 2.3em;
  font-weight: bold;
  text-shadow: 0 0 10px #00eaff;
  padding: 15px;
  text-align: right;
  margin-bottom: 20px;
  box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.2);
}

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

button {
  background: linear-gradient(145deg, #ff7300, #ff9d00);
  border: none;
  border-radius: 30px;
  color: #FA0011;
  font-size: 1.3em;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 0 5px rgba(0,0,0,0.3);
  box-shadow:
    0 0 8px rgba(255, 128, 0, 0.7),
    inset 0 0 6px rgba(255, 255, 255, 0.2);
}

button:hover {
  background: linear-gradient(145deg, #ffa800, #ffcc33);
  box-shadow:
    0 0 15px #ffcc33,
    0 0 30px rgba(255, 170, 0, 0.5);
  transform: scale(1.08);
}

button:active {
  transform: scale(0.95);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Operators: Saiyan Blue Energy */
.operator {
  background: linear-gradient(145deg, #0077ff, #00bbff);
  color: white;
  box-shadow:
    0 0 12px #00aaff,
    inset 0 0 6px rgba(255,255,255,0.2);
}

/* Equals: Final Flash Energy */
#equals {
  background: linear-gradient(145deg, #ffe100, #ffb300);
  color: #000;
  font-weight: 800;
  box-shadow:
    0 0 15px #ffe100,
    0 0 30px rgba(255, 225, 0, 0.6);
}

#clear {
  grid-column: span 2;
  background: linear-gradient(145deg, #ff0000, #ff4d4d);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
}

#back-space {
  grid-column: span 2;
  background: linear-gradient(145deg, #0044ff, #007bff);
  color: #fff;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(0, 100, 255, 0.7);
}

/* Energy Pulse Animation when Hovering Calculator */
#calculator {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* When hovering over the calculator, Broly’s aura awakens */
#calculator:hover {
  border-color: #00ff66;
  box-shadow:
    0 0 25px #00ff66,
    0 0 50px rgba(0, 255, 100, 0.6),
    0 0 80px rgba(0, 255, 150, 0.4);
}

/* When pressing equals, unleash the Super Saiyan power */
#equals:active ~ #calculator,
#equals:focus ~ #calculator {
  animation: brolyGlow 1.5s ease-in-out;
}

@keyframes brolyGlow {
  0% {
    box-shadow: 0 0 15px #00ff66, 0 0 30px rgba(0, 255, 100, 0.6);
  }
  50% {
    box-shadow: 0 0 40px #00ff99, 0 0 80px rgba(0, 255, 120, 0.8);
  }
  100% {
    box-shadow: 0 0 15px #00ff66, 0 0 30px rgba(0, 255, 100, 0.6);
  }
}

#calculator {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

#vegeta {
  width: 180px;
  height: auto;
  vertical-align: top;
  margin-left: 20px;
  display: none; /* Hidden by default */
  transition: opacity 0.5s ease;
  opacity: 0;
}

#vegeta.show {
  display: inline-block;
  opacity: 1;
}

footer {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #fff;
  text-shadow: 0 0 6px #ffcc00, 0 0 10px #ff6600;
  letter-spacing: 0.5px;
  z-index: 2;
}

footer a {
  color: #00eaff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

footer a:hover {
  color: #ffe100;
  text-shadow: 0 0 8px #ffe100, 0 0 12px #ff9900;
}

footer p {
  margin: 0;
  padding: 5px 0;
  background: rgba(0, 0, 0, 0.3);
  display: inline-block;
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 0 12px rgba(255, 150, 0, 0.4);
}