@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Rajdhani:wght@500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: 'Rajdhani', sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.09), transparent 22%),
    radial-gradient(circle at 80% 75%, rgba(234, 88, 12, 0.08), transparent 20%),
    linear-gradient(rgba(5, 8, 5, 0.82), rgba(3, 4, 3, 0.9)),
    url('https://images.unsplash.com/photo-1511884642898-4c92249e20b6?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat fixed;
  overflow-x: hidden;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(9, 15, 8, 0.65), rgba(4, 6, 4, 0.78)),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 24px
    );
  pointer-events: none;
}

.scan-lines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015) 0px,
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.3;
  pointer-events: none;
}

.calculator-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.calculator {
  width: 100%;
  max-width: 460px;
  background:
    linear-gradient(180deg, rgba(20, 26, 20, 0.96), rgba(10, 12, 10, 0.97));
  border: 1px solid #4b5f42;
  box-shadow:
    0 0 0 3px rgba(16, 20, 15, 0.9),
    0 0 24px rgba(70, 103, 56, 0.18),
    0 30px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  padding: 18px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mini-title {
  color: #f59e0b;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.title-box h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 27px;
  line-height: 1.05;
  color: #ecfccb;
  text-shadow: 0 0 10px rgba(132, 204, 22, 0.12);
}

.sub-line {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 1.8px;
  color: #a3b18a;
}

.status-panel {
  display: grid;
  gap: 8px;
  min-width: 120px;
}

.status-card {
  border: 1px solid #556b4f;
  background: rgba(8, 12, 8, 0.88);
  padding: 8px 10px;
}

.status-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.status-value {
  font-size: 14px;
  color: #86efac;
  font-weight: 700;
}

.status-value.amber {
  color: #fbbf24;
}

.display-box {
  border: 1px solid #47604b;
  background:
    linear-gradient(180deg, rgba(29, 78, 47, 0.16), rgba(0, 0, 0, 0.2)),
    rgba(9, 16, 9, 0.92);
  padding: 14px;
  min-height: 142px;
  margin-bottom: 14px;
  box-shadow: inset 0 0 18px rgba(134, 239, 172, 0.05);
}

.display-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.screen-tag {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #94a3b8;
}

.screen-tag.right {
  color: #86efac;
}

.warning-text {
  min-height: 22px;
  color: #fcd34d;
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 0.4px;
}

.previous-screen {
  min-height: 22px;
  text-align: right;
  color: #cbd5e1;
  font-size: 16px;
  margin-bottom: 8px;
}

.current-screen {
  text-align: right;
  color: #f8fafc;
  font-size: 38px;
  font-family: 'Orbitron', sans-serif;
  word-break: break-word;
  text-shadow: 0 0 10px rgba(134, 239, 172, 0.08);
}

.help-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  background: rgba(8, 10, 8, 0.55);
  font-size: 12px;
  color: #cbd5e1;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.btn {
  min-height: 62px;
  border: 1px solid #42513d;
  background: linear-gradient(180deg, #182018, #101510);
  color: #f8fafc;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 14px rgba(132, 204, 22, 0.08);
}

.btn:active {
  transform: scale(0.98);
}

.number,
.decimal {
  background: linear-gradient(180deg, #1b241b, #121812);
}

.operator {
  background: linear-gradient(180deg, #3c3212, #241d0b);
  color: #fbbf24;
  border-color: #7c641d;
}

.clear {
  background: linear-gradient(180deg, #4a1717, #2b0d0d);
  color: #fecaca;
  border-color: #7f1d1d;
}

.delete {
  background: linear-gradient(180deg, #4b3b11, #2d2209);
  color: #fde68a;
  border-color: #8a6b19;
}

.equal {
  background: linear-gradient(180deg, #166534, #14532d);
  color: #f0fdf4;
  border-color: #22c55e;
  grid-row: span 2;
}

.zero {
  grid-column: span 2;
}

@media (max-width: 520px) {
  .top-bar {
    flex-direction: column;
  }

  .title-box h1 {
    font-size: 23px;
  }

  .current-screen {
    font-size: 31px;
  }

  .btn {
    min-height: 58px;
    font-size: 18px;
  }

  .status-panel {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}