/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e2e8f0;
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
}

/* Header */
.header {
  text-align:center;
  margin-bottom: 20px;
}
.header h1 {
  font-size: 1.8rem;
  color: #60a5fa;
  font-weight: 700;
  margin-bottom: 6px;
}
.header .brand {
  color: #3b82f6;
  font-size: 2rem;
}
.header .tagline {
  font-size: 0.95rem;
  color: #94a3b8;
}

/* Calculator */
.calculator {
  background: rgba(17, 25, 40, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 20px;
  width: 340px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Display */
.display {
  background: #1e293b;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 18px;
  text-align: right;
}
.history {
  font-size: 0.9rem;
  color: #94a3b8;
  min-height: 18px;
}
.output {
  font-size: 1.9rem;
  font-weight: bold;
  color: #f8fafc;
  overflow-x: auto;
}

/* Keys grid */
.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.btn {
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: #334155;
  color: #f1f5f9;
  font-size: 1.05rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59,130,246,0.3);
}
.btn:active {
  transform: translateY(1px);
}

/* Operator buttons */
.btn.op {
  background: #475569;
  color: #60a5fa;
  font-weight: 600;
}
.btn.op:hover {
  background: #2563eb;
  color: white;
}

/* Function buttons */
.btn.func {
  background: #64748b;
  color: #f8fafc;
}
.btn.func:hover {
  background: #475569;
}

/* Equal button */
.equal {
  background: #3b82f6;
  color: white;
  font-weight: bold;
}
.equal:hover {
  background: #2563eb;
}

/* Footer */
.footer {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #94a3b8;
}
