/* Reset & Font */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e1e2f, #2c2c3e);
    color: #fff;
}

/* Calculator container */
.calculator {
    background: #2b2b3a;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 360px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Output display */
.output {
    background: #1f1f2e;
    color: #fff;
    font-size: 2rem;
    text-align: right;
    padding: 20px;
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
    overflow: hidden;
}

/* Buttons grid */
.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Buttons style */
.buttons button {
    background: #3a3a4f;
    color: #fff;
    font-size: 1.3rem;
    border: none;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hover & active effects */
.buttons button:hover {
    background: #505066;
    transform: scale(1.05);
}

.buttons button:active {
    background: #6a6a8a;
    transform: scale(0.95);
}

/* Special buttons */
.span-two {
    grid-column: span 2;
    background: #e67e22;
}

.span-three {
    grid-column: span 3;
}

button:last-child {
    background: #e74c3c;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .output {
        font-size: 1.5rem;
        padding: 15px;
    }

    .buttons button {
        font-size: 1.1rem;
        padding: 12px;
    }
}
