:root {
  --bg: #08111d;
  --panel: rgba(10, 20, 36, 0.84);
  --line: rgba(137, 170, 209, 0.12);
  --text: #eef5ff;
  --muted: #8ea3c2;
  --accent: #7ce7ff;
  --accent2: #7b8cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #14305a, var(--bg) 45%, #030712 100%);
}
.wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.panel {
  width: min(100%, 380px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(14px);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}
.topbar a { color: var(--accent); text-decoration: none; }
.screen {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  margin-bottom: 18px;
}
.history {
  min-height: 22px;
  color: var(--muted);
  text-align: right;
  font-size: 14px;
}
.display {
  text-align: right;
  font-size: 42px;
  font-weight: 700;
  word-break: break-all;
  min-height: 50px;
  line-height: 1.2;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}
.keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.key {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-radius: 18px;
  min-height: 62px;
  font-size: 22px;
  cursor: pointer;
  transition: .18s ease;
}
.key:hover { transform: translateY(-1px); border-color: rgba(124,231,255,.35); }
.key.fn { color: var(--accent); }
.key.op { background: linear-gradient(135deg, rgba(124,231,255,.18), rgba(123,140,255,.22)); }
.key.eq { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #07111d; font-weight: 800; }
.key.wide { font-size: 20px; }
