* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #06060f;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(0,240,255,0.03) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(255,0,170,0.02) 0%, transparent 50%);
}

/* Dot grid background */
.dot-grid {
  background-image: radial-gradient(circle, rgba(0,240,255,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Infinity pulse */
@keyframes infinityPulse {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(0,240,255,0.5), 0 0 30px rgba(0,240,255,0.3), 0 0 60px rgba(0,240,255,0.1);
    opacity: 1;
  }
  50% { 
    text-shadow: 0 0 20px rgba(255,0,170,0.6), 0 0 50px rgba(255,0,170,0.3), 0 0 80px rgba(255,0,170,0.1);
    opacity: 0.85;
  }
}

.infinity-pulse {
  animation: infinityPulse 3s ease-in-out infinite;
}

/* Glow effect for display */
.display-glow {
  box-shadow: 
    inset 0 2px 20px rgba(0,0,0,0.8),
    0 0 30px rgba(0,240,255,0.05),
    0 0 60px rgba(0,240,255,0.02);
}

/* Button press */
.calc-btn {
  transition: all 0.1s ease;
  position: relative;
  overflow: hidden;
}

.calc-btn:active {
  transform: scale(0.93);
}

.calc-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
}

.calc-btn:hover::after {
  opacity: 1;
}

/* Typewriter animation */
@keyframes typeChar {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.typewriter-char {
  display: inline-block;
  animation: typeChar 0.04s ease forwards;
  opacity: 0;
}

/* Cursed button glow */
.cursed-btn {
  background: linear-gradient(135deg, rgba(255,0,170,0.15), rgba(0,240,255,0.1));
  border: 1px solid rgba(255,0,170,0.25);
}

.cursed-btn:hover {
  background: linear-gradient(135deg, rgba(255,0,170,0.3), rgba(0,240,255,0.2));
  border-color: rgba(255,0,170,0.5);
  box-shadow: 0 0 20px rgba(255,0,170,0.15);
}

/* Equal button */
.equals-btn {
  background: linear-gradient(135deg, #00f0ff, #00cc88);
  box-shadow: 0 0 25px rgba(0,240,255,0.3), 0 4px 15px rgba(0,0,0,0.4);
}

.equals-btn:hover {
  box-shadow: 0 0 40px rgba(0,240,255,0.5), 0 4px 20px rgba(0,0,0,0.5);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,240,255,0.4); }

/* Copy notification */
@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(5px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-5px); }
}

.copy-toast {
  animation: fadeInOut 1.5s ease forwards;
}

/* History item hover */
.history-item {
  transition: all 0.15s ease;
}

.history-item:hover {
  background: rgba(0,240,255,0.05);
  border-color: rgba(0,240,255,0.2);
}

/* Responsive */
@media (max-width: 480px) {
  .calc-btn {
    font-size: 14px !important;
    padding: 10px 4px !important;
  }
}

/* Scanline overlay on display */
.scanlines {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
}