* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    user-select: none;
}

body {
    background-color: #121214;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.calculator {
    width: 100%;
    max-width: 360px;
    background: #1e1e24;
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.display {
    background-color: #141416;
    border-radius: 20px;
    padding: 20px;
    text-align: right;
    margin-bottom: 24px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    word-wrap: break-word;
    word-break: break-all;
}

.history {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 8px;
    min-height: 1.5rem;
}

.current {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 300;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn {
    border: none;
    background: #2a2a32;
    color: #ffffff;
    font-size: 1.5rem;
    padding: 20px 0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.btn:active {
    transform: scale(0.95);
    background: #33333d;
}

.action {
    background: #3a3a46;
    color: #ff9f0a;
    font-weight: 600;
}

.action:active {
    background: #4a4a58;
}

.equal {
    grid-row: span 2;
    background: #ff9f0a;
    color: #ffffff;
    font-weight: 600;
}

.equal:active {
    background: #cc7f08;
}

.zero {
    grid-column: span 2;
}