body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #4c92ff, #3461c1);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    margin: 0;
}

.calculator {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 20px;
}

.result {
    width: 100%;
    height: 60px;
    font-size: 1.5rem;
    text-align: right;
    margin-bottom: 20px;
    border: none;
    background: #f1f3f4;
    border-radius: 8px;
    padding: 10px;
    box-shadow: inset 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.result:focus {
    outline: none;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
}

button {
    height: 60px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #3461c1;
    color: #fff;
    transition: all 0.3s ease;
}

button:hover {
    background: #4c92ff;
}

button.action {
    background: #e63946;
}

button.action:hover {
    background: #f44336;
}

button.equals {
    background: #4caf50;
}

button.equals:hover {
    background: #66bb6a;
}

@media (max-width: 768px) {
    .buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .result {
        font-size: 1.2rem;
    }

    button {
        font-size: 1rem;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    button {
        font-size: 0.9rem;
        height: 45px;
    }

    .result {
        font-size: 1rem;
    }
}
