@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;600&display=swap");

:root {
  --clr-bg: #020617;
  --clr-card: #020617;
  --clr-text: #f9fafb;
  --clr-neon-blue: #38bdf8;
  --clr-neon-pink: #f472b6;
  --clr-neon-green: #4ade80;
  --clr-operator: #f97316;
}

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

body {
  min-height: 100vh;
  font-family: "Oswald", sans-serif;
  background: radial-gradient(circle at top, #1e293b 0, #020617 60%);
  color: var(--clr-text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header {
  text-align: center;
  margin: 20px 0 10px;
}

.header h1 {
  font-size: 2.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--clr-neon-blue), 0 0 20px var(--clr-neon-pink);
}

.header p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px;
}

.calculator {
  width: 340px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #020617 100%);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4),
    0 0 50px rgba(244, 114, 182, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  backdrop-filter: blur(12px);
}

.display {
  margin-bottom: 15px;
}

.display input {
  width: 100%;
  border: none;
  outline: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 2rem;
  text-align: right;
  background: rgba(15, 23, 42, 0.9);
  color: var(--clr-neon-green);
  box-shadow: inset 0 0 12px rgba(15, 23, 42, 0.9),
    0 0 12px rgba(34, 197, 94, 0.4);
}

/* Rows */
.row {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.btn {
  flex: 1;
  margin: 4px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, #1f2937 0, #020617 70%);
  color: var(--clr-text);
  font-size: 1.2rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.08s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, background 0.15s ease;
  box-shadow: 0 0 8px rgba(15, 23, 42, 0.9);
}

/* Neon hover effect */
.btn:hover {
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7),
    0 0 18px rgba(244, 114, 182, 0.5);
  border-color: var(--clr-neon-blue);
}

/* Press animation */
.btn:active {
  transform: scale(0.94) translateY(1px);
  box-shadow: 0 0 4px rgba(15, 23, 42, 0.9);
}

/* Operators */
.operator {
  color: var(--clr-operator);
}

/* Extra functions (sin, cos, tan) */
.func {
  font-size: 0.95rem;
  color: var(--clr-neon-blue);
}

/* Equal button */
.equal {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.8);
}

.equal:hover {
  box-shadow: 0 0 24px rgba(249, 115, 22, 0.9);
}

/* Wider zero button */
.wide {
  flex: 2;
}

/* Extra row spacing */
.extra-row {
  margin-top: 6px;
}

/* Small screen tweak */
@media (max-width: 400px) {
  .calculator {
    width: 95%;
  }

  .btn {
    font-size: 1rem;
  }
}
