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

/* Layout */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    font-family: "Segoe UI", Tahoma, sans-serif;
}

/* Calculator */
.calculator {
    background: #1e1e1e;
    padding: 22px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

/* Display */
#display {
    width: 100%;
    height: 65px;
    font-size: 1.6rem;
    text-align: right;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #000;
    color: #00ff99;
    margin-bottom: 15px;
}

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

button {
    height: 55px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.15s ease;
}

button:active {
    transform: scale(0.96);
}

/* Button Types */
.number {
    background: #2b2b2b;
    color: #fff;
}

.operator {
    background: #ff9f1c;
    color: #fff;
}

.equals {
    background: #2ecc71;
    color: #fff;
    grid-row: span 2;
}

.clear {
    background: #e74c3c;
    color: #fff;
}

.zero {
    grid-column: span 2;
}

button:hover {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 480px) {
    #display {
        font-size: 1.4rem;
        height: 55px;
    }

    button {
        height: 50px;
        font-size: 1rem;
    }
}
button.back {
    background: #3498db;
    color: #fff;
}
