* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, #3b82f6, transparent 35%),
        radial-gradient(circle at bottom right, #111827, transparent 35%),
        linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.page {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.calculator {
    width: 360px;
    padding: 22px;
    border-radius: 28px;
    background: #111827;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.top-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.top-bar span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: block;
}

.top-bar span:nth-child(1) {
    background: #ef4444;
}

.top-bar span:nth-child(2) {
    background: #f59e0b;
}

.top-bar span:nth-child(3) {
    background: #22c55e;
}

h1 {
    font-size: 1.4rem;
    margin-bottom: 18px;
    color: #e5e7eb;
    letter-spacing: 1px;
}

#display {
    width: 100%;
    height: 82px;
    margin-bottom: 18px;
    padding: 0 18px;
    border: none;
    border-radius: 18px;
    background: #020617;
    color: #f8fafc;
    font-size: 2.4rem;
    text-align: right;
    outline: none;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
}

button {
    height: 66px;
    border: none;
    border-radius: 18px;
    background: #334155;
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: 0 6px 0 #0f172a;
}

button:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #0f172a;
}

.operator {
    background: #2563eb;
}

.equals {
    background: #16a34a;
}

.clear {
    background: #dc2626;
}

.zero {
    grid-column: span 2;
}

@media (max-width: 430px) {
    .calculator {
        width: 100%;
    }

    button {
        height: 60px;
    }

    #display {
        font-size: 2rem;
    }
}
