* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.calculator {
    background: #1f2937;
    padding: 20px;
    border-radius: 20px;
    width: 340px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.calculator h1 {
    text-align: center;
    color: white;
    margin-bottom: 15px;
}

#display {
    width: 100%;
    height: 70px;
    border: none;
    outline: none;
    border-radius: 12px;
    background: #111827;
    color: white;
    font-size: 28px;
    text-align: right;
    padding: 10px;
    margin-bottom: 15px;
}

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

.buttons button {
    height: 60px;
    border: none;
    border-radius: 12px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.buttons button:hover {
    opacity: 0.85;
}

.buttons button:nth-child(1),
.buttons button:nth-child(2) {
    background: #ef4444;
    color: white;
}

.buttons button:nth-child(4),
.buttons button:nth-child(8),
.buttons button:nth-child(12),
.buttons button:nth-child(16) {
    background: #fbbf24;
    color: white;
}

.buttons button:nth-child(20) {
    background: #34d399;
    color: white;
}

.buttons button:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(4)):not(:nth-child(8)):not(:nth-child(12)):not(:nth-child(16)):not(:nth-child(20)) {
    background: #6b7280;
    color: white;
}
