* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(145deg, #e8eef4 0%, #d9e0eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.calculator {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 42px;
  box-shadow:
    0 25px 40px -12px rgba(0, 20, 30, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  padding: 24px 22px 24px 22px;
  transition: all 0.2s ease;
}

.display {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 32px;
  padding: 18px 20px 18px 20px;

  border: 1px solid rgba(255, 255, 255, 0.9);
}

.history {
  font-size: 1.1rem;
  font-weight: 380;
  letter-spacing: 0.5px;
  color: #3a4a5e;
  min-height: 28px;
  text-align: right;
  word-break: break-all;
  padding-right: 6px;
  opacity: 0.7;
  margin-bottom: 10px;
  font-family: "SF Mono", "Fira Code", monospace;
}

.current {
  font-size: 3.2rem;
  font-weight: 520;
  text-align: right;
  line-height: 1.1;
  color: #1b2b3f;
  letter-spacing: -1px;
  word-break: break-all;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: "Inter", sans-serif;
}

.current::placeholder {
  color: #9aabbb;
  font-weight: 380;
  font-size: 2rem;
}

.row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 40px;
  padding: 12px 0;
  font-size: 1.6rem;
  font-weight: 440;
  color: #1d2c3a;
  box-shadow:
    0 6px 10px -4px rgba(0, 20, 30, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 8px 14px -6px rgba(30, 60, 80, 0.2),
    inset 0 0 0 1px white;
  transform: scale(0.98);
  color: #0f1a24;
}

.btn:active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(0.96);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn.operator {
  background: rgba(220, 235, 250, 0.7);
  color: #1f4973;
  font-weight: 540;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.btn.operator:hover {
  background: rgba(200, 225, 250, 0.9);
}

.btn.equals {
  background: rgba(160, 190, 220, 0.75);
  color: #0b263b;
  font-weight: 560;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px -4px #7e9dbb;
}

.btn.equals:hover {
  background: rgba(150, 180, 215, 0.9);
}

.btn.fn {
  background: rgba(250, 245, 240, 0.7);
  font-weight: 500;
  color: #4a3f38;
  font-size: 1.5rem;
}

.btn.fn:hover {
  background: rgba(245, 235, 225, 0.9);
}

.signature-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding: 0 12px 0 10px;
  opacity: 0.55;
  font-size: 0.9rem;
  color: #3e5265;
  letter-spacing: 0.2px;
}

.signature-left {
  display: flex;
  gap: 12px;
}

.signature-left span {
  background: rgba(255, 255, 255, 0.5);
  padding: 6px 12px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  font-weight: 430;
  font-size: 0.9rem;
}

.signature-right {
  font-family: "SF Mono", monospace;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.02);
  padding: 6px 14px;
  border-radius: 30px;
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.mini-tag {
  display: flex;
  gap: 8px;
  margin-left: 6px;
}

.mini-tag div {
  width: 28px;
  height: 28px;
  border-radius: 30px;
  background: rgba(230, 240, 250, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #274256;
  border: 1px solid rgba(255, 255, 255, 0.7);
}


.float-reminder {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: flex-end;
  padding-right: 8px;
}
.float-reminder span {
  background: rgba(200, 215, 235, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 1rem;
  font-weight: 420;
  color: #314e6b;
  border: 1px solid rgba(255, 255, 255, 0.5);
  letter-spacing: 0.3px;
}


@media (max-width: 420px) {
  .btn {
    font-size: 1.4rem;
    padding: 12px 0;
  }
  .current {
    font-size: 2.7rem;
  }
}
