@font-face {
    font-family: "ADM2026";
    src: url("../font/adm.ttf");
    font-weight: normal;
    font-style: normal;
}
* {
    box-sizing: border-box;
    user-select: none;
}
body {
    background: #e0e5ec;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Arial', 'Segoe UI', sans-serif;
}
.calculator {
    width: 420px;
    padding: 24px;
    background: #2b2d36;
    border-radius: 32px;
    box-shadow: 0 16px 32px rgba(0,0,0,0.5), inset 0 2px 4px rgba(255,255,255,0.1);
}
.display {
    background: #1e1f26;
    color: #0f0;
    font-family: 'ADM2026';
    font-size: 44px;
    text-align: right;
    padding: 20px 20px;
    margin-bottom: 22px;
    border-radius: 16px;
    min-height: 110px;
    word-break: break-all;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.display .expression {
    font-size: 28px;
    color: #8f8;
    min-height: 38px;
}
.display .result {
    margin-top: 10px;
    font-size: 50px;
    line-height: 54px;
    font-weight: bold;
    color: #fff;
    transition: color 0.2s;
}
.display .result.error {
    color: #f77;
}
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.btn {
    padding: 24px 0;
    font-size: 30px;
    line-height: 34px;
    font-weight: bold;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.1s ease;
    background: #3b3e4a;
    color: #fff;
    box-shadow: 0 4px 0 #1f2128, 0 6px 12px rgba(0,0,0,0.3);
    text-align: center;
    font-family: inherit;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    tap-highlight-color: rgba(0,0,0,0);
    user-select: none;
    -webkit-user-select: none;
}
.btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #1f2128;
}
.btn.operator {
    background: #f39c12;
    color: #222;
}
.btn.function {
    background: #6c7a89;
    color: #fff;
}
.btn.equal {
    background: #2ecc71;
    color: #222;
    grid-column: span 2;
}
.btn.zero {

}
.btn:focus {
    outline: none;
}
@media (max-width: 440px) {
    .calculator { width: 96%; padding: 16px; }
    .btn { font-size: 26px; padding: 20px 0; }
    .display { font-size: 36px; min-height: 90px; }
    .display .result { font-size: 42px; }
}